Continue to Site

# control dc motor at define RPM

Status
Not open for further replies.

#### tictac

##### Full Member level 5
reducing the rpm of dc motors

hello
I want to set the speed of a DC motor at the define RPM,I use atmega32 and L298 for controlling,and one encoder at motor side to feedback the speed of the motor.
is there any equation that relate to the speed and pwm or duty cycle??
I use 10bit pwm(3ff).the maximum speed of the motor with max pwm is 11000RPM. I use this formula to set the pwm ,but its not correct

pwmset=(rpmset*1023)/11000;
also I dont know ,what frequency of pwm must be set for best working and controlling of dc motor.

by regards

dc motor theory with formula

Hi tictac,

I don't think you'll have much success with an arbitrary formula like that. You might need to do some research into creating a simple PID controller? Even a P (proportional) controller might be adequate depending on your application.

dc motor rpm formula

Just an extension to my reply - A P controller equation for your application might look something like:

pwmSet = pwmSet * K1 + K2 * (rpmSetPoint - currentRPM)

where:

pwmSet * K1 is an approximate PWM to attain the desired speed for each value of pwmSet

and K2 is a proportainal variable that adjusts the strength of the feedback (i.e. setpoint - actual speed) and can probably be adjusted manually.

I'll warn you though that this is pretty rough and you'll most probably get a lot of oscillation (unless K2 is weak), but it's a start hopefully.

Good Luck!

### tictac

Points: 2
how to reduce the rpm of dc motor

so,what is a correct and easy way to do that?
is it PID or another ways>
by regards

is there any way to reduce rpm but the torque of motor doesnt decrease??

define the control of the motor

PID is your stock standard controller which you can implement if you want.

The best way to control a system is to understand it and have a mathematical model that can describe it first. A controller can then be designed using the model. I would suggest this is the BEST, but obviously not easiest path to go down.

As I mentioned before, using proportinal feedback may indeed provide you with enough control to satisfy your needs and perhaps you should eplore this idea first. You can do a google search for proportional controllers, or even PID controllers (the theory is the same, you design everything until you have your P and then try that out).

After a quick search, I found this website:
Maybe you should talk to that guy - see if you can get a copy of his code (would save you a lot of time).

tictac said:
is there any way to reduce rpm but the torque of motor doesnt decrease??

I'm afraid this is a feature of the motor and not something that you can fix with a brilliant controller. For low speed high torque you want something more like a stepper, or use a gearbox.

### tictac

Points: 2
define dc motor

thank you so much
It helped me.
by regards

dc rpm controller

PID or some feedback controls such as Fuzzy control.

formulas for pwm control of dc motor

hi tictac,
I want to run the DC motor in one direction using PWM + DAC or ADC
1) First the program tell the max. speed of the DC motor
2) Gave input like 500RPM from KEYPAD then motor run on this specific speed.
Kindly tell me how can i build the program and if u have any material already done this then attach it.
If u think that this above material is helpful for me then tell me soon thanx

Opps duplicate post.

Status
Not open for further replies.