The Social Distancing Halloween Candy Robot

by dtan19 in Circuits > Robots

6565 Views, 42 Favorites, 0 Comments

The Social Distancing Halloween Candy Robot

IMG_8342.jpg
Screen Shot 2020-09-12 at 3.48.04 PM.png
IMG_8335.JPG
IMG_8259.JPG
Screen Shot 2020-09-14 at 9.10.39 PM.png
Screen Shot 2020-09-14 at 9.14.06 PM.png
Screen Shot 2020-09-14 at 9.15.51 PM.png
Screen Shot 2020-09-14 at 9.17.14 PM.png
Screen Shot 2020-09-14 at 9.18.42 PM.png
Screen Shot 2020-09-14 at 9.26.58 PM.png
Screen Shot 2020-09-14 at 9.28.37 PM.png
Screen Shot 2020-09-14 at 9.29.50 PM.png
Screen Shot 2020-09-14 at 9.31.52 PM.png

If you're looking for a fun new way to interact with this years Halloween trick-or-treaters and you're up for the challenge that this project brings, then jump right in and build your own!

This social distancing robot will 'see' when a trick-or-treater walks up, and dispenses a mini candy bar. The project utilizes an ultrasonic sensor as the robot's eyes.

Supplies

Materials

  1. 5-6 square feet of plywood (1/2” thick is recommended)
  2. Spool of PLA, One or more colors

Electronics

  1. 1 - Arduino pro mini (or nano)
  2. 2 - 28byj-48 5v stepper motors with ULN2003 controllers
  3. 1 - 28mm Speaker
  4. 1 - Audio Amplifier
  5. 1 - Ultrasonic Sensor
  6. 1 - SD Card Module (micro or regular)
  7. 1 - USB power adapter board
  8. 1 - Battery Power Supply. At least 4400mah
  9. Various jumper wires to connect everything together

Tools

  1. Screw driver
  2. Drill
  3. Saw (or CNC)
  4. 3D printer
  5. Soldering iron
  6. Wire strippers
  7. Hammer

3D Print Robot and Mechanics

IMG_8241.JPG
IMG_8272.JPG
IMG_8259.JPG
Screen Shot 2020-09-14 at 8.42.07 PM.png
IMG_8312.JPG

Download all STL files and print in the colors of your choice. The largest parts require at least a 150mm cubed print volume. While your parts are printing you can prepare any of the parts form steps 2-3. Please note that you will need close to a full spool and about 30 hours of print time. I'd recommend designing a smaller robot if you do not want to put in the time and material.

I grouped parts together as follows:

Using Black PLA

  • Turn blade
  • Catch Slide
  • Hopper Funnel
  • Hopper Holder
  • Legs, Arms, and Neck

Using Grey PLA

  • Face, and Head
  • Chest Halves

Cutout the Candy Box

IMG_8335.JPG
Screen Shot 2020-09-14 at 8.28.25 PM.png

We’ll first cutout the wood box. If you decide to use the included 3D print files. Be sure that the inside dimensions fo the box are 150mm x 150mm, and at least 300mm tall. I chose to use a 1/2inch thick plywood, and I wouldn't recommend going any thinner than that, it gets too hard to assemble it.

I first cut out the front and back pieces at 174mm wide on the table saw. I then cut the sides to 150mm wide. After that I cut everything to the same length at 300mm, and I cut the front piece to 312mm.

You can assemble the box using screws, nails and or glue. I opted for #15 finishing nails from Home Depot. These were fairly easy to nail in. I nailed the back piece to one of the side pieces in top and bottom corners, then nailed the other side piece in place. I used a vise to hold the starting piece. Once I had the back side nailed up. I placed the face panel on and nailed it in place. I then added 4 more nails in the middle, one per edge, and 2 per front and back.

Wire Electronics and Load the Code

IMG_8332.JPG

See the wiring schematic for wiring diagram (Note: that the wiring diagram does not cover the ground or power/vcc wires, and assumes you have a basic understanding of how electronics work). Download the Arduino Sketch file and flash to the logic board.

I used this site https://www.text2speech.org/ to generate some robot-y sounding audio. It was very easy to create all files separately, and it was absolutely free to download. I broke them into 4 separate files so that I can call each one at a different time in the code. Please note that you will need to make sure these are exported at 8000hz, 8bit mono. A lot of people recommend Audacity to handle the conversion of files. I used Adobe Audition.

Here is the text I came up with, but feel free to have fun with it.:

hello.wav

"Hello Human,

I am a Social Distancing Robot!"

invite.wav

"I see you are here for halloween goodies. Please come up one at a time."

treat.wav

"Here is your treat. Ok, who's next?"

goodbye.wav

"Be sure to stay 6 feet apart. Happy Halloween!"


FULL Disclosure: I had a hard time getting the audio to work with the steppers. From my research, they both are trying to work on the same chip timer, and require additional code/libraries to work. I'll update this Instructable as soon as I have a resolution, or if you have any tips please leave them in the comments.

Assemble Dispenser Mechanism

Screen Shot 2020-09-14 at 8.56.05 PM.png
Screen Shot 2020-09-14 at 8.55.33 PM.png
Screen Shot 2020-09-14 at 8.56.50 PM.png

We’ll first assemble the turn-style, and mount to the very bottom part of the box. This will help us to set the height of the hopper funnel so there is adequate clearance. If you mount it too closely to the turn blade, the the candies can get stuck :(

Before you install the hopper funnel, you’ll need to glue the funnel and the holder together. Please take note of the orientation so that everything lines up. Install the funnel from the top down and find the right alignment for the turn-style. Use a set of screws to mount the hopper assemble from the 2 sides of the box. You'll need to measure to get the height set correctly.

Assemble and Mount Robot

IMG_8329.JPG
IMG_8330.JPG
IMG_8326.JPG
Screen Shot 2020-09-14 at 9.04.12 PM.png
IMG_8324.JPG
IMG_8332.JPG
Screen Shot 2020-09-14 at 9.01.26 PM.png
Screen Shot 2020-09-14 at 9.02.44 PM.png

First, glue the chest halves together using a super glue or something suitable for PLA.

Next, install the speaker, ultrasonic sensor, and the stepper motor in that order into the face first. Route the wires through the neck. Wait to install the back side of the head until after we’ve tested everything in step 5.

Route the wires through the chest, and be sure to place the head stepper motor controller into the chest cavity, as the wires will not reach all the way through the legs. Continue routing the wires down through the legs.

Assemble the head into the neck piece by pushing it into the slot. Finish gluing the arms onto the robot and glue the legs if you prefer. Mount the robot to the top of the of the box feeding the wires through a 1/2 inch hole in the top of the box. Connect the appropriate wires to the Arduino, and necessary power supply.

Connect up any remaining electronics, connect your battery power supply, and test everything to make sure everything works.

Test Everything!

Social Distancing Candy Dispensing Halloween Robot Testing

It's likely you'll have to work out a few kinks in this project as it it quite complex to put together.

Load With Minis Candies and Enjoy

IMG_8341.JPG
IMG_8343.JPG
IMG_8344.JPG
IMG_8346.JPG
IMG_8347.JPG
IMG_8340.JPG

After you’ve tested everything. Load with about 10 pieces of mini's candy bars, and test again to make sure everything works. You'll have to remove the Twix from the mix since that shape is not the same as the others.

When you’re ready to pass out candy, make sure you’ve charged up your battery supply, setup and enjoy a socially safe distance and let your robot do the work!