Hi all, i'm totally newbie here and i would like to seek some advises to automate my chemistry research that involve system automation. What i currently doing is to automate a chemistry experiment that involve several steps and one of these is to deliver a solution in different speed using a programmable pump. Attached is the picture of the pump's controller board. This pump is normally connected through RS232 to PC serial port. It can be controlled by heperterminal in Window using the commands provided by the manufacturer.
My main problem is as I'm currently using the audrino uno (and audrino Mega in coming second project) to control the rest of the experiment procedures, can i also integrate the pump control into audrino as well (instead of using hyperterminal in window?) ? preferably to use my Mac air to control audrino board and from audrino board to control the pump. i realize that there are serial pin available on arduino uno (pin 0-Rx, pin1-Tx) as well as the serial monitor function but after searching through some previous posts i'm bit confused as I'm totally new with arduino at the moment.
I'm hoping to get some clear advises and if possible a detail solution with my problem. Thanks in advance.
Sounds quite feasible. Note though that the voltage used by the arduino serial port and the PC port are not the same - you will need to convert them. A MAX232 chip is often used for this purpose.
You should be able to connect the two. As wildbill said you should use an RS232 transceiver chip and of course you need to know the format of the data expected by the pump, ie # of data and stop bits, parity etc.
Using pins 0 and 1 on a Uno can sometimes be an issue because those pins are already used by the USB interface. If this is a simple and/or slow protocol you can use SoftwareSerial on two other pins.
Also the GNDs of both devices need to be connected together.
Thanks for your fast reply. I just received the MAX 232 chip yesterday and i tried to control the pump according to the advises this morning. I'm now using a Audrino Mega 2560 as i need quite a lot of digital pins and serial pins to control other TTL devices later on.
After trying few different options, i failed to receive any responses from the pump. I hope that i'm able to receive some simple sketch example from you based on the information below.
"i'm using Mega Serial3(Tx3 pin14,Rx3 pin15) as the serial pin to connect to the Max232 chip(pin 11&12) and from pin 13&14 of Max232 connect directly to the pump RS232 (Txd,Rxd)pin and grounded.
The pump can be controlled by Hyperterminal (tested and it work but i hope that i can directly use the audrino platform to control all my other devices) with these settings: Baud rate:9600, Databits:8, parity:none, stopbits: 1, flow control:none. The command is base on the ASCll. One of the example of command to initiate the pump is /1W4R
As i'm totally a newbie with limited knowledge on the Audrino programming, It will be a great help if any of you able to show me a simple example how should i write the sketch. I'll keep on trying at the mean time and thanks in advance.
All the pin connections sound right, but sometimes a device labels the pins according to what it expects to be connected, eg Tx on pump may be expecting a Tx signal from the Arduino. It's a long shot but swapping the pins might help.