Electronic – arduino – Power supply problem with L293D

arduinomotorpower supply

Recently I was trying to drive two motors with atmega328 and L293D motor driver IC. The power supply section is shown below

enter image description here

I used a 12V battery with high current driving capability.The motor was not connected but even the led blink doesn't work. I verified the circuit for hours. Then I connected a 9V battery with LOW current driving capability as input. This time everything was working properly.
Finally I used a 100uF capacitor at the input with my 12V battery and it works!
enter image description here

[note:The motor was disconnected all the time. I checked the output with an LED]

Can anyone explain what happened. How does it work with that 9V battery?

Best Answer

Look at the data sheet for the 7805 and you'll find it needs a 0.1uF capacitor and a 0.33uF capacitor (or larger). Both caps should be non-electrolytic (for best performance) but, adding an electrolytic in parallel with the caps I've said won't be a big deal.

If this now works on both batteries then it's a fair assumption that the wiring to the 12V battery may be too long or the ability of the 12V battery to act as a decent capacitor was impaired.

Link