HALLOWEEN DIY CANDY DISPENSER WITH RIDDLE, 7-SEGMENTS & PUSHBUTTON, ARDUINO & 3D PRINTED | ELISAVA

by arnau_faso in Circuits > Arduino

1562 Views, 8 Favorites, 0 Comments

HALLOWEEN DIY CANDY DISPENSER WITH RIDDLE, 7-SEGMENTS & PUSHBUTTON, ARDUINO & 3D PRINTED | ELISAVA

FOK0AZ7KVI3SKAF.jpeg
HALLOWEEN PROJECT ARDUINO, CANDY DISPENSER

In this project we use an Arduino Uno along with some simple components to create an interactive, scary  and playful decoration for Halloween to impress all your guests. Our idea is basically designing a candy dispenser that only provides the user with a few candy if a riddle is solved properly; of course everthing ambiented for the spooky season.

Supplies

20211102_114539.jpg
  1. Computer (with Arduino software)
  2. Arduino Uno (or equivalent)
  3. Jump wires 
  4. 7 segment display 
  5. LED lights 
  6. Servo motor
  7. 3D printer 
  8. PLA material 
  9. Candy
  10. Ply wood 
  11. Laser cutting machine 
  12. Paint (spray and non-acid better)
  13. Drill
  14. Resistors 7x330Ohm and 3x220Ohm
  15. Speaker
  16. MP3 player
  17. Pushbutton

The underlined elements can be easily replaced by commercial already made Halloween products, by purchasing them you save a significant amount of time and reduces difficulty.

IDEA DEVELOPMENT

To begin with, we decide what we want to achieve with our gadget and plan how it will get done. Which is the hardware that we need, how we have to program it and brainstorm ideas for the design. In this step, it has been decided that we will use a seven-segment display and the user will have to guess a number as the answer to an enigma. When the right digit is on display, the user should press the button. Once the number is correct a servo will activate and throw some candy. In our case we ask: "How old is our university? (in decades)", and the answer to that is 6, so when the displayed number is 6 the candy is released. This code can be changed to whatever number suits you better.

DESIGN

Captura de pantalla 2021-11-02 104214.jpg
20211026_183724.jpg

In this part everyone can bring their own creativity and come up with those final touches that will make your design unique. As we planned to do a two-pieces setup, we will need a grave and a tree. We want to 3D print both of them, this is why we start with this part as it takes quite a bit of time to print. As it's been mentioned before, if you purchase the parts from a store it might save you some time.

3D PRINTING AND LASER CUTTING

IMG-20211030-WA0000.jpg
20211029_162803.jpg
IMG-20211031-WA0001 (1).jpg

We got the tree file from Thingiverse.com and reescalded it to make it 50% bigger; also the previous design for the grave that we did ourselves and after passing them through the slicer (Cura), we printed them. Once that is done with Autocad we design the base structure and using a laser machine, we cutted the base precisly.

In addition, as we were using the laser machine, we could engrave our riddle in the ply-wood.

We drilled holes in the base right under the grave and tree so we can run the cables down to the Arduino.

COLOUR

IMG-20211101-WA0013.jpg
IMG-20211101-WA0000.jpg

We painted the different parts with spray to achieve the desired spookiness. 


PROGRAMMING

flow_diagram_boiooooo.jpg

Once the setup is ready, we should program the different functions in Arduino. In order to assure that all components work, what we do is program them individually. Once we know for sure that all elements work, we start putting it all together.

For example we connect the 7-segments display and write a short code that displays all numbers with a short delay.

Don't forget to download the Libraries for each element, for example the 7segments or the mp3 player, as they require to have the installed libraries on your computer.

Also the pins of the Arduino are according to our connections, if you don't follow the scheme that you can find in Step 8, the code won't work.

CODE

In the following file you can find the code for this project.

DISPENSER MECHANISM

20211102_112942.jpg
20211102_112959.jpg
20211102_112950.jpg

In order to release some sweets when the right answer is pressed, we designed a mechanism and printed the parts. It consists of a structure that is glued inside the tree and has a funnel shape. Next to it there's a space where the servo will rest and on top of that we have the candy tank. Simple yet functional. The only thing left to do is add a tiny piece of cardbord to the servomotor so that it works like a door.

FINAL ASSEMBLY

placaarduino_halloween project.jpg
20211102_152531.jpg

The last part, to assemble and achieve the final product. We have connected all the hardware with the Arduino and glued all the elements to the plywood base. Connections are shown in the graphics generated in Fritzing.

As you can see in the second image, the 7 segments has an independent welded PCB attached at the back of the grave due to its complicated connections. Each of the 7 lights it's an LED that works independently and requires a resistor. Then the cables run down from the welded PCB to the base where we can find the Arduino.

FILL THE TANK WITH CANDY

20211102_140335.jpg
20211102_140330.jpg

Make sure there's enough sweets for everyone and the Halloween candy dispenser is set and ready to go.