Powering up Arduino Mega 2560

Good morning.

I have a project consisting of 3 servos, 2 ESCs, I2C and SPI devices and PWM capture inputs. I am monitoring the microcontroller via a Serial 0 - USB serial monitor, and Serial 1 - BT to serial. Project still under development. (USB power lines are isolated)

I am powering up the project using a 5V regulated laboratory power supply supplying Vin pin and ground. Had no issues since I started the build and started debugging the code for a month now.

This morning the serial monitor could not detect the port.

I removed the Vin port and powered up the USB and all worked fine.

When USB is unpowered and Vin connected:

  • servos not reaching correct position
  • serial communication breaks mid way
  • at time program loops mid point in the setup routine

When USB is powered and Vin disconnected

  • all works well

Tried running Vin at 7V. All worked well, but in field application, 7V is not available
Supplied 5V regulated to the 5V pin. Things worked well, but cautious to use this approach since it
has no protection.

Please, what are the options for powering up given that:

  • On board power available is 5V
  • Sensors use 5V voltage levels
  • Servos are operated at 5V
  • I would need to monitor via USB whilst power is provided from on board supply

Thank you

What's the specified voltage range for Vin on a Mega? On a Nano, it's got to be 6.5VDC or greater.

Hi, @mzerafa

You need at least 7V on Vin to get 5V regulated for the Mega to run.
Vin supplies a linear 5V regulator that needs at least 7V or higher to provide the 5V out of the regulator.

Tom.. :grinning: :+1: :coffee: :australia:

From their web page, FWIW:

Power

The Mega 2560 can be powered via the USB connection or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the GND and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

Hi, @camsysca

Consider a DC-DC converter to provide 7 - 12V for the Mega from your main 5V supply.

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

@TomGeorge
My question was for the OP, and rhetorical for the rest of us. The OP will need to deliver his 5V directly to the 5V pin of the Mega, I suspect, which is why I quoted the Arduino web page (though we all know how misleading that can be, in this instance it's correct.)
ps.
Whoops. but in this case, Arduino also says:

  • 5V. This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.

So you are correct, the best option is to provide 7V directly, to minimize thermal dissipation in the regulator and maximize available current. A separate 5V supply should provide 5V to most peripherals, given the regulator is still pretty weak compared to external options.

Hi,
Another way would be to provide the USB socket with 5V from the main supply.

Tom... :grinning: :+1: :coffee: :australia:

Sure, or use a 5V power-only USB charger directly.

The USB 5v most likely has no protection therefore the issue remains. So my options are either 5v direct to the 5v pin or a DC to DC converter to get 7v.

https://docs.arduino.cc/learn/electronics/power-pins

There's a section how to power through the 5V+ pin (it works, but take caution).

All I will say is, that page, and pages it links to, provide the user with ample opportunity to fry their Arduino, because the amount of information missing is much greater than the amount given with no caveats. I get it, they're trying to help without confusing, but giving an output current table without specifying input conditions is just broken.

1 Like

Yes I'v referred to that document. It clearly states to avoid applying 5V to 5Vpin, even tough it's possible.

Asking around maybe there is a way how to do it safely

Tom.. :grinning: :+1: :coffee: :australia:

Came across this device. Might be usefull

VERTER 5V USB Buck-Boost - 500mA from 3V-5V / 1000ma from 5V-12V - TPS63060

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.