Hello, I am pretty new at Arduino's world and I have few questions.
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?
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?
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.
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.
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.
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?
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.