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

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.

Step 1: ​Circuit Diagram

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.

It will be soon available at Crowdsupply: https://www.crowdsupply.com/husarion/core2I didn't make any other working alternative, just the presented one, but I think it is possible to make on any microcontroller. Except the WebUI - I don't know, maybe on NodeMCU or WeMOS? I saw once a project with a website on WeMos ;)

Hi, ESP8266 is delivered for free with CORE2 in a box ;) I used buzzer with generator, so it makes characterisitc beep sound (like this one: https://goo.gl/8rkOZv) I think that kind of microswitch could work as well, but you have to develop your own way to attach it on the lid. I'll show you my solution. Bear in mind, that Core2 needs at least 6V (https://docs.husarion.com/hardware/core2_1_0_0/index.html), I used batteries with higher voltage than normal 1.5V batteries, so I could use only 3 of them.