# Low Rate Peristaltic Pump Fri 22 December 2023 Project peristaltic pump / low rate / off-the-shelf

## Summary

I have been trying to build a very low rate pump using off-the-shelf parts. The goal is to be able to run at rates from 0.1 mL/hr (or lower) to 1000 mL/hr( or higher).

The discussions below are some of the configurations, hardware, software and other problems I have faced.

## Current Status

• calculate formula and test
• DONE Do a sample run
• DONE run some sample tests to get sample data
• DONE graph the current data
• DONE use GSL https://www.gnu.org/software/gsl/ to calculate the linear regression formula coefficients
• use a calculated bresenham value instead of precalculating and saving in an array
• update arduino controller to use longer time base and more slots (to get lower possible rates) To Go Slower
• delete current test data and rerun tests with the new setup to recalculate pps to flowrate coefficients
• add the linear coefficients to the motor control
• run tests to gather a series of expected flow rate vs actual flow rate
• DONE set up a high resolution scale, see Acculab/Sartorius Scale
• DONE set up a Stepper motor, no feedback, with a peristaltic head, see (Current) Stepper Motor with Peristaltic Head
• DONE initially used a low resolution scale, see Ohaus Scale
• DONE set up a simple 12V motor, no feedback, with a peristaltic head see 12VDC Motor with Peristaltic Head

## Overall Strategy

The strategy I'm using is straightforward:

1. set up the pump and controller to be able to run at a wide range of speeds.
2. over a wide range of control values, calculate the actual fluid rate
3. use linear regression to find a formula that translates from the actual fluid rate to a control value, e.g. I want 2mL/hr, therefore I send "45" to the pump controller.
4. use that formula in the control software
5. confirm all is ok by retesting the overall system

## It's Easy

Step 1 is easy. The various pump controllers have a speed mechanism, and they take a control value of some kind to allow us to change the speed of the pump. Sometimes it is just a raw number (say from 0 to 255) or it could be a voltage or some other electrical value or signal (e.g. pulses per second).

Step 2 is hard. Its complexity is hidden in the words "actual fluid rate".

Step 3 is easy. The regression formula can be 1st order or higher to get a nice low R2 value. It could incorporate other variables in the future, e.g. time elapsed, fluid pressures, etc.

Non-linearity in the motor control or in the pumping mechanism can be smoothed out (up to a point) with higher order regressions. Note there is always the caveat of over-fitting to the data!

Step 4 is easy. As always, I need to watch out for floating point arithmetic errors and glitches.

Step 5 is easy - if we've solved the problems in Step 2!

Since this project is just to satisfy my curiosity, I probably won't be doing these extra tasks but, you never know...

• Testing across multiple motors, motor controllers and pump heads is probably a very good idea!
• Investigate the idea of adding a calibration facility. This could be another formula that tweaks just a little for each individual pump.
• Test the extremes.
• What is the fastest rate?
• What is the slowest rate?
• Test the exceptions:
• What happens if the fluid reservoir runs out?
• what happens if the tubing isn't primed correctly?
• What happens if you clamp an input or an output line?
• What if the power supply voltage isn't quite correct?
• etc.

- John Arrizza