Arduino Mega 2560 Power Issue: Works on USB, but Fails/Overheats on External PSU

Hi Everyone,

I am currently troubleshooting a persistent power delivery issue on a third-party, vendor-made PCB designed for a Climatic Chamber control system. The board uses an Arduino Mega 2560 as the main controller, but it also has an onboard ESP32 (for Wi-Fi) and a MAX485 module for RS485 communication.

System Configuration:

  • MCU: Arduino Mega 2560 (integrated on a custom PCB).
  • Communication: Modbus RTU via MAX485 to a DWIN HMI.
  • Sensors: Autonics THD-R-V (Industrial Temp/Humi, 1-5V output).
  • Actuators: Multiple Relay triggered by the Mega’s digital pins.
  • Powering: The DWIN HMI and Autonics sensor are powered by dedicated external power supplies, sharing a Common Ground with the Mega.

The Symptoms: I’ve tested the system under three different powering scenarios, and the results are inconsistent:

  1. Via USB (Laptop Power): The system works perfectly. Logic executes, Modbus communication is stable, and all Relays trigger as expected.
  2. Via VIN (Regulated 5.0V from Vendor’s Buck Converter): The Power LED is ON, but the MCU enters a "Zombie State"—no logic execution and no serial communication. I suspect this is due to the LDO’s dropout voltage requirements, leaving the MCU undervolted (likely around 3.8V - 4.0V).
  3. Via VIN (Regulated 10V - 12V): * The system shows "partial signs of life": Some Relays flicker or trigger occasionally, but the logic is extremely unstable and prone to freezing.
  • The onboard 5V regulator (LDO) gets dangerously hot within seconds.
  • It seems the combined current draw of the Mega, the onboard ESP32, and the Relays trigger pins exceeds the thermal/current capacity of the built-in regulator.

Proposed Solution: Since I cannot modify the vendor's internal PCB traces, I plan to bypass the VIN/LDO circuit entirely. I intend to solder a high-quality jumper wire to feed a regulated 5.1V DC directly to the 5V pin on the Mega from an external high-current buck converter (LM2596, rated for 3A).

My Questions to the Community:

  1. Is it safe to assume that providing 5.1V directly to the 5V pin is the most reliable "patch" for this under-specced vendor board?
  2. Are the "signs of life" at 10V-12V (partial Relays triggering) a clear indication of voltage sag/thermal throttling of the onboard LDO?
  3. What are the risks of backfeeding to my PC’s USB port if I need to connect for debugging while the 5V pin is externally powered? Should I disconnect the 5V jumper during USB sessions?

I’ve already verified the Common Ground across all power supplies. Any insights or warnings before I proceed with the jumper would be greatly appreciated.

Thanks in advance!

Minimum Vin is 7-8V.

Ah. When you're using external power, is the USB still hooked up? 10:1 or higher that your Mega has an LM358 (not rail to rail, but nice and cheap for the bean counters, but DOESN'T STOP EXTERNAL POWER FROM BACKFEEDING TO THE USB PORT) rather than an LMV358 (rail to rail, a bit more expensive - so no one uses it - but cuts off USB power when external power exceeds 6.6V).

If that's the case, a 10K resistor from the gate of the P channel MOSFET to 5V will pull the gate up sufficiently to shut the MOSFET off.

That's one possibility. Another: the 5V regulator only gets used with Vin. When powered by USB, it's out of the loop. So what are you powering with the Mega's 5V pin? It didn't look like anything from your schematic but I could have missed something.

Edit: I knew I had a picture of this somewhere. Here's an R3 powered through the barrel connector, with voltage showing up on the USB side as shown by the USB power meter. Add in that 10K resistor I mentioned, and this - very undesirable - behaviour stops.

Hi van_der_decken,

Thank you so much for the detailed explanation and the photo! It really clarifies the backfeeding risk caused by the LM358/MOSFET circuit on these boards. I appreciate the warning for my laptop's safety—it's definitely something I want to avoid.

Regarding the VIN issue: I’ve tried increasing the input voltage to VIN (tested up to 12V). While it shows some "signs of life" (a few Relays trigger), the onboard regulator gets extremely hot almost immediately and the logic remains unstable. It seems the built-in LDO just can't handle the current demand of this specific vendor board.

