I have this old Mega 2560 board R3. It was once the heat of my 3d printer.
One day a wire crossed paths from the 12v 20amp power supply and instantly smoked the regulator on the arduino board making it unusable.
I replaced with another and life went on.
Many years later I started using this board again and discovered it worked just fine using the USB cable for power and communication.
So I thought, it must be the 5v regulator that blew (I remember it being really smelly too), and replaced the regulator.
Now the board works fine with external power, which flows through the new regulator. Whereas it did not before.
However, when powered by USB, the new regulator gets super hot. Which is not as designed. Kind of the opposite of what I was experiencing when it blew up at 12V (it only worked via USB power after the incident). After replacing the regulator, now it only works with 12v (external power). Well, it works with USB power, too, but the regulator gets super hot, which is odd because it is not even being used.
Is there some sort of transistor that senses the power source and switches things off/on or something? Maybe that has been blown to ...
Well, pins 1,2,3 are correct. Can't find a pin 4 on the AMS1117.
Hmm, the datasheet says it is compatible with other 3 pin regulators.
It does not say anything about 4 pin one's...
What do you think the tab at the top of the package is connected to?
I bet it is ground, which I think is a problem.................
Pin 4 is the pad that is on the side of the housing opposite pins 1-3. Internally, Pin4 is connected to Pin2 (OutPut, NOT GROUND) and is mainly used for heat dissipation. This is why it has to be soldered to the PCB. The PCB is (or should at least) equipped with a copper surface (thermal pad) at this position, which ensures better heat dissipation. If pin 4 is neither connected to the PCB nor to any other cooling surface, the performance of the controller drops rapidly and it also gets very hot very quickly,
Well if you have applied reverse voltage, i would check the caps again. They are polar after all.
I was looking at the schematic and USB power (USBVCC) goes to the 16u2 as does VCC,
Now i know linear regulators get hot when there is no power to Vin but power on Vout, and i think there must be something to prevent that from happening, probably in the 16u2, and this may not be functioning properly anymore. I checked the datasheet but couldn't find anything about it.
Easiest is to just accept that you power it from either side but not at the same time anymore. If changing the Caps doesn't help. Move on !