Final Project: Mini Vending Machine

by alexc86 in Circuits > Arduino

99 Views, 3 Favorites, 0 Comments

Final Project: Mini Vending Machine

Front vending.jpeg

This Instructable shows how to create a mini vending machine using a 3D printer and a laser cutter.

The features include:

  • 4 slots to dispense items
  • 3 coin intake slot (5c, 10c, 25c)
  • LCD screen that displays information
  • Button to switch between / dispense items

Supplies

Arduino Uno

At least 4 600x400 3mm sheets of wood

Access to a laser cutter and 3d printer

LCD screen (preferably 16x2) with 4 prong adapter

Assortment of wires

4 smaller bolts (1.2mm thick) and nuts and 2 regular sized ones (2mm thick)

3 Infrared sensors

1 Button (Vex is used here but any type will do)

4 Continuous servos

Decent amount of 3D print filament

Canadian Quarter, dime and Nickle

Glue

Screwdriver

Assemble Coin Counter

middle sorter.jpeg
top sorter.jpeg
Base of coin sorter.jpeg
sensor glued.jpeg

The coin counter uses infrared sensors to check what type of coin has been imputed and then stores the coins in the bottom drawer.


  1. First print all of the pieces attached to this step.
  2. Next screw each infrared sensor to its attachment piece so it can be glued onto the main frame
  3. Then glue each sensor into place as seen in the photo
  4. Next glue each piece together one on top of the other. (First the bottom drawer, sensor holder, slanted piece and then the coin slots.)
  5. Let it dry

Assemble Box

box inside.jpeg
box side.jpeg
box back.jpeg
  1. Laser cut the attached pieces onto 3mm wood
  2. Next glue the bottom, front and two side pieces together and let them dry
  3. Glue the back pieces together as shown in photo

Downloads

Assemble Servos

servo assembled .jpeg
servo in box.jpeg
  1. Use the servo attachments printed in step 1
  2. Using bolts, attach each piece to a servo
  3. Then glue each servo into place

Assemble Everything

front together.jpeg
back electronics together.jpeg
button and lcd in place.jpeg
  1. Attach the button into its slot using 2 bolts and nuts
  2. Attach the LCD screen using 4 bolts and nuts into its slot
  3. Place the coin counter so that a coin will fall onto the track and tape or glue it

Photos are attached for each step.

Wire Everything

  1. Wire each of the four servos into pin slots 11,10,9 and 5 respectively
  2. Wire the 25c sensor into slot 4, the 5c into 12 and the 10c into 8. Also wire the ground and vcc into any remaining pins(on left side of board)
  3. Wire the button into pin 2
  4. You will also need to soder the attachment to the LCD screen
  5. Wire the LCD screen into gnd, 5v, SDA -> A4 and SCL -> A5 (on the right side of the board)

Run Code

  1. Download the attached code and upload it to your Arduino

Finished / How to Use

To use the vending machine, input your money (either 5c, 10c or 25c coins) and then press the button to cycle between all of your options. Once you decide which slot you want to dispense, hold the button. Then your item will be dispensed.


What I Would Add With More Time

  • I would make spirals out of metal or with the 3D printer so that actual items could be dispensed
  • I would sort the cables better so they are not in the way
  • I might add some sort of light on the inside because it is quite dark
  • I would laser cut a plastic panel to go on the front to make it look more like a real vending machine
  • I would add some type of swinging door for the item retrieval
  • I might spray paint the box