Controlling a Dispenser with an Arduino Uno

Hey everyone!

I've been attempting to control my Bartendro Dispenser with my Arduino Uno for the past few weeks. I've been getting the pump to work intermittently, but it often shuts off without warning, or will randomly start and stop pumping commands, but usually the pump doesn't respond at all. I have been unable to make any serial contact with the pump using the "!" or "?" as suggested. (I have tried switching the Tx and Rx around as often suggested in other help forums.)

Accessory parts I've been using include the RJ-45 Connector and RJ-45 Breakout as suggested on the "Control a Dispenser from a Computer"guide on this same site, as well as a 12 Volt Arduino adapter as the power source (I have also tried hooking an 18V power supply with no results). The code I've been using is shown below; it is designed to first establish communication with the pump, then have it start/stop pumping for a short amount of time in a loop. Does anyone have any suggestions for improving this code, or does anyone have a piece of code they have gotten to work with their Pump/Arduino setup that they would be willing to share?

Thanks everyone.

#include <SoftwareSerial.h>  

SoftwareSerial mySerial(0, 1); // RX, TX

void setup() {
  pinMode(0, INPUT);
  pinMode(1, OUTPUT);
  mySerial.begin(9600);
  delay(100);
  mySerial.println('!');
  delay(1000);
}

void loop(){
    mySerial.write("tickdisp 50 255/n/r");
    delay(5000);
}
Answer this question I have this problem too

Is this a good question?

Score 2

Comments:

I was able to get pump going using code below, however, It does not work consistently. For example, I run it the first time and then cut the power so that I can upload a new sketch and it doesn't work again. Not sure what the issue is... maybe I have a bad pump???

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

byte d=0xFF;

void setup() {

pinMode(2, INPUT);

pinMode(3, OUTPUT);

mySerial.begin(9600);

delay(100);

mySerial.println("!!!");

mySerial.println("?");

mySerial.write(d);

}

void loop(){

mySerial.write(" tickdisp 50 255\n\r"); // tickdisp <ticks> <speed>

delay(500);

}

by

Hey Rishimanda59. Have you been able to get a fix for the issue above? I have had a similar problem where the dispenser does not work at times.

by

Add a comment