DC motor with feedback - position and velocity control

Hello!
I am using a Pololu DC motor with encoder( 100:1 METAL GEARMOTOR 37DX73L 24V 64 CPR POLOLU - Motor: DC | with gearbox; 24VDC; 3A; Shaft: D spring; 100rpm; 210g; POLOLU-4695 | TME - Electronic components ).
-A two-channel Hall effect encoder is used to sense the rotation of a magnetic disk on a rear protrusion of the motor shaft. The quadrature encoder provides a resolution of 64 counts per revolution of the motor shaft when counting both edges of both channels. -
Pololu - 100:1 Metal Gearmotor 37Dx73L mm 24V with 64 CPR Encoder (Helical Pinion)

If you have any sort of documentation or any libraries regarding controlling DC motors speed and position I would be glad.
Thanks!

изображение

Do you know about PID loops?

Hi,
What is the application?

How fast will the output shaft be rotating?
To what precision you need to control position?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Yupp, i do have a PID controller attached but this motor needs to be integrated in a robotic arm. Until now i did position control, wich means the motor is reaching the desired position with no problems. The problem here is the speed, wich isnt constant during the rotation: whenever the motor needs to lift the arm up it has a slow speed and when the arm has to go down it goes very rapidly. Is there a way to precisely control the speed of the motor even when the load isnt even during the rotaion?

Yes, separate PID loop to measure and control speed.

1 Like

So...I should have two PID loops, one that is in charge of reaching the desired position and one to reach the desired speed and maintain it? I get that and it is a great idea...i was thinking also about ramping down the speed when the motor gets close to the desired position so i dont have to deal with a lot of inertia.

That approach is called "trapezoidal speed (or velocity) profile" . Very popular and useful.

1 Like

Perhaps you didn't ramp the set-point value to something the motor can follow under load? If its really strugglng to lift perhaps the torque rating of your motor isn't sufficient for the task.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.