Introduction: Location and Food Clock
I created the location-food clock as a way to notify my mom about where I am and whether or not I have eaten the appropriate meals for the day. It uses the location from my smartphone and turns the clock hands to one of three positions: Home, School or Elsewhere. The hands of the clock have three lights accounting for the three meals of the day. Whenever I have a meal, I press a button on my phone (using the IFTTT app) and the appropriate lamp lights up. At the end of the day, if all three lights are on, my mom would be relieved and happy to know that I have had food throughout the day. At midnight (my local time), the lights would all turn off. This clock was created with just my data, but in the future, I plan to add more hands for other members of my family as well. I have wanted to make something like this since I was about 18 years old and my mom would call me twice a day to ask if I had eaten and later on when I started working, my dad would ask me if I was at work or had already left. I wish I had this clock then!
The project was also slightly inspired by the Weasley clock from the Harry Potter world.
Step 1: Things Required
Step 2: Adafruit IO and IFTTT
Create an account on Adafruit IO. Once you have created an account, go to your feeds and create a new feed called "location". The Huzzah Feather board gets its data from this feed.
The next step is to create an account on IFTTT. Once you have an account on IFTTT, search for and connect to the Android/iOS location channel and Adafruit channel. Then create these four applets :
1. If you enter the location of your work/school, send the data to the "location" feed created on Adafruit IO with the value "School" or "Work".
2. If you exit the location of your school/work, send the data to the "location" feed created on Adafruit IO with the value "Travelling" or "Elsewhere".
3. If you enter the location of your home, send the data to the "location" feed created on Adafruit IO with the value "Home".
4. If you exit the location of your home, send the data to the "location" feed created on Adafruit IO with the value "Travelling" or "Elsewhere".
Once this has been setup, the "location" feed will keep updating every time you enter and exit your home and school/work.
Step 3: Connecting the Circuits
Start by setting up the Huzzah board by following the instructions on this page.
Next, add the Adafruit IO package to Arduino IDE by following this process.
Once the board is setup, connect the neopixels and the servo motor to the circuit using the circuit diagram below. First test the circuit and the code on a breadboard before soldering all the connections. The Arduino Uno board with my breadboard circuit is completely unnecessary, it is just attached to my breadboard, hence, it is in the picture.
I have also attached the sketch I used for the project below which you can download and use--just remember to input your Wifi name and password, and the AIO username and key in the code with your own.
Step 4: The Clock
The body can be made with essentially anything and in any form that you want. For this project, I used plastic containers and cement to cast the shape I wanted. I started by first preparing the mold. I cut holes at the bottom of the two containers and placed a wood dowel to hold them apart. I also used a flat foam core sheet, cut in a circular shape, to make the bottom of the bigger container flat, since I wanted to have a smooth flat surface for my clock face. Using foam core was a mistake, since it stuck to the cement once it set. But I was able to scrub it off using water and a scrubber.
Once the mold was ready, I greased all sides of the containers with some oil. Then, following the directions on the cement package, I mixed 1 part water with roughly 3.5 parts of cement, mixing slowly to avoid air bubbles and preventing lumps. The package says to mix 1 part water to 4 parts cement, but I found that 3-3.5 parts of cement were sufficient. I should have added lesser cement to ensure a proper flow of cement everywhere. But my mixture was too thick and I ended up having a large uneven hole on the top surface which I had to fill in later. After mixing the cement with water, pour evenly in the mold and let it set for about 15-20 minutes. It dries and hardens differently based on the temperature in the room, so give it sufficient time to set and dry and then it becomes really hard.
I made the hand of the clock using a scrap strip of wood. I cut it to the required length, rounded off the edges and drilled three holes for the LEDs.
All the parts are now ready for assembly.
Step 5: Assembly
I basically just taped all the parts in place. Then I put the three Neopixels on the three holes on the clock arm and get the wires neatly tucked under the arm and through the hole in the middle of the clock face. Then I glued the clock arm to the shaft coming from the motor.
It is now ready to be used! Hang it up on the wall in your mom's house :)
Step 6: Next Steps
If I were to take this project further, I would add more hands on the clock for other members of my family. My problem with this currently is that I would need a different servo motor to drive each new hand and don't know how I would do that.
Please leave any feedback or suggestions in the comments below!
And also share your versions of the clock and what other applications can this have.