Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: RoboManiacz on July 19, 2009, 02:20:54 PM
-
Hey,
I purchased a RC car that got two DC motors (12V I guess).
I am planning to control them via my roboduino (using with 7.2V 2600 mAh battery pack).
Do I need a special H-bridge to control the motors (one acts as a steering motor and one is to move the wheels), or can I directly access them via the PWM marked pins (like 9 and 10).
How can I send them the signal to turn, and more specific: How can i set the speed?
I tried it with the servo library and modified the examples, but the motor just turns like half a second very slow and stops. If i change polarity or if I do (value* -1) it changes the other direction.
But how to directly control them with the possibility of full speed or speed percentages?
Thanks for reading and your help, this site teached me everything about robotics (still very newb as you can see).
Best Regards,
RoboManiacz
EDIT:
I think I need a motor driver, any tutorials or ways how I could make it with my breaboard (will solder it later when all works). Thanks :)
-
You WILL need some kind of motor driver.
What is the voltage of the car's battery? This is the voltage of the motors. It will most likely be 6v or 7.2v. If it is a big car (1:5 scale or larger) then it could have 12v motors.
Have a read of the SoR H-Bridge Tutorial, http://www.societyofrobots.com/schematics_h-bridgedes.shtml (http://www.societyofrobots.com/schematics_h-bridgedes.shtml)
Using a H-Bridge, you will be able to use PWM outputs from the Roboduino to drive the motors. This will allow you to control the speed and direction of each motor.
DO NOT connect the motor directly to the output pin of the Roboduino, as it will draw WAY too much current, and could potentially kill the Roboduino!! :o
P.S. You could also consider a pre-made motor driver, such as the Sabertooth 2x25 (http://www.dimensionengineering.com/Sabertooth2X25.htm), which is more than powerful enough for any non-combat robot
-HyperNerd
-
Any way to use the platine that was in the car? So that I connect the one pin (9) that has PWM to where the RF receiver was soldered in?
-
maybe, but it would be easier to just use a simple chip like the l293d to control the motors...
-
I had a look here: http://luckylarry.co.uk/2009/07/control-a-dc-motor-with-arduino-and-l293d-chip/
Can I directly use the PWM marked pins where power comes from the battery to power the breadboard, or do I need an extra battery for the breadboard (like the tutorial does)?
-
the arduino is fine to power the l293D from its 5V header, but you will need to either use a separate battery or get power directly from the battery that is powering the arduino, although this will depend on your motors operating voltage.
-
we need a simple tutrial on motor drivers on the main sight it would solve a lot of problems.
-
have you checked out this one by webbot?
http://www.societyofrobots.com/member_tutorials/node/159