Current drawing and "available" current

Hello, I am pretty new at Arduino's world and I have few questions.

  1. I understood that I shouldn't connect a dc motor to an arduino's pin (as a power supply) because It will draw too much current from the Arduino and might burn it. but is it the same case if I use a H-bridge (L293) in the middle (without external power supply)? or is it the same problem?

  2. In L293D, I saw there are internal flyback diodes, I still found few pictures saying I should connect external diodes, is it true? or I don't have to add them?

Thanks

The H bridge is not getting its power from a processor pin but a pin connected to that processors power supply. So that does not have the low current limit of the processor's pins but even so does have a limit, all be it about 300mA as opposed to the 40mA of a processor pin.

If the chip has internal fly back diodes there is no need for external ones.

Thanks for the answer.

so if my motor "asks" for lets say 200mA, where my H bridge is pulling it from?
(just to make sure I explained myself, I am using the 5V from the arduino for pin 8 and 16 at the H bridge)

It is pulling it from the 5V pin which is getting its power from the USB connector if it is being powered that way. Or from the on board regulator if it is being powerd from the external power jack.

Note while this is fine it could be that the motor will generate enough interference to reset your Arduino so extra capacitor's between the pin 8 & 16 and ground pins of the chip are advised.

Oh, thank you very much!

I thought all pins can give up to 20/50mA, I didnt know the 5V pin connected differently and can give more by the usb. That's good to know.

Anything over 40mA from an output pin will damage it. Best working with no more than 30mA though.

Remember though that you drop about 2V of the motor supply through a 293. So if you only put Vcc2= 5V in on pin 8, the motors are going to get about 3V only.

Thank you all.

final clarification: So if I would connect the L293 to a processor pin that can only give low current with a motor that requires more current, the arduino will burn? the h-bridge doesn't give me some kind of protection from this aspect?

So if I would connect the L293 to a processor pin

You do not power a L293 from a processor pin. You connect it to a processor pin in order to control it BUT not to power it.

Yes, of course, I just wanted to understand if the L293d has no protection aspect in term of current pulling.

I just wanted to understand if the L293d has no protection aspect in term of current pulling.

Sorry but that is a very odd statement. All chips that are drivers have the potential to draw too much current if it is being asked to drive something outside its specification. The concept of "protection against pulling too much current" is not something that a chip normally does. It is up to the designer of the circuit to arrange things so that sufficient current capability is available, both from the supply and the chip ratings.

This is electronics not Lego. You can't just throw things together without considering what you are doing.

I understand.
Thank you for the explanations.