Hi everyone.
I'm trying to build an IV infusion (saline solution) controller using the Raspberry Pi. I have a system in place that uses IR beams to detect the falling liquid drips inside the drip chamber and at every new drip calculates the current DPM (drips per minute). I want to feed that information into a controller that can squeeze or release the little hose, always comparing the current DPM to a set initial one determined by the user, constantly adjusting the DPM to its desired value.
I've tried to use a couple different stepper motors coupled with an eccentric shaft for the control part, pressing the hose against a fixed plane surface (clockwise squeezes, counterclockwise releases) but I found them unrealiable and some of them even weak.
I went and bought a servo motor with 13kgf/cm of torque which should be more than I what need to completely squeeze the hose and stop the fluid flow.
I'm using Joan's pigpio library to control it but I can't move the motor by smaller increments. All I can do is go from increments of a 100 (e.g. set_servo_pulsewidth(pin, 1100); set_servo_pulsewidth(pin, 1200))
My servo doesn't change its position from the two previous examples if I do for instance set_servo_pulsewidth(pin, 1150)
For this type of control I'd like to change the servo's position by degree, even less if possible.
Is it my servo that just can't do that?
Is there another way that could maybe work?
Sorry for the long post, I thought that adding some context would be helpful.
Thanks in advance.