Candy Jar - Watch Your Candies and Know When Sb Eats Them!

by PawełJ17 in Circuits > Art

1071 Views, 15 Favorites, 0 Comments

Candy Jar - Watch Your Candies and Know When Sb Eats Them!

57e92a7d50e1b61c1100174a.jpeg
Candy jar - watch your candies and know when sb eats them!
Candy jar - watch how many candies are left in the jar!

Don't eat my candies!

This is the best solution for cookie monsters! We quickly made a smart lid with sensors that watch how many candies are left in the jar, check if the jar is open or not and have a loud buzzer to scare snackers.

​Circuit Diagram

schemat_servo-02.jpg

Connect HC-SR04 ultrasonic sensor to the hSens1 port of your CORE2. Connect ESP8266 adapter of course, to make your lid internet connected. Connect also buzzer to any hServo port - we only use it as program controlled power source. Think of how you can put everything in to the lid or print in 3D your customized lid as we did. Then attach CORE2 and microswitch to the lid, so the switch is released when jar is opened. At the and connect power supply. We used 3 rechargeable batteries and attached it with zip ties.

Assembly

P60919-093822.jpg
P60919-095054.jpg
P60919-095729.jpg
P61020-111726 (1).jpg

Simply connect CORE2 with 4x M3 screws and nuts to any jar's lid. We prepared our unique, 3D printed lid.

Then try to put any sensors, buzzer and battery underr the lid, as we did.

Code

aplikacja_sloik_wybrana-03.jpg

Use our open-sourced code provided here on github. If you are familiar with Husarion Cloud just import it as zip, other way follow this Husarion site to connect your CORE2 to the Cloud and program it via web browser.