Automatic bartender

  • I wrote here earlier but now I really don´t know what to do.

First of all, couple words about my project. It should be automatic/robotic bartender, You will choose some drink and it ll prepare it for you.

  • There are 3 stepper motors (Nema 17 17HS4401), one for x axis and other two are connected together for y axis (I will post a link to video)

  • Arduino Uno R3, Motor Shield L293D, 2x DRV8825 motor driver, 8xAA batteries, old PC source 300W, bluetooth HM-10, 12V battery from Accu-Drill

  • So when I started working on this project I used Motor Shield L239D (now I know that it´s just for 600mA and these motors has 1.7A) it worked but microchipsets were little bit overheated.

  • I decided to control my program/motors via bluetooth mobile (digital pin 4TXD and digital pin 5RXD) and mobile app (Serial Bluetooth Terminal 1.12) but two problem appeared:

  1. Somehow I managed to communicate with PC → Mobile , Mobile → PC but when I wanted to use motor, where u must define AF_Stepper motor1(48, 2); , that second number 2 makes problems.
  • It´s pin, on which side u have connected motor (there are just 1 and 2).
  • When I compilated code It should write “Ready” on Serial monitor and mobile bluetooth serial monitor but instead just random characters showed up.
  • When I use (48, 1); everything is “all right.”
  • So where is the problem here ?
  1. Even if I used (48, 1) and there wasn´t any problem in communication I can´t move with the motor, I used If, Switch, While and nothing works. If I type “1” on Mobile on PC it just show Drink is ready but motor does nothing. I don´t know where I´ve made mistake.
#include <SoftwareSerial.h>
#include <AFMotor.h>

AF_Stepper motor1(48, 1);

#define serialRx 4 //RX PIN NUMBER
#define serialTx 5 //TX PIN NUMBER

SoftwareSerial BTSerial(serialRx,serialTx);

void setup() {
void loop() {
  //From Phone to PC (SerialMonitor)
  int inChar ;
  if (BTSerial.available()) {
      inChar =;
    case '1':
   Serial.println("Drink is ready");
   motor1.step(300, FORWARD, INTERLEAVE);
    case '2':
   Serial.println("Drink isn´t ready");
  //From PC to Phone

  if(Serial.available()) {

I think I´ve connected my bluetooth module right, i checed it milions times, and module shouldn´t be broken, in that case wouldn´t work at all. Motors are also working I tried run them separately from Bluetooth communication.

After all of this one guy suggested me to buy DRV8825 motor driver, but I have no idea how to connect it with the motor, I saw a lot of tutorials and so on but somehow nothing works, especially I don´t know how to connect A1 A2 B1 B2 with motor so maybe there is problem :smiley:

Below are all needed link and so on

Sorry for my broken English ._.

  • So when I started working on this project I used Motor Shield L239D (now I know that it´s just for 600mA and these motors has 1.7A) it worked but microchipsets were little bit overheated.

not sure if you had any sort of question.....

but this piqued my interest.

the L239D... do you mean L293D ? the DIP version ? then yes 0.6A

as for motors and chips, yes, they do get hot. on a machine-tool stepper, the rule of thumb is that if you can lay your hand on the stepper for more than 10 seconds you are not feeding it enough power. if you see smoke, or you cannot hold your hand on it for more than an instant, then you are feeding it too much power.

steppers and power drivers will get hot, and the data sheet does offer ranges of tolerance.

if you feed your steppers with 0.6 amps, they will not have as much snap and pop as if you feed them with the full power. but like drivng your car at less than full speed, it should not be a problem.

also, for steppers, if you have a robot, you can shut off the power and just re-zero when you start back up. I assume your bartender will not be running full blast all the time. steppers have a 'natural step' you can feel it when you move it by hand, like it is cogging from one postion to the next. a microstepper will move between these steps with a smoothness that allows for faster acceleration and deceleration and higher speeds. but that all depends on the generated pulse train.

think of running downhill at your fastest speed, then stop for one quarter second every 20 steps. you will fall on your face the first time. the stepper needs that very exacting pulse train to run smoothly.
also, the micro-stepping does not equate to positional accuracy, it is for smooth motor movement in accell, decell and speed. that said, if your program thinks you are at 1.7 steps, and you loose power and the magnets move the rotor to the nearest natural step (magnets will do that ) and you re-start thinking you are at 1.7, but are really at 2, then everything you do from that re-start if off by 0.3 steps.

it is for this reason that it is suggested you do not shut off the power.
but, knowing that, you can shut off the power and re-zero and eliminate the condition.

However, getting the correct drivers is not as important as understanding what you are trying to do, WHY do you need a device that can move 2 kilos when you are pushing feathers ?

just because your motor CAN use 1.7A does not mean you MUST run it with 1.7A.

the answer is that a "PROPER" driver is one that works. like a "PROPER" program is one that works
no one cares, and certainly the motors, drivers or mixed drink do not care a whit if your program is clunky and full of delay() or if your driver is running hot or cannot do 1/16 microsteps or needs 2 or 4 pins to drive.

all that said, did you have a question in your post ?

Yes I thought L293D

And what about that bluetooth communication ?