Halloween Candy Dispenser

About: I am a 13 year old DIY hobbyist. I mainly focus on electronics, but I dabble in other ares as well.

So I was sitting on my couch a few days prior to Halloween, and I got bored. So I decided to build some Halloween- themed stuff. Then I thought of an electronic candy dispenser, with an Arduino and an LCD display. So I got building. I must confess, I am not the best programmer in the entire world. I have trouble with languages that are not native (pun intended) to me, and since I don't program sketches frequently, I had some trouble with this simple device. After I finished, however, I realized just how simple it was. So follow along, and it'll be a breeze.

Step 1: Parts

Here are all the components you'll need:

  • Arduino Uno
  • L3293D Motor Driver Chip
  • LCD 1602 Module
  • DC Motor
  • Green LED Bulb
  • 10k Ω Potentiometer
  • Pushbutton Momentary Switch

  • 12V Battery

  • Numerous M-M Jumper Wires

  • Large Breadboard
  • Small Breadboard
  • Mini Breadboard

Amazon- This kit is my personal recommendation. It has everything here (barring the battery)

  • 3D Printed Parts
  • 1' Diameter Candy Bowl
  • Large Piece of Cardboard
  • Toothpick
  • Rubber Band

Tools:

  • 3D Printer
  • Hot Glue Gun
  • Knife
  • Soldering Iron (If you want it permanently)
  • Wire Strippers

Step 2: The Easy Stuff

Let's start with the lid of the bowl before we get into the electronics. First, cut a circular piece of cardboard (1ft Diameter) with the knife. Cut a hole from that piece. Cut out another piece out another section, in accordance with the picture above. Next print the plastic hardware (Thingiverse, Thingiverse, Thingiverse). Next, stick the toothpick through the wheel, and the toothpick through the hole in the cradle, as pictured above. Hot glue the toothpick in place. Glue the little plastic rings onto the large 3D printed square. Glue all the 3D Printed parts onto the cardboard, as shown above.

Step 3: The Circuit

Oh, what fun electronics are. Wire the circuit according to the pictures above. Also, sub the 9V battery for a 12V. Tinkercad doesn't have a 12V option. The orange LED is optional as well.

*Footnote: This took me a while to concoct, so if you could be so kind to vote for me in the Halloween Contest, or leave me a comment below.

Step 4: Finishing Up

Glue the rubber band in place, as shown above. Make it pretty. Here's how: 1-Cut a hole for the LCD and button. 2-Glue the screen and pushbutton in place. 3-Glue the cardboard lid on. Plug the USB cable into the wall. The final product should look something like the pic above. Just shove all the circuitry in the bowl, there should be enough room for the candy.

Step 5: Code

Here is a GitHub link: (Candy-Dispenser/ u92master)

This is the code in plain text:

#include <LiquidCrystal.h>

lcd(6, 8, 9, 10, 11, 12); int pin = 6; #define ENABLE 5 #define DIRA 3 #define DIRB 4

int i; void setup() { lcd.begin(16, 2); Serial.begin(9600); lcd.setCursor(1,0); lcd.print("Please Take One"); digitalWrite(ENABLE,HIGH); // enable digitalWrite(DIRA,HIGH); //open lid delay(10000); digitalWrite(DIRB, HIGH); //close lid lcd.setCursor(1,0); lcd.print("Visit GriffinC7"); lcd.setCursor(0,1); lcd.print("On Instructables"); }

void loop() { }

Step 6: Help!

Help! I need somebody!

I have no idea if I am just some goofy 13-year-old typing up a dumb 'ible at midnight, or if my projects are even decent, or anything. So please comment below if you want me to stop publishing these stupid (or not- that is what I have to decide), tell me- show no mercy!

*Footnote: Ya, I like the Beatles. Ya, I'm 13. Ya, it's weird. (She loves you "Ya, Ya Ya"- Get It?)

Share

    Recommendations

    • Toys Contest

      Toys Contest
    • PCB Contest

      PCB Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    Discussions