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 sneakers.
Circuit DiagramConnect 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 micro switch to the lid, so the switch is released when jar is opened. Finally connect a power supply. We used 3 rechargeable batteries and attached it with zip ties.
Use our open-sourced code provided here on Github. If you are familiar with Husarion Cloud just import it as zip, otherwise follow this Husarion site to connect your CORE2 to the Cloud and program it via web browser.
At the end connect to the web browser and see if somebody is stealing your candies from your armed jar:
Or simply watch how many candies are left:
Hope you enjoy our projects!
Comments