Halloween “head-in-a-jar” Candy Dispenser Decoration With Arduino
by gabri.alcaide in Circuits > Arduino
635 Views, 0 Favorites, 0 Comments
Halloween “head-in-a-jar” Candy Dispenser Decoration With Arduino
![IMG_2311.jpeg](/proxy/?url=https://content.instructables.com/FD5/6Y1V/K2NO3YXD/FD56Y1VK2NO3YXD.jpg&filename=IMG_2311.jpeg)
This project explains how to build a candy dispenser to use as Halloween decoration build with Arduino Uno.
The leds light up in a back and forward sequence in red and will turn into green if the ultrasonic sensor detects a hand. Next, a servo will open a trapdoor that contains candy and it will fall directly into your hand.
Build the Head-in-a-jar
![069443ED-4419-499F-811E-4E33CF5A5549.jpeg](/proxy/?url=https://content.instructables.com/F1Y/ODS5/K2J6B34R/F1YODS5K2J6B34R.jpg&filename=069443ED-4419-499F-811E-4E33CF5A5549.jpeg)
![IMG_2315.jpeg](/proxy/?url=https://content.instructables.com/F73/50D7/K2NO3ZH5/F7350D7K2NO3ZH5.jpg&filename=IMG_2315.jpeg)
![IMG_2314.jpeg](/proxy/?url=https://content.instructables.com/FQW/EQQ4/K2NO3ZH3/FQWEQQ4K2NO3ZH3.jpg&filename=IMG_2314.jpeg)
We got our inspiration to do this Halloween prank from another Instructable.
You can learn to do this first step in this link: https://www.instructables.com/id/head-in-a-jar-prank/
After that, we’re going to add the arduino circuit to convert it into a candy dispenser.
Build the Jar Holder
![IMG_2312.jpeg](/proxy/?url=https://content.instructables.com/FPA/GCWZ/K2NO3Z4G/FPAGCWZK2NO3Z4G.jpg&filename=IMG_2312.jpeg)
![IMG_2313.jpeg](/proxy/?url=https://content.instructables.com/F1R/BDHG/K2NO3ZEB/F1RBDHGK2NO3ZEB.jpg&filename=IMG_2313.jpeg)
To build the Jar Holder was necessary to make a wood structure to subject all the electronic and mechanical components used to run the candy dispenser.
The external structure holds the jar. Also there is a shelf to hold the electronic and the candy cavity pasted to the table.
Build the Candy Dispenser
![IMG_2316.jpeg](/proxy/?url=https://content.instructables.com/F7A/A48Q/K2NO3ZK1/F7AA48QK2NO3ZK1.jpg&filename=IMG_2316.jpeg)
![IMG_2317.jpeg](/proxy/?url=https://content.instructables.com/FAW/D8I7/K2NO3ZMT/FAWD8I7K2NO3ZMT.jpg&filename=IMG_2317.jpeg)
The candy dispenser consists in a cavity where is possible to put different kind of sweets and the barrier that allows or not the falling of a single candy each time. The whole is made by wood and the barrier is connected to the servo to be moved when the sensor feels a hand near.
Electronic Components
![IMG_2318.jpeg](/proxy/?url=https://content.instructables.com/FO7/KPJ3/K2NO3ZSG/FO7KPJ3K2NO3ZSG.jpg&filename=IMG_2318.jpeg)
In this project we use the following components:
- Servo Motor x1: movement of the gate.
- Movement sensor x1: detection of hand to take a candy.
- LED's RGB x4: output of the sensor (informs the user about the correct use).
- Battery x1: energy to the servo running.
- Cocodriles: to connect the circuit.
- Resistors (220) x8
- Arduino 1
Electronic Circuit
![Captura de pantalla 2019-11-08 a las 16.52.00.png](/proxy/?url=https://content.instructables.com/FBB/M5HL/K2NOQGQD/FBBM5HLK2NOQGQD.png&filename=Captura de pantalla 2019-11-08 a las 16.52.00.png)