I am planning to get a few DC motors and just wanted to know:
What is the minimum rpm an arduino mega can output and what is the max (I think its 255).
Secondly, what is the minimum rpm/pwm I could use and the motor still move?
So, if I had a dc motor of say 9000 rpm would I have to divide 9000/255 to find the rpm at an increment of 1 pwm?
Thanks in advance
It all depends on how you drive the H-bridge. You'll have to tell us which motor
driver/shield and how you are driving it (ie the code, library or whatever).
The way to guarantee good linear behaviour between analogWrite and a DC
motor is to use synchronous rectification mode(*) in the H-bridge - however
fast-decay mode is a good approximation (slow decay is not). In synchronous
rectification mode one arm of the H-bridge is driven in anti-phase, the other is held
Remember that a motor's speed drops under load, and at lower speeds this
drop is proportionally more. Thus under a useful load the linear relation
between duty cycle and speed breaks down - below a certain drive level the
motor will stall. Friction also contributes to this.
In short you will have to experiment a bit. Over specing the motor and
using synchronous rectification or at least a high PWM frequency will improve
Anyway what are you wanting to do? Perhaps you are going about things the
wrong way and what you really need is speed feedback?