Introduction: Halloween Candy Machine

About: Howdy, we are application engineers in Seeed. Sharing projects with the maker community is awesome. Hope you like it XD Seeed is the IoT hardware enabler providing services that empower IoT developers to swift…

The Halloween is coming! And candy is an integral part of Halloween.

So these day we have made an automatic candy machine for Halloween. You could get a candy just with your stored fingerprint! Is it funny and cool? Let's make it with us!

Step 1: Hardware Preparation

Step 2: Wiring

I connect Grove-OLED Display 0.96" to I2C_2, Grove - Button(P) to GPIO_50, Grove - PIR Motion Sensor to A0, Grove - Fingerprint Sensor to UART1 and servo to P8_13 pin on the Grove Base Cape for Beaglebone as the picture above.

Please note that servo need to work with an extra 5V power(as BBGW can't provide enough current). And it means that the extra power needs to connect its GND to BBGW. The bread board is for this.

Step 3: Software Work

git clone <a href="https://github.com/jerryyip/candy_machine.git"> https://github.com/jerryyip/candy_machine.git</a>
  • Test it
python candy_machine.py
  • How to use?

When the pir sensor detects someone nearby, the fingerprint sensor will start to blink one time per second, then you could place your finger on it . If you have stored your fingerprint before, the servo will work and give you a candy. And if you don't, you can't get anything.

So how to store a fingerprint? Press the button for about 2-6 senconds, then the fingerprint sensor will start to blink 2.5 times per second, much more fast the before. Then you could place your finger---move your finger---place the same finger again on the fingerprint sensor according to the guide in the OLED to store your fingerprint.

Step 4: Shell Materials Preparation

Structure part:

  • M3*60 Pillar —— 6 PCS
  • M3*35+6 Pillar —— 4 PCS
  • M3*20 Pillar —— 2 PCS
  • M3*10+6 Pillar —— 2 PCS
  • M3*5+6 Pillar —— 3 PCS
  • M2*10 Pillar —— 3 PCS
  • M3*8 Screws —— 23 PCS
  • M2*8 Screws —— 3 PCS
  • M3 Nut —— 7 PCS
  • M3*10 Nylon rivet —— 1 PCS
  • Double-sided adhesive tape
  • Screws Driver

Step 5: Laser Cut the Wood

In this part, we need to make an box as the picture below shows, you can download the drawings here.

Then we need to cut the the board using laser cutting. I guess you don’t have a laser cutting at home, you can find some in the hacker space near from you easily. If there's no hacker space nearby, you can try the Laser Cutting Service supply by Seeed.

Here's we use 3mm wood~

Step 6: Assemble and Install the Wheel

  1. These round parts glued together, with a square board inserted in the middle of the square hole to determine the location, convenient to other parts aligned, attention the parts has hole are on both sides. (Image 1,2)
  2. Install the plastic parts used to connect servos, here we need to use self-tapping screws, we have to use more power to fix these. (Image 3)
  3. We can find a candy put it to the wheel, check whether it is working properly (Image 4)

Step 7: Installation Candy Warehouse

This part is easy, just use pillars fix 5 woods. Nothing special to note~

Step 8: Install Hardware on the Wood

  1. Fix 6 M3*60 pillars on the wood.
  2. Use M3*5+6 pillars fix BBGW on the wood.
  3. Use stickers fix breadboard, battery, grove - IR sensor and fingerprint reader.
  4. Use M2*10 pillars fix grove - OLED
  5. Fix servos and wheel on the wood.
  6. Install wood cover

Step 9: Install Candy Warehouse

Put candy warehouse on the box we just made. then we can put the candy and test.

PS: If the candy size doesn't match the wheel, we have to adjust the wheel size~

Halloween Decor Contest 2016

Participated in the
Halloween Decor Contest 2016