Pages: [1]   Go Down
Author Topic: DC motor control with PWM  (Read 1244 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

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?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What signal are you recieveing from the rc?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From RC I receive a PWM signal.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
« Last Edit: March 06, 2009, 08:48:00 am by phill » Logged

Pages: [1]   Go Up
Jump to: