Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

PWM DC Motor Control

Status
Not open for further replies.

DustinMechEng

Mechanical
Feb 12, 2007
22
0
0
US
Can anybody point me towards a good reference (preferrably and internet article) about PWM DC Motor Control? I need to control a small 5V DC motor so that it quickly moves to a specified position and holds that position untill commanded further. I am currently using a software algorithm that provides a proportial control loop. My current algorithm compares the measured encoder position to the desired encoder position and adjusts the PWM duty cycle according to the following:

Duty Cycle = Gain * abs((Measured Encoder Position) - (Desired Motor Position))

The system has a small amount of damping so it's tough to keep it from being unstable while having a reasonable response time. The system is also very sensitive to PWM frequency. I found that running it around 100Hz works the best, but that seems very slow to me. What is the typical PWM frequency for a DC motor control? Any suggestions on my control system algoritm?

Thanks for the help!
 
Replies continue below

Recommended for you

The PWM frequency is usually 20 kHz so the switching cannot be heard. At 100 Hz, the current will rise to a high value and probably decrease to zero during the off time.

There is nothing wrong with your basic serving plan and is OK if you get the performance you need. Increasing your gain should make the position tracking better and better until the servo goes unstable.

Is the motor being driven by an H-Bridge with free wheeling diodes?
 
Status
Not open for further replies.
Back
Top