Adafruit builds a smart (Yún) measuring cup

Adafruit’s Tony DiCola has put together a detailed tutorial explaining how to build a smart measuring cup that displays the volume of liquid in a real time on a web page. The brains behind the smart measuring cup? An Atmel-powered Arduino Yún (ATmega32u4) and an eTape liquid level sensor.

Additional project components include:

  • Female to male hookup wires
  • Graduated cylinder or other container to hold liquids
  • 
MicroSD card for storing scripts and data

“The Yun is the perfect platform for this project because it can read sensor data with it’s ATmega microcontroller and serve a web application (written in python and Flask) using it’s Linux-based processor,” DiCola explained.

“No longer will you need to squint and guess while measuring liquids; the smart measuring cup’s web page clearly shows the measured volume and even converts between units or tares measurements like a digital scale!”

As DiCola notes, the assembly of the hardware is relatively simple as the eTape liquid sensor is actually a resistive sensor, just like a photocell.

“Attach one of the middle two leads to ground on the Arduino. Attach the other middle lead to an analog input such as analog 0 on the Arduino,” said DiCola.

“Finally, attach the 560 ohm resistor that comes with the sensor between the analog 0 and 5 volt pins on the Arduino. The outer two pins on the sensor will be unused (they’re for temperature compensation in a bridge configuration).”

Next up? Attach the liquid sensor to a container. First, DiCola recommends placing the sensor against a wall of the container. Then, ensure the sensor is hanging vertically without bends or crimps.

“Only the top portion of the sensor above the MAX line can be attached to the container,” he emphasized.

“The rest of the sensor must be allowed to hang freely so liquid can touch both the front and back of the sensor. [A binder] clip works well as a temporary means of affixing the sensor. For something more permanent consider taping or gluing the top of the sensor to the container (remember only glue or tape the sensor above the MAX line!). Use a food safe adhesive such as silicone sealant if necessary.”

After attaching the sensor, Makers can run an Arduino calibration sketch to report the volume of measured liquid. Last, but certainly not least, the Arduino Yún should be configured to display the measured volume on a web page that updates in real time.

“This project is an example of how to use an eTape liquid level sensor to build a smart web-enabled measuring cup,” DiCola concluded. “You can use the code from this guide to help get any sensor data onto a web page using an Arduino Yún.”

With some tweaking, future project uses could include:

  • Logging volume or liquid level data to a cloud service such as Google Docs or Amazon DynamoDB.
  • Putting a water level sensor in your home’s sump pump and send an SMS message when water is rising dangerously high.
  • Making a web application to help you mix drinks and other concoctions with the liquid sensor.

As we’ve previously discussed on Bits & Pieces, the Atmel-powered Yún has been used in a wide variety of Maker projects that we’ve recently covered, including an electricity monitormesh extender platformFoursquare soap bubble machine, a Gmail (alert) lampwater heater regulator and a security camera.

Interested in learning more about building a smart measuring cup? You can check out Tony DiCola’s detailed tutorial on Adafruit’s Learning System here.

 

1 thought on “Adafruit builds a smart (Yún) measuring cup

  1. Pingback: Adafruit builds a WiFi Yún soundboard

 | Bits & Pieces from the Embedded Design World

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s