Author Topic: Roboduino + 2 DC motors: How?  (Read 2647 times)

0 Members and 1 Guest are viewing this topic.

Offline RoboManiaczTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Roboduino + 2 DC motors: How?
« 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 :)
« Last Edit: July 19, 2009, 02:23:11 PM by RoboManiacz »

Offline HyperNerd

  • Robot Overlord
  • ****
  • Posts: 139
  • Helpful? 5
  • N3rd1n80r
Re: Roboduino + 2 DC motors: How?
« Reply #1 on: July 19, 2009, 02:41:40 PM »
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

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, which is more than powerful enough for any non-combat robot

 -HyperNerd
There are 10 types of people in the world - those who understand binary, and those who don't.

Offline RoboManiaczTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: Roboduino + 2 DC motors: How?
« Reply #2 on: July 19, 2009, 03:24:50 PM »
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?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Roboduino + 2 DC motors: How?
« Reply #3 on: July 19, 2009, 09:58:31 PM »
maybe, but it would be easier to just use a simple chip like the l293d to control the motors...
Howdy

Offline RoboManiaczTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: Roboduino + 2 DC motors: How?
« Reply #4 on: July 20, 2009, 04:41:25 AM »
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)?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Roboduino + 2 DC motors: How?
« Reply #5 on: July 20, 2009, 04:49:24 AM »
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.
Howdy

Offline RoboChan

  • Full Member
  • ***
  • Posts: 77
  • Helpful? 0
Re: Roboduino + 2 DC motors: How?
« Reply #6 on: July 20, 2009, 03:32:01 PM »
we need a simple tutrial on motor drivers on the main sight it would solve a lot of problems.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Roboduino + 2 DC motors: How?
« Reply #7 on: July 20, 2009, 04:15:48 PM »
have you checked out this one by webbot?
http://www.societyofrobots.com/member_tutorials/node/159
Howdy

 

SMF spam blocked by CleanTalk