DC motor control with PWM


I have the Motor Shield v3. How can I control a dc motor with PWM?

I need to control two dc motors from a rc radio. Arduino will receive the PWM and move the dc motors.

Any ideia how to do it?

I know if you can get a proper PWM output, you can feed it into a speed controller (i am fond of Victor 884 controllers, but they're about $120 a pop. You can also get Jaguar speed controllers, made by Luminary Micro, for about $110 and they've got more features).

The Victor speed controller has PWM input, 12vdc+, 12vdc-, then motor+ and motor-. pretty easy to wire up. I can get a picture in a few if you'd like.

Yes, but I need Arduino to control. It's for a stabilization system witm IMU.

What signal are you recieveing from the rc?

From RC I receive a PWM signal.

Sorry, just read your orrignal post and noticed you mentioned it there!

take a look at : http://bobblick.com/techref/projects/sv2pwm/sv2pwm.html

and: http://www.arduino.cc/en/Reference/PulseIn

and: http://www.arduino.cc/en/Tutorial/PWM

the way i'd go, would to be to measure the length of the high pulse and if its more than 1.5ms, set the direction pin, if not clear it.

then do some math to work out pwm ratio, so if pulse is 1ms then set pwm to 255, decreeaing to 0 when the pulse is 1.5ms and increading to 255 when the pulse it 2ms

hope this helps, but no promises that it will work, because i've not reli looked in to servos and rc control or experimented with it!