Arduino UNO digital output voltage (5V) - how it gets the 5V from USB power?

Hi folks. When the arduino (eg UNO) gets its power from USB cable only, how does the digital output pins get 5V?

The outputs are really at about 5.0 V (from multimeter measurements) when the output pins are high. If USB voltage is 5V, then I was thinking that there would be voltage drops internal to the arduino that would result in less than 5V output. Thanks in advance.

If USB voltage is 5V, then I was thinking that there would be voltage drops internal to the arduino that would result in less than 5V output.

Why would you think that? It is not the case.

There is no voltage drop if there is no current flow. You put a 220R resistor from a high input to ground and measure the voltage again you will then see some voltage drop from the 5V.

Grumpy_Mike:
Why would you think that? It is not the case.

There is no voltage drop if there is no current flow. You put a 220R resistor from a high input to ground and measure the voltage again you will then see some voltage drop from the 5V.

Thanks for your reply and comments Grumpy Mike! I had read something about 'operating voltage', from:

https://www.arduino.cc/en/Main/ArduinoBoardUno

"Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts."

Ok..... this will mean operating at around 5V, but pin output won't necessarily be at 5V.

Thanks again Mike.

Ok..... this will mean operating at around 5V, but pin output won't necessarily be at 5V.

Yes that is correct. If you look at the data sheet for the Atmega328, in section 28 there is what the voltage output of a logic high can be with a current of 20mA.
Here is an extract of the appropriate page.


It means that when you power the chip with 5V and take 20mA out of the pin the voltage can drop to 4.2V. This is the worst that can happen and it is often more than that. It also tells you what will happen if the chip is powered by 3V and you take 10mA out of it.

Thanks very much Grumpy Mike! That helped me a lot. Greatly appreciated.

(The output driver transistors of the AVR are MOSFETs, so they behave pretty much like low-value resistors when "on", rather than having an inherent Vce voltage drop like a bipolar transistor might...)

Hi guys, sorry if I revive this old thread. So, in this scenario:

The unexpected voltage drop (I get 4.7V between the digital pin and GND - instead of 5V - when I put an LED and a resistor into the circuit) is due to the internal resistance of the Arduino. Moreover, this happens only with digital pins (not with the Arduino 5V source). Am I right?

One more question: is it possible to avoid this behaviour? ::slight_smile:

is it possible to avoid this behaviour?

No. Unless you add a transistor or FET to the output pin and take the voltage from that.

The unexpected voltage drop (I get 4.7V between the digital pin and GND - instead of 5V - when I put an LED and a resistor into the circuit)

It is not unexpected, it is entirely expected.

is due to the internal resistance of the Arduino

Given that the output impedance is caused by a mixture of things then yes. Note it is not internal resistance.

this happens only with digital pins (not with the Arduino 5V source

The Arduino 5V pin is not driven by the processor so you can’t predict what will happen from the processsor’s data sheet.
In practice the voltage will drop with increasing current due to the impedance of the source feeding it. This could be from the USB connector, there is a 500mA thermal fuse on that or from the regulator if powered from the power jack.

Thank you for your answer Grumpy_Mike and sorry for the "obvious" question. Could you please suggest me some documentation to better understand the problem?

While people groan... a good place to start is the DATASHEET.

I think that the most important thing to understand is that PINS are "flexible". They can be OUTPUTS or INPUTS... but they are not "power" pins... they should neither be used to POWER the chip (which they can do in a destructive manner parasitically) or as power sources for other things.

Digital PINS are "designed" to be senders or receivers of logic level "signals". Logic signals have a wide range of what is acceptable as a LOGIC "1" or LOGIC "0" so a pin outputting a voltage between 3V and 5V is STILL a perfectly acceptable LOGIC "1" signal. Its NOT broken if it delivers 4.7V.

In fact... the reason a voltage drop is expected is because these pins are "wired" through the use of transistors that switch to source or sink from the GND or POWER rails. Anytime a voltage must cross a semiconductor material "junction"... there is a voltage drop in the area of 1/2 a volt. (depend on it)

Notice how the PIN is driven by transistors.

pwillard:
While people groan... a good place to start is the DATASHEET.

I think that the most important thing to understand is that PINS are "flexible". They can be OUTPUTS or INPUTS... but they are not "power" pins... they should neither be used to POWER the chip (which they can do in a destructive manner parasitically) or as power sources for other things.

Digital PINS are "designed" to be senders or receivers of logic level "signals". Logic signals have a wide range of what is acceptable as a LOGIC "1" or LOGIC "0" so a pin outputting a voltage between 3V and 5V is STILL a perfectly acceptable LOGIC "1" signal. Its NOT broken if it delivers 4.7V.

In fact... the reason a voltage drop is expected is because these pins are "wired" through the use of transistors that switch to source or sink from the GND or POWER rails. Anytime a voltage must cross a semiconductor material "junction"... there is a voltage drop in the area of 1/2 a volt. (depend on it)

"They should neither be used to POWER the chip or as power sources for other things" - except for output elements as LEDs I guess.

Thank you pwillard.. crystal clear explanation! :slight_smile:

pwillard:
Anytime a voltage must cross a semiconductor material "junction"... there is a voltage drop in the area of 1/2 a volt. (depend on it)

Well, no. That was more-or-less true of bipolar transistors, but these are FETs.

In fact, they behave more as resistors when switched on; power FETs may have "on" resistances in the order of milliohms, while those in the ATmega series output devices are in the order of 50 Ohms.

Or put another way: there are no pn-junctions in a CMOS chip that are forward biased (unless a protection
diode is active), so no pn-junction voltages.