Arduino with HARVARD PHD 2000 syringe pump

Hi all members.
I want to integrate my syringe pump that is HARVARD Apparatus PHD 2000 infuse/withdraw with the Arduino. I have written the code as well for integrating but I failed. If anyone help me to sort out this issue I shall be very thankful to you.
The code i used for the program is attached

include <SoftwareSerial.h>

SoftwareSerial pumpSerial(2, 3);


void setup()
 {
  Serial.begin(9600);
  pumpSerial.begin(9600);
  delay(1000);

  configurePump();
 }


void loop() 
{
  // Set flow rate to 1 µL/min
  pumpSerial.println("44 RAT I 1 UM"); // 44 used: beacuse Address on syringe pump i adjusted to 44,UM used: because i usd the flow rate uL/min
  delay(500);
  pumpSerial.println("44 RUN");
  delay(500);

  // Read current flow rate
  pumpSerial.println("44 RAT");
  delay(500);
  
  while (pumpSerial.available()) 
   {
    Serial.write(pumpSerial.read());
   }
  
  delay(5000);
}

void configurePump()
 {
  pumpSerial.println("44 MOD INF");
  delay(500);
 }

The procedure to combine both is attach in the picture

You need the "pound/hash" as the first character in this line... looks like this...

#include <SoftwareSerial.h>

Be cautious with SoftwareSerial. It is nice but has limitations. It is basically half duplex, it cannot receive and send concurrently. Also above 9600 baud it starts having problems. If you have to exceed 9600 consider another processor such as the Mega, same code but it has three free serial channels.

Thanks Sir for the correction, is there any thing else, that I need to amend ?

Dear Sir, i will not go beyond 9600 Baud rate, anything else, that i should amend in the code ?

I have checked the program again, the pound/hash is already present in the program, but when posted on the forum, its missing, its my mistake, anything else for amendment that you recommend me to do, kindly let me know, because this program is not working

You must describe how this is not working. Also, show a wiring diagram.

1 Like

Is the pump configured as a DCE or DTE? Check this link: https://www.analog.com/media/en/technical-documentation/product-selector-card/rs232%20quick%20guide.pdf

All RS232 devices that use a DB-9 connector should conform to the standard TIA/EIA-574. The device should be either DCE or DTE. DCE devices should have a female DB-9 connector, and DTE devices should have a male DB-9 connector. For a description of pin outs for the RS232 DB-9 connector see attached document "PinoutStndrds.pdf" from Cisco. Any RS232 device that has a DB-9 connector and conforms to this standard will connect easily to the Digi PKG-R (PKGR) or development kit radio modems. Also what voltage levels are involved, normal RS232 uses positive and negative levels from +_3V to +- 25V if my memory is correct. There are a lot of violations to these standards and mis labeled RS232 when they are not. Many wrongly call an asynchronous communication as RS232.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.