Since the 5V pin on the Mega is currently not being used to power any external loads*(the HMI and sensors have their own dedicated supplies), I have decided to switch from VIN to the 5V pin. I will jumper my regulated 5.1V supply directly to the 5V pin, bypassing the under-specced LDO entirely.

To manage the backfeeding risk you mentioned, I will follow a strict safety protocol: I will disconnect the 5V external jumper whenever I need to plug in the USB cable for debugging.

Does this approach sound like a solid workaround for this board's limitations?

Best regards,

I'm unclear on what the 5V pin on the Mega is actually powering on the vendor board? Where is that in the schematic? Edit: it's not connected to anything? How about the 3.3V pin? That looks equally unused.

In any case, to echo another user on this board who's name escapes me at the moment, "the Arduino is not a power source". So if the 5V pin is powering something more than a few sensors or LEDs or such, yes, it could overheat. I vaguely recall seeing a value of no more than 400mA out of that pin (and take that with a whole salt lick, I could be misremembering that and it could be much lower), and that's likely at the minimum Vin. The higher Vin goes, the more heat the poor, heatsink-less linear regulator has to dissipate.

If neither the Mega's 5V or 3.3V pin is being used as an output, I'm at a loss to explain why the 5V regulator is getting hot.

Sorry, I’m quite new to this and a bit confused. Is the 5V pin on the Mega strictly meant to be an output, or can it actually be used as a power input to run the Arduino?

I want to make sure that injecting a regulated 5.1V from my external buck converter directly into the 5V pin is a safe and valid way to bypass the onboard regulator, especially since my VIN port is having overheating issues. I just want to confirm if the 5V pin is a 'two-way' street before I proceed.

If you think about it, when there's nothing plugged into the barrel connector, or to Vin, the 5V regulator has nothing to regulate. There's nothing on its input. The 5V on the Mega is coming from the USB in that configuration. So yeah, the board can support 5V coming from somewhere other than the 5V regulator.

BUT...

That 5.1V is going to feed right back into the USB port if there's ever anything plugged in there, because the op-amp will not be turning that MOSFET off because Vin is 0. To me, that's just too dangerous. One moment of inattention and potentially, goodbye laptop.

I totally get the risk now. The potential for backfeeding via the MOSFET when Vin is 0V is a deal-breaker for my laptop's safety.

Here is my revised plan to bypass the failing onboard LDO while keeping my hardware safe:

  1. Power Path: I will disconnect the step-down from the VIN pin and move it directly to the 5V pin (regulated at 5.1V).
  2. Safety Protocol: I will follow a strict physical isolation procedure. Whenever I need to debug or update code via USB, I will power down the external PSU and physically disconnect the 5V jumper from the Mega before the USB cable is even plugged in.
  3. Operational Mode: Conversely, the USB will be unplugged before the external 5V jumper is reconnected for normal operation.

Does this 'Physical Isolation' protocol effectively eliminate the backfeeding risk to my laptop since the two power sources will never meet? What do you think about this approach?

The Mega's regulator is a linear type, so the higher the input voltage, the more heat it will generate. So give the Vin pin just enough voltage for it to reliably produce 5V and no more. 7.0~7.5V is ideal.

If you buy a real Mega you don't have problems; it's the cheap stuff that cuts corners.

For a setup with WS2812B ledstrips I have two 5V power supplies; they feed all the 5V stuff (in my case the strips). One of them also feeds a buck converter which generates 9V for Vin of the Mega.
I've never had a problem.

You can also hack a USB cable and cut the 5V from PC.

I already tried setting the step-down output to 7.5V into VIN, but the Arduino is not running. It's just on standby (Power LED is on, but no logic execution).

So I guess my Mega is one of those 'cheap fakes' then? Since this is a third-party vendor board, it’s definitely not an original Arduino Italy board. That probably explains why the onboard LDO is so weak compared to your setup.

I already tried 7.5V (and even 12V) on VIN, but it just won't run the logic and gets extremely hot. It seems my only choice is to bypass the LDO and go with the 5.1V direct injection. I'll also take your advice on hacking the USB cable to cut the 5V line for extra safety. Thanks for the insight!

Are you powering the ESP32 from the 5V of the Mega when you did try that?
The 5V pin of the Mega can't supply much current and the ESP32 might draw too much resulting in overheating (and probably shutting down).

Not necessarily. It's often said that an Arduino is not a power supply; the 5V is mostly useful for other electronics like logic gates, LEDs or a LCD.