This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)
This is an instructable detailing how to create my Super Mario themed Gumball machine. This machine works like the question blocks in the Mario games, so if you hit the bottom of the box, a gumball shoots out of the top.
- 1 Arduino
- 4 angle brackets
- 12 1/2 inch wood screws
- 2 foot by 2 foot 1/4 inch thick MDF
- 20"x10" of cotton fabric
- Cotton pillow stuffing
- 2' 1/2 inch PVC pipe
- 1/2 inch PVC 45 degree elbow
- 1/2 inch PVC tee
- 3D printer
- black project box
- Slow vibration sensor (https://www.adafruit.com/products/1767)
- TIP 120 transistor
- 1n4001 diode
- 1K ohm resistor
- 1 led
- 220 ohm resistor
- 24 V 400 mA push solenoid (https://www.amazon.com/gp/product/B00DN7P5UW/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1)
- 24V 2A DC power supply
- 24V to 5V buck type voltage converter
- Hot glue
- 1/2 inch diameter gumballs
- wood glue
Step 1: Wiring Up the Components
Connect everything as shown above. The buck type voltage regulator I bought had a USB output, which I connected directly to the Arduino for power. Use long wires to connect the LED and vibration sensor so they can be placed apart from the breadboard.
Step 2: Programming the Arduino
Write the above code to the Arduino
Step 3: 3D Printng
Print the stl files. The units should be in inches.
Step 4: Laser Cutting
Laser cut the above pattern into the MDF board or wood of your choosing to make the outside box.
Step 5: Assembly
Glue together the four notched sides of the box. Then, put the Arduino, breadboard, and voltage switcher in the black project box. Cut a hole in the lid of the project box to pass through the wires for the sensor and the solenoid. Cut the fabric into a square a little larger than the bottom of the box, and glue it to the very bottom with hot glue, passing the power cord out the bottom . Hot glue the sensor in the middle of the fabric bottom, then cover with a layer of cotton stuffing. Slide in the bottom wood plate above the pillow, passing the sensor wires through. Use screws to hold the bottom plate in place, having two screws on one side to also attach the angle brackets. Assemble according to the 3D model, and similarly use screws to hold up the top and attach the angle brackets. I decided to forego the LED, though it can be implemented if desired. Screw the box to a wall with the angle brackets. Decorate as desired. Fill the piranha plant head with gumball, plug in, and enjoy! Light taps to the bottom pillow will dispense gumballs.