Drinks Serving Robot

This is the drink serving robot. It features a cup dispensing robot, a conveyor belt, automated drinks taps and a straw dispenser, all linked with an app making it the perfect machine for next party or just for your man cave. 

All of the robots are available for downloading with build instructions, electrical diagrams and example code to get you started on building your own. 

Downloads

STL files for 3D Printing

Drinks Dispenser:  Thingiverse

Conveyor Belt: Thingiverse

Cup Dispenser Robot: Thingiverse

Straw Dispenser: Thingiverse 

Parts Required

Conveyor Belt

(1x) PVC table cloth - AMAZON 

(2x) 680RS bearing (skateboard bearing) - AMAZON

(2x) Nema 17 stepper motor AMAZON

(2x) A4988 stepper motor driver AMAZON

(1x) Arduino Uno AMAZON OR (1x) Arduino Mega -  AMAZON

(8x) M3x8mm bolts (to connect nema17) AMAZON

(2x) M5x15mm bolts (for roller) AMAZON

Cup Dispenser

(2x) MG996R servo motor - AMAZON 

(1x) Arduino Uno - AMAZON

(10x) M3x16mm bolts AMAZON

(10x) M3x8mm bolts - AMAZON

(8x) M3 locking nuts - AMAZON

(10x) M3 nuts - AMAZON

(8x) M3 Washers - AMAZON

Drinks Dispenser

(4x) 12V DC Pump - AMAZON

(4x) 5V Relay Module - AMAZON

(1x) Arduino Uno (can be any microcontroller) AMAZON

Straw Dispenser

(1x) MG996R Servo Motor - AMAZON

(1x) Arduino Uno (can be any microcontroller) AMAZON

(2x) M3x16mm bolts (to connect legs) AMAZON

(1x) M3x40mm bolt (servo) AMAZON

Equipment

12V power supply - AMAZON or Bench power supply - AMAZON

Breadboard - AMAZON

Glue gun (though PVA or superglue works) AMAZON

 

 

 

Gallery

Build Instructions

20180717_200858.jpg
20180726_064022.jpg
20180816_224854.jpg

Step 1

Assemble the following pieces: Conveyor Belt, Cup Dispenser, Drinks Dispenser, Straw Dispenser. 

 

Step 2

Attach each dispenser to the conveyor belt using M3 x 16mm bolts.

 

Step 3

Connect all of the parts to an Arduino Mega (see wiring diagram below).

 

Step 4

Program the Arduino Mega (see coding below). 

Electronics

To connect this to an arduino you need to build a circuit to drive the stepper motors. This is really simple, you need 2 x A4988 stepper motor drivers - AMAZON and a breadboard. You will also need a 12V power supply at 2A. Below is a diagram for how to wire up the board.

Picture10.png

 

Code

Here is a basic example of how you would program each of the dispensers as separate functions and how to combine those functions in the main loop with a serial input. I used a smartphone to control the serial input via AirConsole, more info in the video. 

Arduino code

#include <Servo.h>
const int dir = 6; const int st1 = 7;  const int st2 = 8; const int en1 = 4; const int en2 = 5;
const int P1 = 31; const int P2 = 33; const int P3 = 35;const int P4 = 37; 
const int P5 = 39; const int P6 = 41 ; const int P7 = 43;const int P8 = 45;
int i = 2; int posi = 0; int Order[] = {0,1,0,1,0,0,0,1}; int CUP = 160; const int T = 1.5; 
Servo strawservo; int tar = 0; bool START = true; Servo cupservo1;Servo cupservo2;const int supply = 6;

void setup() {
  pinMode(dir,OUTPUT);pinMode(en1,OUTPUT); pinMode(en2,OUTPUT); pinMode(st1,OUTPUT); pinMode(st2,OUTPUT); //Conveyor
  digitalWrite(dir,LOW); digitalWrite(en1,1); digitalWrite(en2,1); //Conveyor
  cupservo1.attach(2);  cupservo2.attach(3); pinMode(supply,OUTPUT);  digitalWrite(supply,1); //Cup dispenser
  pinMode(P1,OUTPUT); pinMode(P2,OUTPUT); pinMode(P3,OUTPUT); pinMode(P4,OUTPUT); //pumps
  digitalWrite(P1,1); digitalWrite(P2,1); digitalWrite(P3,1); digitalWrite(P4,1);
 
  strawservo.attach(9);
}
void MoveBelt(int distance) {
  digitalWrite(en1,LOW); digitalWrite(en2,LOW); // Enable Belt
  for (int p = 0; p <= distance / 0.465; p += 1) { // calculate distance
    digitalWrite(st1,HIGH);  digitalWrite(st2,HIGH); //pulse stepper motor
    delay(T);
    digitalWrite(st1,LOW); digitalWrite(st2,LOW);
    delay(T);
  }
  digitalWrite(en1,HIGH); digitalWrite(en2,HIGH); //Disable Belt
}
void Cup() {
    digitalWrite(supply,1); //powersupply on
    myservo1.write(140); myservo2.write(25);//Strech
    delay(1000);
    myservo1.write(70); myservo2.write(95);//pull back
    delay(1000);
    digitalWrite(supply,1); //powersupply off
}
void Tap(int tapselect, int quantity) {
  float T = 1250 + 1000 *(quantity/38); 
  digitalWrite(tapselect,0); delay(T); digitalWrite(tapselect,1); delay(500);
}
void straw() {
  digitalWrite(supply,0);
  if (tar < 8) {tar++;} else {tar = 0;} 
  strawservo.write(tar*22.5);
  delay(1000); 
  digitalWrite(supply,1);
  }
void loop() {
  delay(500);
  if (START == true) { 
    Cup();
    MoveBelt(90); if (Order[0] > 0) {Tap(P1,Order[0]*25); CUP-= Order[0]*25; Order[0] = 0;}
    MoveBelt(48); if (Order[1] > 0) {Tap(P2,Order[1]*25); CUP-= Order[1]*25; Order[1] = 0;}
    MoveBelt(48); if (Order[2] > 0) {Tap(P3,Order[2]*25); CUP-= Order[2]*25; Order[2] = 0;}
    MoveBelt(48); if (Order[3] > 0) {Tap(P4,Order[3]*25); CUP-= Order[3]*25; Order[3] = 0;}
    MoveBelt(48); if (Order[4] > 0) {Tap(P1,CUP); Order[4] = 0;}
    MoveBelt(48); if (Order[5] > 0) {Tap(P2,CUP); Order[5] = 0;}
    MoveBelt(48); if (Order[6] > 0) {Tap(P3,CUP); Order[6] = 0;}
    MoveBelt(48); if (Order[7] > 0) {Tap(P4,CUP); Order[7] = 0;}
    MoveBelt(100); 
    START = false;    
  }
}