But now the regulator gets hot!

Greetings.

I am sure someone here has the answer.

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 ...

Just wondering...

Thanks!

What Regulator did you replace the original with?

In the above schematic, had you caused D1 to fail shorted, nothing would happen unless there was something plugged into the 12 power input jack.

I am pretty sure the power came from the 12v at the time, I am guessing the VIN pin.

The regulator I replaced it with is AMS 1117 5.0 1032

D1 looks OK. As do the caps.. perhaps the cap after the regulator. Something is feeding back to it only when on usb power.

double checking the datasheet now.

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,

Both datasheets say the tab is connected to "output", Pin 2.
So its not the regulator... Right?

Again, when the Mega 2560 is powered from USB, this regulator gets super hot.

Almost the same as the original.

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 !