loading

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.

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.

Step 2: Assembly

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.

Step 3: Code

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.

<p>Dear<br>PawelJ17:</p><p>In this<br>project, i need to use the CORE2 platform, but at this moment, the platform are<br>unavaible on: <a href="https://husarion.com/" rel="nofollow">https://husarion.com/</a></p><p>Do you know<br>one way to program this project using an alternative to CORE2? </p><p>Or, do you<br>know of another site that has the CORE 2 platform available? </p><p>Any<br>sugestion is welcome! </p><p>Thank you<br>very much!</p>
<p>Dear PawelJ17:</p><p>I'm interested on the development of this project, and I have been searching the components needed and I did not found the ESP8266 adapter which is compatible with CORE2 board.</p><p>However, I have found the other components and, if not too much to ask, I would like if you can confirm it to me:</p><p>- Ultrassonic sensor: <a href="http://www.ebay.co.uk/itm/Ultrasonic-Distance-Measuring-sensor-HC-SR04-module-for-Arduino-/172359411725?hash=item28216be80d:g:2jMAAOSwTA9X7pnO" rel="nofollow"> http://www.ebay.co.uk/itm/Ultrasonic-Distance-Mea...</a></p><p>Husarion CORE2 board: <a href="https://store.husarion.com/eu/home/8-husarion-core2.html" rel="nofollow"> https://store.husarion.com/eu/home/8-husarion-cor...</a></p><p>Buzzer: <a href="http://www.ebay.co.uk/itm/95DB-Continuo-Alarma-DC-3-24V-Zumbador-Electronico-Beep-para-Arduino-Buzzer-/282169641943?hash=item41b29f0bd7:g:McoAAOSwOdpX07Kw" rel="nofollow"> http://www.ebay.co.uk/itm/95DB-Continuo-Alarma-DC...</a></p><p>Microswitch: <a href="http://www.ebay.co.uk/itm/5x-Switch-Microswitch-Mini-Push-Button-Long-Legs-Tactile-Arduino-AVR-/172190308977?hash=item2817579a71:g:qIcAAOSwFEFXJvIv" rel="nofollow"> http://www.ebay.co.uk/itm/5x-Switch-Microswitch-M...</a></p><p>Battery holder: <a href="http://www.ebay.co.uk/itm/1-2-3-4-6-8-x-AA-AAA-23A-9V-Battery-Holder-Snap-On-Connector-Enclosed-Box-Switch-/180814661762?var=&hash=item2a1964c882:m:mm4buxOdrdWPfAmfl4A9-Pw" rel="nofollow"> http://www.ebay.co.uk/itm/1-2-3-4-6-8-x-AA-AAA-23...</a></p><p>Batteries: <a href="http://www.ebay.co.uk/itm/4-X-BATTERIES-MAXELL-1-5V-AA-ALKALINE-LR6-LR06-LR6T-4B-BATTERY-BULK-/152112313329?hash=item236a99b3f1:g:q3YAAOSw2GlXInmx" rel="nofollow"> http://www.ebay.co.uk/itm/4-X-BATTERIES-MAXELL-1-...</a></p><p>Any sugestion is welcome!</p><p>Thank you very much!</p>
<p>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.</p>
<p>That's how I attached my microswitch. I melted a part of my 3D printed lid and used a glue to attach the microswitch</p>
<p>Dear PawelJ17</p><p>The app you developed is for android or iOS? </p><p>Can you explain better how to install the app on the smartphone?</p><p>Thank you very much</p>
<p>This User Interface is running through website only, thanks to Husarion Cloud, here is link: <a href="https://cloud.husarion.com/" rel="nofollow">https://cloud.husarion.com/</a> </p><p>You can find more information here: <a href="https://docs.husarion.com/howtostart/core2_1_0_0/index.html#connecting-to-the-cloud" rel="nofollow">https://docs.husarion.com/howtostart/core2_1_0_0/i...</a></p>
It is cool
<p>This is pretty funny! XD We need one of these in our house.</p>
Show us, when you complete your jar ;)

About This Instructable

673views

13favorites

License:

More by PawełJ17:SpyBot - Internet-controlled robot with videostreaming Open Sesame - DIY door opening IoT Roller blind controlled via web browser with CORE2 and RPi 
Add instructable to: