This vending machine holds three fun-size snickers bars and will vend one at a time using Arduino Uno and a servo motor.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Cut the Large Pieces to Make Up the Frame
2 - 12'' x 5.5'' (sides)
1 - 12'' x 7.5'' (rear)
2 - 8'' x 5.5'' (top and bottom)
1 - 4'' x 5.5'' (shelf)
1 - 12'' x 3.75'' (front panel)
1 - 6.5'' x 4'' (plexiglass)
1 - 5.5'' x 4'' (plexiglass door)
All of these pieces are 1/4'' wood.
Step 2: Put Together the Pieces
Put the pieces together using wood glue and lots of clamps so it can dry in the correct position. Also, to ensure a good fit for each piece, we cut rabbets on the ends of back, sides, and front panel pieces. This makes for a tight fitting box and the plexiglass can slide right into the space with hot glue as shown in the second photo.
Step 3: Hinge on the Back Access Door
On our vending machine our whole back piece was a door. We tried to create a magnet closing system as seen in the 1st photo on step two, but we later found out that it wasn't needed because our door would pop in by itself. As well, we used a piece of scrap wood as a handle on this door and the plexiglass access door on the front to retrieve the snickers bar. However, you could make this as fancy as you want.
Step 4: Sand, Stain, and Put on the Front Access Door
We sanded using a palm sander and we decided to go with a dark brown stain. To put on the front access door, we found out that simple masking tape acted as a good and flexible hinge instead of screwing into the plexiglass because that often results in cracking.
Step 5: Make the Slide-tube and Fit It Into the Shelf
We made the tube long and wide enough to fit three fun-size snickers. As one gets vended, another slides into place to be vended next. Our shelf sits about 3/4 of the way up inside of the box and the tube sits at an angle so gravity can't push down on the snickers as fast. We secured the tube and shelf using hot glue.
Step 6: Write the Following Program and Hook Up the Breadboard, Micro Controller, and Servo As Shown Above
On our project we used a head for the servo that had four prongs. On those prongs, we created a flap about the width of a snickers bar to hold the bars in the tube, but still only vend one at a time. We used a push button and one resistor.
Step 7: Secure Servo at Bottom of Slide-tube, Put All Devices in the Machine, Drill Power Cord Hole to Hook Up to the Micro Controller, and Drill a Hole for the Button on the Front Panel.
We secured the servo under the slide-tube by creating a cradle using popsicle sticks and hot-glue. We then basically shoved and secured all the mechanisms using tape and then we made a hole in the back door for the power cord to run through. Lastly, we made a hole on the front panel for the button to sit and we secured that using hot-glue.
Step 8: Have Fun With Your New Vending Machine!!!
Participated in the