Introduction: LittleBits Data Collecting Water Cooler [Quantified Thirst]
Meet Mr. Thirsty, our super smart data-collecting water cooler. Not only does Mr. Thirsty fill your water cup to the perfect level, but every time he fills a cup, he logs the date and time onto a Google spreadsheet using the cloudBit (In these days of the quantified office, if you're not measuring it, is it really even happening?).
If you're curious about Thirsty's day, you can check out his activity at Mr. Thirsty's Diary.
Make this project with littleBits
littleBits is the easiest and most extensive way to learn and prototype with electronics. We are making hardware limitless with our award-winning, ever-growing library of electronic modules, ranging from the very simple (power, sensors, LED) to the very complex (wireless, programmable). This project uses the littleBits cloudBit (TM). The cloudBit lets you connect any device to the internet, turning any object into an internet connected device in a snap – no soldering, wiring or programming required. Instructions for setting up the cloudBit can be found here.
How it works:
There are two servo-activated levers that press the buttons on the front of the water cooler, thus dispensing water. You can set the fill time for both hot and cold water by turning the dimmers which will change the time (in seconds) on the number module (set in values mode). Then, just press the button to start the pouring process. As the the water pours, the number module will count down each second until the time is up and then disengage the servos.
The number module can be used for both setting the clock and counting down the time because it's not connected directly to the dimmer. Instead, it's connected to the Arduino module. The Arduino reads the voltage coming in from the dimmer and then passes that value on to the number module. When you press the fill button, the Arduino stops reading the dimmer and instead decreases the voltage going to the number module by a set amount each second. Once the voltage has reached zero, the Arduino disengages the servo and sends a signal to the cloudBit telling it to log the event on Mr. Thirsty's Diary.
NOTE: Unless you have the same water cooler as the littleBits team, you will probably need to modify the size of the frame and the position of the levers.
Files You Will Need:
littleBits Servo (4)
littleBits Split (1)
littleBits Wire (3)
105/16" Threaded Rod (8.5" long)
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Set Up Your CloudBits
Set up your cloudBits if you haven’t done so already. Instructions for setting up the cloudBit can be found here.
Step 2: Assemble the Frame
Cut the frame pieces out of the acrylic using the Frame Template file.
Glue together the four pieces of the frame as shown in the image.
Step 3: Set Up the Servos
Mount the two servos on either side of the frame.
Attach a power module to the right servo so that it will go to its 0% power position and hold there. Screw the servo arm (B) onto the servo shaft so that it is horizontal with the top plate.
Attach a power module and a dimmer to the left servo and turn the dimmer all the way up so that it will go to its 100% power position and hold there.
Screw the servo arm (B) onto the servo shaft so that it is horizontal with the top plate.
*Because the servos are facing each other, they will need to spin in opposite directions to pull the levers. That is why one one servo is set to 0% and the other to 100%
Step 4: Assemble the Levers
Insert the threaded rod through the holes on the frame, adding nuts and levers as you go. We used a little mounting putty in the threads of the rod to hold the nuts in place (otherwise they easily loosen over time).
Step 5: Attach the Levers to the Servo Arms
We used a Tamiya 3mm threaded shaft set to attach each lever to the servo arms. As a safety feature, our water cooler requires you to push two buttons at once for hot water, so two of our levers are connected to the same servo arm.
Step 6: Add Your Circuit
Put together the circuit shown in the circuit diagram. If your water cooler has both hot and cold options, you can use one circuit for each. We put four mounting boards on the frame to hold our circuit, but you could also use shoes.
Step 7: Program Your Arduino(s)
The code for the Arduinos can be found here:
You will probably have to adjust how far your servos turn in order to push the buttons. To change how far the servos turn, adjust the variables servoPush and servoNoPush in the code. If you try to turn the servos too far, it will wear them out over time, so only turn them as much as you need to push the buttons.
Step 8: Set Up Your Data Logging
We used cloudBits connected to IFTTT (If This Then That) to log every time Mr. Thirsty dispenses water. See images 16 and 17 for examples of our recipes.