I cannabilized 2 dc motors from a cheap(3$) RC car, i am trying to control them using a ardumoto[1] motor driver shield.
Using a PWM value of 255 motors start spinning, but as i move the value lower to say 90 shield starts emitting a hissing sound and i can not set a speed lower than 40, it won't turn. I am using these motors to move the RC car. Right now i am giving short bursts of full power to make it move forward but it is not smooth.
My questions are as follows,
That sound it is emitting, is that a bad sign?
My understanding is that the PWM value should set the speed of rotation so why i can't rotate really slowly?
The power for the arduino is coming from a 9V 2A power adapter, so i am assuming i have enough juice to move the motors...
My understanding is that the PWM value should set the speed of rotation so why i can't rotate really slowly?
Because there needs to be a certain amount of power to move a motor and you don't have enough to move it at the low on / off ratios. The speed control you can get from open ended PWM is limited. To move slower you have to monitor the actual speed of the motor and adjust the PWM value in a closed feedback loop. Something that is not widely done.
That sound it is emitting, is that a bad sign?
No it happens when you switch large currents quickly, it is caused by vibrations caused by the electromagnetic effect of the conductors moving slightly under the effect of an alternating magnetic field.
It is not so much the motor characteristics but the controller you use. So the best bet is for a closed loop control system. I once designed a motor speed control for an electric train set that used the motor as the voltage controlled oscillator in a phase locked loop.
PWM simply varies the amount of power to the motor. When a motor runs at a speed very much slower than it is designed to run at, it is not very efficient and doesn't produce much torque. So maybe a geared motor might be the best way of getting high torque for low speed. However, a wide speed change for a motor is something that is difficult to achieve. What speed range do you want and what sort of power do you need.
I do not have a particular speed requirement, i am building a simple line follower i just want to be able to vary speed. So what i understand is, i have to pick e motor according to the speed i want to achieve right?
I can not simple control the motor at whatever speed i want. I am quite new at this, i thought with a driver shield i can control the speed however i like.
If you're choosing motors for your robot, one of the things you want to consider is your top speed. If you want your robot to only go about 1 m/s (which is pretty fast for a small tabletop robot), you'll need to know the motor's maximum RPM, and your wheel diameter. You can use the formula
Speed (m/s) = x RPM * pi * diameter(meters) / 60
If you specify your desired top speed and wheel diameter, you can simplify and find your desired max rpm as
x RPM = maxSpeed(m/s) * 60 / (pi * diameter(meters))
Basically, you don't want your robot to be able to go any faster than you need it to. If your motor max speed is really fast, you'll probably only be able to use a small amount of the slower end of the RPM range, otherwise your bot will take off and crash into things at very high speed (probably). So by limiting yourself to the low RPM range, you'll have the stall issue you're running into now, and you'll have very little control over the speed increments (limited to say outputs of 0-100 instead of 0-255). For smaller robot motors, the best way to get a low RPM motor is to use a motor that has been geared down. Companies like solarbotics make a wide variety of gearmotors, which you can spec out to suit your needs. You also need to pay attention to the motor voltage, find motors that are capable of operating in the 9v range that you're supplying.
If you wanted to take things a step further, you could find a motor with a wheel encoder on the end. You can calculate your motor's velocity from a wheel encoder, and use it to adjust your output PWM value to achieve a desired speed. For example, you want to go 0.5m/s so you write a PWM value of 128. You see with your encoders that you're only moving about 0.4m/s, so you can adjust your PWM value up until you see that your wheels are moving at your desired speed. This is a lot of work and probably not necessary at all for what you're doing, but it's an example of how feedback is used to control motor speed.