How to Make a One Foot Tall Portable Vending Machine (With Arduino and Servos) in 8 Steps

by nguye853 in Workshop > Home Improvement

3233 Views, 20 Favorites, 0 Comments

How to Make a One Foot Tall Portable Vending Machine (With Arduino and Servos) in 8 Steps

IMG_0801.JPG

This inscrutable will show you how to make a decent size portable vending machine, using an arduino, breadboard, servo motor, and push button.

The Sides:

1st (Two Pieces of 3 1-2- Width Wood For the Sides) One Foot Length Sides.JPG

Cut Two Pieces of Plywood with the Length of 1' and a Width of 3 1/2".

Both Plywood Must be at Equal Measure (Obviously).

Cutting the Bottom and Top:

2nd.JPG

Cut Two 1x4 Pinewood with a Length of 8".

This pinewood will be used for the bottom and top of the portable vending machine.

Drilling:

3rd (Bottom is 8-).JPG

When you're Finished with the Top and Bottom of the Vending Machine Use a Drill (Recommended 764 Drill Tip) to Screw in the Bottom of the Vending Machine.

You could also screw in the top with the exact some procedure, though not recommended since you will be building on the inside of the vending machine to fit in the candy, arduino, and other objects like wires.

Also, make sure you screw the sides and bottom stacking onto each other.

Making the Dropbox:

IMG_0787.JPG
IMG_0795.JPG

Using plexiglass for the box where the candy will drop (First Picture), it will need to be 3 1/2" on all sides expect for the top which will have no plexiglass on it (see the second picture) because it will be the hole for the candy to drop into.

The Insides:

Insides.JPG
Glass of Candy.JPG

The insides of the vending machine will have two boxes in them, one (on the top) will be the one containing the candy. The bottom one is the previous box we built which is where the candy will be dropped to. The top box has two wooden 1x4 pine wood that we used earlier, the size is 3 1/2" Width by 3 1/2" Length and will form and "L". Now cut a hole about half the size of the "L" (look at the pictures for clarity). Cut a half inch deep hole on one of the sides of the vending machine (start towards the middle of one of the sides of the vending machine). (Optional): Cut 2 More pieces of Plexiglass for the 2 open sides of the "L" Box.

Arduino Code:

Arduino (Birds Eye).JPG
Arduino (Side View).JPG

Using an arduino, set up the wires, servo, and breadboard as shown in the picture.

Next copy and paste this code:

#include
Servo myservo;

int pos = 0;

void setup() { myservo.attach(9); }

void loop()

for(pos = 0; pos <98; pos +=1) Second Try
{ myservo.write(pos); delay(3); } for(pos = 109;pos>=0; pos-=1) { myservo.write(pos); delay(3);

Putting the Arduino Inside the Vending Machine:

IMG_0800.JPG
IMG_0801.JPG

Gently put the arduino, breadboard, and servo motor in the space between the "L" box and the right side of it. (In the picture is some pinewood that is glued along halfway of the vending machine, cut a 1/2" hole near the "L" box as shown in the pictures) Make sure to put the servo motor at the lowest part of the "L" this will be the support for the candy before it drops.

Final:

You're done, that's all. There are some options to make some accessories too, like a handle bar for the glass container to pull out the candy. Also, you could put some handles on the top of the vending machine to carry it around with you.