Contactless Halloween Candy Dispenser

Introduction: Contactless Halloween Candy Dispenser

It is that time of the year again, where we are celebrating Halloween, but this year due to COVID-19 all bets are off. But in the spirit of Halloween, we shouldn't forget the fun of Trick or Treating.

Thus this post is created to allow family to still Trick or Treating with the contactless Halloween Candy Dispenser. This allow the safe distribution of the Candy and makes the kids happy. And of course not to forget to minimise the risk of spreading the virus.


What we need for this setup is:

- Arduino uno or nano

- Servo

- servo driver

- Ultrasonic sensor

- cables

- Milk jug for the skull

- Cardboard to make the skull

- Pipe to hold the candy

- Old CD to be used as the dispenser

- recycled wood plank or timber to make the stand

Step 1: Designing the Dispenser

The idea is to have the candy stored is a big jug with a rotating cover at the bottom that allow it to be controlled by stepper motor.

So we start by connecting the stepper motor to a piece of wood. In this instance I have a lot of floating floor pieces lying around so I just use that.

Then I attached the old CD with and opening to dispense the Candy.

The final Design after all being attached you can see in the final photo.

Step 2: Creating the Skull

It is not Halloween unless you have some pumpkin and skull. I was inspired by another instructables post on how make a skull from a milk jug. But I have a problem as I don't have a skull that I can use to mould the milk jug.

Enter the paper craft Skull. So I found an instruction thanks to Dali Lomo. I have attached the Skull template with this instruction.

Because the milk jug is smaller than the full size skull, during the printing I have resized my skull to be only 60% of the original size. It takes a couple of try to get it done correctly.

Once the cut out is printed, glued it to the cardboard. Then you can start cutting it out using the acto knife.

Step 3: Assemble the Cardboard Skull

You can follow the instruction from Dali Lomo in the previous steps to glue the pieces together. It is not that complicated. Glue everything together using the hot glue gun.

Step 4: Milk Jug Skull

Now, I learn a few things by making lots of mistake. I want to mould a milk jug into my cardboard skull. That should work right?

Wrong!. the hot air gun was melting my skull which is joined using the hot glue stick. So this is a fail which I see coming, but I try it anyway. So I use some fibreglass cloth and epoxy resin to cast my skull into a much solid material.

I have done this before when I am creating my Ironman Helmet and my Storm trooper helmet (I will save these for another post). The only problem is, I am using cardboard instead of paper. The cardboard is much more absorbent than paper, so my fibreglass cast is not as strong as I would like it to be.

So I have to completely redesign a simpler skull using a different technique which will give a much durable base. In the end I was creating my own skull (not terribly good looking) as the base to mould my milk jug.

Step 5: Connecting the Circuit

Basically we have the stepper motor being controlled via the stepper motor controller and connected to pin A3, A2, A1 and A0.

The Ultrasonic sensor pin trigger is connected to pin D4 and pin echo is connected to pin D3.

Assemble the circuit and upload the source code.

if you are connecting it differently, feel free to adjust the following section of the code:

//trigger and echo pins for HC-SR04 Ultrasonic sensor
const int trigPin = 4; const int echoPin = 3;
// Map the candy motor stepper pins to analog pins
const int motPin1 = A3; 
const int motPin2 = A2; 
const int motPin3 = A1; 
const int motPin4 = A0;

You can download the full source code here.

Step 6: Assemble It All Together

Now it is time to assemble everything together. Start with the base, where the stepper motor is connected to. Then Connect the candy holder and then put the arduino and the circuit into the milk jug skull, and connect the wire together.

I hope you like this build and have a safe and contactless Halloween.

Halloween Contest

Participated in the
Halloween Contest

Be the First to Share


    • Unusual Uses Contest

      Unusual Uses Contest
    • Made with Math Contest

      Made with Math Contest
    • Halloween Contest

      Halloween Contest