12vdc motor rpm control

Hey, I'm working on project in which I have to control rpm of dc motor using pwm from arduino.
Hardware that I'm using is TIP122 transistor
to control motor, but problem is that motor starts 130th value of pwm as I'm varying it from 0-255.
What could be the reason should I increase the time interval between two pulses.
Right delay(30) that I'm using.

Give us a program and circuit so we can see what you are doing.

Weedpharma

Hi,
That is not uncommon with DC motors, depending on the quality of motor.
You can not expect a full 0 to 255 range of speed.

Tom... :slight_smile:

You also haven't told us what motor, what supply voltage and current...

Well sorry for late reply but still having problem motor is 12vdc, 1amp (max) & max 2000rpm
I have tried several sample codes.
Result is same as I mentioned in above post, connections are in attached file and I’m using TIP122.
Is it possible to rotate 2000 rpm dc motor from 0 to 2000 using pwm if it is not possible resolution of 10 per increment is OK for me.
Fan Dimmer circuit is doing well with motor.
You can take any pwm example code for reference.
Thanks.

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Thanks… Tom… :slight_smile:

As I said in post #2, do not expect full control from 0 to 255.
Please shoe in you diagram how you are inputting the speed.
Please do not use fritzy…

I did a rudimentary characterization of pololu 37D 30:1 gearmotor. Typically, you need a minimum of 20% duty cycle before the motor starts moving.

You can see from the attachment plots of RPM vs %Duty cycle. The higher the PWM frequency, the higher % duty cycle you need in order to move the motor. At very low PWM (100 - 500Hz), you might be able to work with duty cycle as low as 10%. It also helps if you have a uF capacitor across the motor terminals.

One way that I have thought of to get the motor to start spinning at control input > 0 is to add an offset to your control.

e.g. control += 20; // this is assuming that the control value of 20 is the minimum PWM value to spin the motor.

The root problem here is that PWM is not DC. With PWM you are applying pulses at 480 or 960 pps and what the motor does with them depends very much on the armature time constant among other things. In the case of a very narrow PWM pulse the armature current barely gets started to rise when the voltage is cut off so it falls, probably to zero before the next pulse comes. For very wide pulses the current has more time to build up and less to decay so there may be (probably is) a net dc current so torque.

There is a great tendency to assume that the voltage applied is simply the max dc voltage times the % on time of the PWC but this is not necessarily so. To start thinking about it just ask yourself whether you are thinking average voltage or rms voltage.

Another complication with PWM comes if your "dc" is:

1/ nice and flat as from a battery or:
2/ rectified single phase ac or:
3/ rectified 3 phase ac.

In case 1 the current will probably become flat dc at some reasonably low PWM % on.
In case 2 the current will always be discontinuous and will come only when the ac peak is above the CEMF and even then may or may not turn off between PWM pulses.
Case 3 will be somewhere between case 1 and case 2.

All of this simply points to the need for a good speed regulator if you want any sort of linear and controlled speed control.

but problem is that motor starts 130th value of pwm as I'm varying it from 0-255.

Replace the TIP122 darlington with an appropriate logic level MOSFET and the motor will start at a lower level, perhaps below 100 duty value.

Do a test by ramping down very slowly and record the PWM value the motor actually stops. I'm sure this would be even a much lower value than the start value.

In your code, you could startup the motor at this low "stop" value by sending a short startup PWM with max duty for 200-500ms or so (test to suit), just prior to sending your desired PWM level.

DC motors have to overcome static friction of brushes, bearings and load, which requires a minimum
current to flow. For small motors the high friction and winding resistance tends to mean this requires
a fair amount of voltage overhead is needed.

Larger and more efficient motors can be driven from lower duty cycles, but more load will always
slow a motor down, whatever the PWM drive level. The same is true of analog voltage control.

I am not sure what you are doing with this motor. but you may consider a stepper motor if you need low speed torque control.

mohit-singh:
but problem is that motor starts 130th value of pwm as I'm varying it from 0-255.

Just look up info (eg. google) on motor "dead zone". In general, you could consider the PWM signal to have a 'time averaged' value, or could see it as having an 'equivalent' DC value at some particular time.

So even if we were to use a DC power supply to increase the voltage (starting from zero), your motor won't move until it gets above a certain voltage. This translates to getting enough 'oomf' (or DC Marvel comics.... 'uNNFFFF!' etc) to break out of the friction/stiction zone. These are frictional forces, same as if you're lying on a relatively smooth floor (like ice floor), and somebody needs to pull or push you with adequate force to get you to start sliding or moving.