0

I am a newbie in arduino working on a bot with L293D shield. But I have a question as what would be the input current to drive all 4 dc motors and 2 servo motors. I can see that it can supply 0.6Amp current for the four motors.

I am considering the amount of electrons flowing in per unit time is equal to the electrons flowing out of the circuit, as an simplistic aprach. So practically the input current should be greater than or equal to 2.4Amp.

As I have 6 motors in total so I was thinking about making a 12V 3Amp DC supply for a better performance. Should I do it like that? will it damage the board or shield?

  • Buying a power supply with more amps doesn't hurt the circuit – chrisl Nov 19 '19 at 12:44
  • But there should be a limiting current, right? otherwise it can burn it or parts of the shield? isn't it? – sdebarun Nov 19 '19 at 13:03
  • 1
    No, the circuit will draw as much current, as it needs. Nothing ever burns, because you provide too much current. It burns, because you draw too much power. If you draw more current, than your power supply can supply, the power supply might get fried. If you draw more current through a motor driver, than it can handle, it might get fried. – chrisl Nov 19 '19 at 14:34
  • That is great! I completely mised it. Thanks @chrisl – sdebarun Nov 19 '19 at 15:27
  • In fact you should buy a power supply that provides 20% - 50% more than you think you need, to allow for surprises. – Duncan C Nov 19 '19 at 16:32
0

Here the proper answer:

The vast majority of devices are constant-voltage devices. They need a constant operating voltage to work correctly. Microcontrollers are such devices. When operating, they will try to draw as much current from the power source, as they need, but not more. Much like a simple resistor with an applied voltage will draw a specific amount of current (calculable with Ohm's law), complex devices like microcontrolelrs have something like an overall impedance/resistance, that is depending on their specific operation. So also here the device only draws as much current, as it needs. (I wrote about an overall impedance to emphasize the fundamental principle. No one would really specify an overall impedance for such a device, because this would only be a value calculated by the voltage and current needed, not a real resistance.)

This means, that burning parts are not due to the power supply supplying more amps. They get burnt, because something draw too much power trough them.

Let's look at some examples:

  1. Imagine, that you create a short between 5V and ground on your Uno. A short means, that a high current can flow, since the resistance is very low. Now you are drawing a high current from your 5V pin to the ground pin. The Arduino's 5V pin is connected to a voltage regulator (for if you use Vin) and over a diode to USB. Both parts are only rated for a maximum current (depending on the version of the board between 200mA and 1A). The high current, that you draw, will flow through one of these parts, depending on your input source. This part will get fried, because a way to high current will flow through it, just because you draw the current.

  2. A strong motor, that needs more current, than the board is rated for, would result in a similar problem like the short circuit. Indeed every device, that needs more current, than the board is rated for, might result in frying the mentioned parts.

But what happens, if you draw more power from the power supply itself, than it is rated for? The power supply electronic is similar to the Arduino board. When you draw too much current from the power supply, some parts of it might get fried and stop working. Thus, you should not try to draw more current from it, than it can provide. Often power supplies have a protection circuit, that will either lower or directly cut the voltage, if too much current is drawn. This is for the safety of the supply and should not be used for current limiting your own application normally.

So, you should always calculate, what current you expect to need, and then take a power supply, that can provide more current than that. You should consider a significant headroom, so that you can add more parts, if you want to extent your project. For example, if I calculate 2A for my project, I would use a power supply in the range of 3A.


Addition:

Above I wrote about constant-voltage devices. There are also constant-current devices, for example LEDs. An LED has a specific constant forward voltage. Under that voltage it will not conduct current. Over that voltage, the current rises exponentially. The voltage over the LED will always stay the same, as it was designed. This is the reason, why you need to add a current limiting resistor to a LED. But in the vast of devices, LEDs (or in fact every diode) is an exception.

| improve this answer | |
  • That is a great explanation and very eleborate one. Thanks for the time and effort. But I have some doubts. So I can use a 10 amp source with anything? as long as the circuit is not drwaing any more than its limit it should be okay. is that correct? – sdebarun Nov 22 '19 at 8:18
  • That's correct. The amperage doesn't matter, as long, as it is more, than needed. You could connect a source, that can provide 100A and it would be the same. But of course you should be careful, when changing your circuit. Providing enough power to drive motors does also mean, you are providing enough power, that the circuit can destroy itself, if you do something wrong. – chrisl Nov 22 '19 at 8:22
  • Think about how a smartphone is charged. These days you can find many different standards like Quick Charge etc. These are only ways to tell the smartphone, that it can draw more current from the charger, than normal. So the charger always provides the higher power, but the smartphone also has to actually use it. Otherwise you would still charge the slow way, with lower current. And the smartphone never breaks with chargers, that have different amperage output. – chrisl Nov 22 '19 at 8:26
  • Yes I got it. The transformer in the hand made DC supply does not generally get damaged but other components like diodes, capacitors get burned as they are not capable of hadling the current over their rated values. As the transformer can supply as much current as the load draws but the components are not able to tolerate the heat over the specified value. – sdebarun Nov 22 '19 at 12:45
  • This entire comment answer made the loading effect much clear. I forgot it too. – sdebarun Nov 22 '19 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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