How to Make an Automatic Coffee Pod Dispenser With Arduino

by Jacks how2s in Workshop > 3D Printing

4111 Views, 15 Favorites, 0 Comments

How to Make an Automatic Coffee Pod Dispenser With Arduino

coffee pod dispenser cover33.JPG

Ordinary coffee dispensers are plain, simple and boring. In this Instructable I will show you how to use a 3D printer, Arduino and servo motor to create The Automatic Coffee Pod Dispenser! Also it works with all Coffee pods under 45mm or 1.77 inches in diameter.

What You Need

IMG_2025.JPG

What You Need

  • 1x Arduino nano
  • 1x 6v AAA battery pack and batteries
  • 1x Servo Motor
  • 1x Push Button
  • 2x 15cm wires
  • 3D Printer (with print height of at least 195mm max print height)
  • PLA or ABS 3D Printing Filament
  • Soldering iron and solder
  • Hot glue gun and sticks
  • Wire strippers


3D Printing the Body

IMG_2011.JPG
IMG_2007.JPG
coffee pod 3d pic.png

The body was designed in 123d Design and is 50x50x195mm (LxWxH)

I printed the body with the following settings

  • Infill- 10%
  • Print Speed- 50
  • Supports- No
  • Filament- PLA 1.75mm
  • Quality- 0.2mm
  • Top and Bottom Thickness- 0.6mm
  • Wall Thickness- 0.8mm

Time= 6 Hours 15 Minutes

The STL Is available for download below

Wiring the Arduino

IMG_2029.JPG
IMG_2030.JPG
IMG_2031.JPG
IMG_2034.JPG

The wiring is simple,

  1. Start by connecting the red wire of the battery pack to the 5V or VCC Pin on the Arduino and the black to the GND Pin,
  2. Next connect the red wire of the servo motor to the 5V or VCC Pin on the Arduino, the brown wire to the GND Pin and the yellow wire to Pin 11,
  3. One terminal of the switch can be connected to the GND Pin of the Arduino and the other terminal can be connected to Pin 0 or TX0

Done!

Coding the Arduino

IMG_2035.JPG
IMG_2036.JPG

Below is the code in text. You can also download the code at the bottom!

#include
Servo myservo; // create servo object to control a servo // a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position int button = 0; // The button will be on Pin 7

void setup() { myservo.attach(11); // attaches the servo on pin 9 to the servo object pinMode(pos, OUTPUT); pinMode(button, INPUT); digitalWrite (button, LOW); }

void loop() { if (digitalRead(button) == LOW)

for(pos = 0; pos < 90; pos += 90) // goes from 0 degrees to 90 degrees { // in steps of degree myservo.write(pos); // tell servo to go to position in variable 'pos' // waits 1s for the servo to reach the position } if (digitalRead(button) == HIGH) for(pos = 90; pos>=90; pos-=90) // goes from 90 degrees to 0 degrees { myservo.write(pos); // tell servo to go to position in variable 'pos' }delay(50); // waits 50ms for the servo to reach the position

}


Credit goes to this forum

Extending the Servo Arm

IMG_2037.JPG
IMG_2038.JPG
IMG_2039.JPG
IMG_2041.JPG

Start with a 5mm wide icy pole stick and cut a grove in the middle, then glue the stick onto the servo motor keeping in mind it should be small enough to fit through the hole on the back of the body, so make it about 3cm long.

Gluing the Parts Onto the Back

IMG_2042.JPG
IMG_2054[2].JPG
IMG_2055[1].JPG

Now that your body has finished printing you can begin to glue the parts onto the back. Start with the servo motor by gluing it upside down and positioning it so the stick fits through the hole freely. then glue the Arduino and Battery Pack wherever they fit. The button can be glued on the side.

Fill the Dispenser With Coffee Pods

IMG_2050.JPG

Now you can start to fill the dispenser with coffee pods and insert the batteries into the battery pack.

Wow, It Works!

How To Make A Automatic Coffee Pod Dispenser!

Pressing the button should activate the servo motor and the servo motor should push the coffee pod out as shown it the video.

Thanks for checking out this Instructable! If you liked it please vote for it in the Automation Contest! Also Remember to check out my website Here

http://jackshow2s.weebly.com/