I recently started working on a little self balancing robot using ATmega328P. I made a simple PCB with an ATmega, a L293D, terminals for 2 motors and a MPU 6050 and so on.
I have a huge 25V 2200uF capacitor across the main power supply on the pcb but I don't suppose it is causing problems because it worked flawlessly yesterday.
The L293D heats up really bad because the motors switch directions extremely rapidly. And it is right next to the ATmega. I don't think that causes any problems? Motors are powered by another source.
The MPU's Vcc and ground are not decoupled with capacitors but I haven't seen problems with resetting since I twisted the wires coming from motor.
I am programming with USBasp (probably a clone made in china). It supplies 5 point something on Vcc and ground.
I power the motor and the circuit using 2 mobile phone chargers which both output at most 5.2 volts.
This same setup was working flawlessly yesterday. Today, however, the MCU doesn't work (its probably fried). I tried switching it with a new MCU. That also fried. How can this be?
Apart from general suggestions/deductions, if you want any specifics I will post schematics/photo of the circuit. Please help me out here.