DC motor control

Hi,

i'm building up something to controll an rc car with 2 dc motor, i'm facing a lil problem, i'd like to controll the rotating speed of this motors, not with precision, just need something to make em run at variable speed, i'm wondering what i can use...
digital potentiometer ? voltage regulator ? what ? :smiley:

there is a tutrial covering this topic here: http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads

Use PWM for this:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html

and

http://www.thebox.myzen.co.uk/Workshop/Motors_2.html

If you only need speed control in only one direction, you probably could do thet fairly easily with a MOSFT and a $1.99 servo.

zoomkat, whats the servo for?

Use a MOSFET hooked up to the motor, use PWM signal from AnalogWrite to drive the mostfet.
THis is if you dont want reverse. If you want Reverse and Foward you need to build what is called an H-Bridge.

The drain of the mosfet is hooked up to the negitive side of the motor, and the source of the mostfet to ground
the gate is hooked up to any analog out pin on the arduino.

You need a 14004 diode betwen the + and - on the motor for Back EMF, otherwise the mosfet will get damaged.

zoomkat, whats the servo for?

It is used to provide varying PWM to the MOSFET, which is controlling the motor. The same as varying the speed of a continous rotation servo.

zoomkat, what is the advantage of that over doing an analogWrite?

Check my thread = http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1265691261

If the person already has a source for generating the PWM, then the servo wouldn't be needed.He mentioned making an rc car, so if he is using traditional rc components that control servos, then he could use the servo as an interface to supply PWM to the motors.