I am making a simple robot with 2 BO motors driven by L293D on ATmega328P (took out from Arduino Uno). The robot when tested on Uno works fine. But when I put it on the board that I have designed (as I am not allowed to use Uno in college), the motors work for few seconds and then the microcontroller resets.
The problem is definitely not with the code, but some hardware issue that I could not figure it out. I have already tried:
Coupling capacitors - I changed the capacitors on the input and output pins of 7805. I tried using capacitors from the range of 47uF to 1000uF. But no change.
I am using 33pf ceramic capacitor for 16 Mhz crystal as I couldn't find 22 pf. But I tried 18pf and 15pf, but no luck.
Coupling capacitor on L293D power supply (47uF). No change.
Ceramic capacitors on BO motors, just to ensure the noise isn't affecting the power supply. But still no change.
From the web, I understood the concept of Brown-out reset and I assume that I am facing the same issue. Because the board works fine with other components. But as soon as I connect the motors with the driver, I face the problem of reset. Each motor is drawing out ~100mA, but 7805 should be able to supply it as per the datasheet.
Also one of my friends suggested it has also to do with the track width that I am using. My track width for power lines is 24 mils and 12 mils for data lines (GPIO pins). I am not changing it as I am not sure if this is the real reason
If anyone has experienced this before please help me out with some solution. Thanks