I am attempting to use an Arduino Uno with a SparkFun USB host shield to retrieve serial data from a USB CDC device (fluid infusion pump) by periodically polling it.
Harvard Apparatus Pump 11 Elite
I have successfully retrieved USB description information (see attached .txt file) from the device using the host shield.
To poll the device I need to enter:
status\r\n - they both seem to work. In response, the device gives its current infusion status:
\n166666666666 71691 10976820318950 I..TI.\r\n>
Target volume reached
\n166666666666 71691 10976820318950 i..TIT\r\nT*
\n166666666666 71691 10976820318950 i..TI.\r\n:
Not infusing (stalled)
\n166666666666 71691 10976820318950 i..STI.\r\n*
\n166666666666 71691 10976820318950 W..TI.\r\n<
166666666666 = infusion rate in femtoliters per second —> 10 mL/min
71691 = infusion time elapsed in milliseconds —> 71.691 s
10976820318950 = infused volume in femtoliters —> 10.976 mL
I have attached an example snapshot of a RealTerm output between my device and PC.
My end goal is to extract the infused volume, convert it to milliliters then output a PWM-filtered signal proportional to its output so that I can record the analog value with my data acquisition system.
At this moment I have been trying to modify the ‘acm_terminal’ example code for the data extraction portion of this, but I need a bit of help…
So far, I have modified the ‘acm_terminal’ code to send
status\r\n instead of performing a Serial.read() if serial is available, and it is printing out a “1” each time.
This acm code uses 64 as the max packet size, while the USB description of the device uses 40. Wondering if there are other adaptations that will likely need to be made to get this working…
Thank you for your time!
infusion_pump_usb_desc.txt (1.32 KB)