I/O Sink or Drive?

According the schematics it's the LD1117S50CTR (SOT-223).

Let's do some crude calculations.

Suppose dissipation is 1W, thermal resistance 110°C/W, room temperature 20°, then junction temperature is 130°C while max is 125°C.

Suppose VIN 12V, current 140mA, then voltage drop 7V and dissipation 1W.

Now consider that cooling circumstances were not defined, the manufacturer may have chosen them to achieve the nicest figure.

My new official Mega 2560 r3 has a LDI 1117 regulator. From what I have seen there are 3 different regulators in use. I chose the one I am dealing with.

Please explain the logic?

With higher Vin you have higher voltage drop across the regulator.
Pdiss = Voltdrop x Load Current.

The load current does not change because the output regulated voltage has not changed, just the volt drop which will increase, so power dissipation goes UP.

Tom.... :smiley: :+1: :coffee: :australia:

If a person were demanding a lot of current from the onboard 5v regulator, might it make sense to reduce Vin from 12v to 8v by using an external LM7808 thus transferring some heating away from the 1117 regulator.

I use a sufficiently powerful 5V power supply in my addressable LED projects and a small up converter to generate 9V for Vin.

Anything that needs 5V is directly powered from the 5V power supply, not from the 5V output.

For curiosity, why 9?

It's far enough from the lower limit of 7V. Upper limit would not worry me too much as these setups (with a Mega) don't need 3.3V.

And the reason of feeding via Vin is that I can connect both USB and Vin without the risk of damaging a PC.

Ahh. My far enough would be 7V. :grinning_face:

Is see no documentation or testing that would support that claim

One could argue that there was a difference in power dissipation for the GPIO pin based on whether or not it was sourcing or sinking.
e.g If the data sheet value for Voh minimum @5V Vcc is 4.2V @ 20mA then the power dissipated is 16mW. If the Vol max @ 5V Vcc is 0.9V @ 20mA then the power dissipated is 18mW.
I haven't seen any testing or documentation addressing that. One could say the difference is insignificant.
Or not.

Two factors to consider:

  • Actual output voltage. This is important in relation to thresholds in connecting circuitry.
  • Heat production. Apparently 40mA on one pin (sink or source) is no problem. But there are groups of output transistors in close physical proximity, possibly creating a 'hot spot' in the chip (independent of sink or source). A trace in the chip will power such a group of outputs in close proximity, and now sink or source is important as it will cause current in a different trace.

Unless you operate the chip close to it's absolute ratings, I don't expect an effect on lifespan.

For a very short time with chance of minor damage that will accumulate in pin failure.

Continuous OUTPUT HIGH at 25 mA can be sustained, perhaps even 30 mA with maybe a shorter life. Hey, even at low load these chips have a lifetime.

A related question.

I am totally unfamiliar with PCB Trace parameters. Please forgive my ignorance.

Attached is what I believe are all the 5v & gnd connections on the 2560 board. What are the current limits for each pin? They are probably all different due to trace size and length. If they are all good for 1amp, then the question is moot.

I don't worry about PCB traces. Each I/O pin won't get over 40mA. Pictures show that traces for power pins are wider.

Also the Mega2560 has a 500 mA poly fuse. Divide that by 54 IO pins and see that you won’t get 20 mA out of all of those pins at the same time.

Last time the Arduino site wasn’t a mess, board total current (source and sink) was easy to find. For the Uno it’s 200 mA.

Same goes with output shift registers. 8 pins with 40 mA max trying to drive 8 leds means transistors, resistors and more external power to drive those leds. And that’s where I went for WS28xx strings!

If you have your board powered from your PC and other circuitry powered from the 5V pin, the polyfuse will protect the USB port on your PC.
If you feed a lot of LEDs from the I/O pins the chip will smoke before the polyfuse reacts.

It seems I was not clear in my last question. I understand the I/O limits. I also see the polyfuse protecting the USB 5v. When powering the unit thru Vin, it appears that USBVCC is disabled by a MOSFET.

My question only concerns the 5v & GND pins max current capabilities.

All currents in PCB traces are limited by items other than their width.
Into barreljack: diode max 1A.
From VIN pin: same diode.
Into VIN pin: determined by 5V regulator.
From 5V pin: determined by 5V regulator or polyfuse.
Into 5V pin: determined by the chip.
From 3.3V pin: determined by 3.3V regulator.
Into 3.3V pin (not advisable!): current consumption of circuitry on the board.
Each I/O pin: determined by the chip.
Leaves the pathway from GND at the left to GND at the right. If you use that for any substantial current you violate the rules for good circuit design.

Okay, not IO pins… the safe-smart thing to do is run wire external to the board directly from power with common ground to the board.

If your supply V is too high, look into 95+ % efficient buck converters.

I can't say this loud enough. If you're planning on routing several hundred milliamps through the +5 power pins on a Mega, you're planning for failure. Change your thinking, do your power management off-board using a separate 5V supply. Leave the onboard supply for the onboard equipment.

And, if driving significant amounts of current (for example 50 x 15 ma LEDs on 50 digital outs), make sure the onboard regulator is optimally fed - 8V in, not 12V or more. Do a power analysis of your schematic, it's not hard, just tedious, and a good habit to develop.