0
\$\begingroup\$

I am new to electronics and robotics, so I apologize if my question is dumb.

I am trying to run four motors with two L293D, and here is the configuration that I am thinking of: enter image description here

DC Motor This is the motor that I am using, but I am not sure how much voltage I need to provide to the motors via pin 8 of L293D. Do I just need to provide 3 - 6V? or do I need to consider other factors like how much current can the batteries handle?

Thanks in advance!

\$\endgroup\$
1
  • \$\begingroup\$ DO NOT USE THE L293 or L298 or any similar Darlington driver. They are horribly lossy parts and would require you to raise the supply voltage to compensate for their losses. Low-loss FET bridges replaced them about 20 years ago, but those horrible parts live on in ignorant perpetuity in parts of the hobby community. \$\endgroup\$ Commented Dec 20, 2018 at 3:54

2 Answers 2

2
\$\begingroup\$

Your motors run on 3 to 6 V.

But the L293 D has a minimum supply voltage of 4.5 V.

So you'll need between 4.5 and 6 V to power your motors.

If you want to be able to power all 4 motors at the same time, you'll need your supply to be able to provide a higher current than you would need to power a single motor. How much depends on how your motors will be loaded. The current required is somwhere between 800 mA (4x the 200 mA no-load current) and 12 A (if you might overload and stall all 4 motors at the same time, however this might damage your L293D's, since they are only rated for 1.2 A per channel for brief periods).

\$\endgroup\$
6
  • \$\begingroup\$ How much current would three AA batteries connected in series be able to draw? Would it be better to power only two motors at a time? \$\endgroup\$
    – user207787
    Commented Dec 19, 2018 at 22:01
  • \$\begingroup\$ @user207787, Per Wikipedia a reasonable-quality AA cell has an internal resistance of around 0.2 ohms (getting worse at low temperatures and as the cell ages). So 3 in series have about 0.8 ohms. With 1 A load, their output voltage will drop by about 0.8 V. 1 A is probably more than you really want to load them with due to overheating, reducing operating life excessively, etc. \$\endgroup\$
    – The Photon
    Commented Dec 19, 2018 at 22:05
  • \$\begingroup\$ Thanks for your reply, so let's say I would use 4.5V battery, then is there a way to figure out how much current would two motors would draw? \$\endgroup\$
    – user207787
    Commented Dec 19, 2018 at 22:35
  • \$\begingroup\$ @user207787, like I said, it depends how the motors are loaded. It will be somwhere between 0.2 and 3 A per motor. \$\endgroup\$
    – The Photon
    Commented Dec 19, 2018 at 22:36
  • \$\begingroup\$ Sorry, one last thing, when you say "it depends on how the motors are loaded", do you mean physical load or electrical load? \$\endgroup\$
    – user207787
    Commented Dec 20, 2018 at 0:08
1
\$\begingroup\$

The L293D is NOT a good choice and will NOT run your motors if your battery voltage is too low. 4.5V is definitely too low.

The motor you appear to have requires about 4.5VDC and a maximum of 250mA.

If you want to run 4 motors simultaneously you must allow for a total of about 1A from your battery supply.

The L293D has an output driver stage (each half of the H-bridge) that looks like this: enter image description here

This type of configuration drops significant voltage from the VCC2. You should attempt to read the datasheet for the L293D and notice that the output high voltage is specified as typically 1.4V less than VCC2 ...AND the output low voltage output is typically 1.2V.

enter image description here

This means that setting VCC2 at 4.5V may result in 4.5 - (1.2 + 1.4) = 1.9V left to drive the motor. The results may be far from spectacular at this voltage.

To ensure that you could drive the motor at 4.5V, you would need a VCC2 of at least 4.5 + (1.2 + 1.4) = 7.1 volts.
You could use 6 * 1.2V AA batteries and achieve motor drive for a short time. You should look at a battery datasheet to understand why the battery life would be short. Here is the dataheet on an Energizer battery, Notice it will not provide good life at 1A, so AA seems like a poor choice.

If you must stay with AA battery size, then you could use a Lithium primary cell such as this Energizer AA Lithium version. This has a higher terminal voltage so you'd only need 5 of them to get you required 7.1V and a much better runtime.

You don't detail how you will drive the motors (PWM or simple Fwd/Rev signals). If you are using PWM then you could increase the VCC2 voltage to say 9V and expect to get reasonable results.

Update: You can increase the voltage across the motor when using PWM since the motor responds to the RMS value of the input power (voltage and current). In the case of the motors you have if 4.5V supply was the recommended maximum you could apply, then a 9V supply (PWM=100%) would result in 6.4V across the motor. In reality however the motor has a range of potential operating voltages that would work, so likely your motor would be fine from perhaps as low as 2V to as high as 6V, so providing you don't go to 100% PWM the RMS rating would not be exceeded.

NOTE: VCC1 is normally at the same voltage as your driving MCU, so if the MCU is 5V then VCC1 would be 5V.

\$\endgroup\$
1
  • \$\begingroup\$ Wow, thanks for your reply, this is what I've been looking for. I happen to have 18650 Li-ion batteries, so connecting them in series would provide 7.4V. I'll try that. Also, I will be using PWM to control the enable pin and yes, I will be sending 5V from MCU to VCC1. Sorry for leaving out the detail. May I ask why I could increase the VCC2 voltage to 9V if I use PWM to drive the motors? \$\endgroup\$
    – user207787
    Commented Dec 20, 2018 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.