kbm10
Junior Member level 3
I have implemented PID control on precision dc motors. The position of servo motor is determined through linear optical encoders. The encoder values are read using a counter/timer/ TIM4 in the microcontroller. When I make very small moves, the servo moves and stops. Then according to my algorithm , I check if the movement has finished or not. In some cases, the servo does not move and in some cases, as I can see on the debugger window, the encoder value changes, an error is detected in position causing the PID controller to move the servo back and forth( the error in position changes between +ve and -ve).. Any idea how I can remove this?
Thanks
Thanks