I´m still learning a lot about how to control DC motors and specially about powering those up.
To control 2 DC motors, I´ve used an H-Bridge L293D.
As I imagined my three AA alkaline batteries won´t be enough to power them up.
So I thought on having another three, or maybe 6 NiMh rechargable batteries.
Could those two options be tried or I would fried something?
I´m currently attaching the positive wire (red) to pin number 8 of the L293D, and the negative one (black) to ground. Could I just switch what I´m using now with any of those options? (6 alkaline batteries or 6 NiMh batteries?).
About the 6 alkaline batteries, I have 2 3 battery holders. So I thought on putting their respectives red and black wires together in the same breadbord lines (I mean the two red wires powering the 8th pin of the L293D and the two black wires going to ground).
Thanks for your help and insight!!
You need to know the voltage that your motor needs. Typically the motor has an absolute maximum but you can supply a lower voltage. The lower the voltage the less torque the motor will produce and there will be some minimum voltage at which the motor becomes effectively useless. You will need to work out what voltage the motor needs to produce the torque and speed needed for your application, while staying within the motor's maximum voltage restriction.
Then you need to estimate the peak current the motor will draw when supplied with that voltage. You should be able to estimate this from the data sheets (the stall current will be proportional to the supply voltage). Then you need to ensure that the motor driver circuit can support that voltage and current combination with an adequate safety margin.
Then you need to decide how long you want the batteries to last and what the average current draw will be during that time.
These figures will give you the required voltage, peak current and charge capacity requirements for your batteries.
Then you need to choose the type, number and arrangement of your batteries to meet those requirements.
Thanks for your reply!
I´ve checked the motors info, and I´ve got that they range from 4.5 to 6v.
As I was giving them 4.5v with 3 AA batteries, I thought I would put another 1.5v battery to raise it to 6.
About the arduino, I´ve connected the batteries to pin 8th of the H-Bridge L293D, so I thought it was safe to give it 9v from the wall adaptor that I have.
When turned on, the motors still didn´t move and the adaptor plug starter to get so hot it began to smoke!
Fortunately I was there in time to unplug it and the arduino board wasn´t damaged.
What I don´t get is why even if I put too much voltage, the motors still didn´t move.
Maybe I should try again with a mosfet transistor?