Stopping an actuator at a position with Pololu TB6612FNG

I am working on the code for operating an actuator and am finding that when I try to stop at a position (actuator has potentiometer output (0-5V)) I blow by the position. What would be the best approach to stop at a given location? If I reduce the PWM signal, it is better but won’t stop at a position. Misses but by less. Firgelli L16 actuator with Pololu TB6612FNG motor controller and Arduino nano. I have set AIN1 and AIN2 low and STBY low.

Hello.

If you are trying to do position control, you will probably want to implement some sort of closed loop control. Implementing a closed loop control like a PID controller will allow for precise control of the position of the actuator. If implemented correctly, the actuator should slow down as it approaches the target position and go backwards if there is overshoot. You can read more about implementing a PID controller in this Arduino guide.

- Jeremy

Thanks, I had not thought about using control like that.