Go Down

### Topic: Real/theoretical readings from a digitalPin (Read 906 times)previous topic - next topic

#### graciano

##### Jun 17, 2013, 01:29 pm
Hi,
When i apply a HIGH voltage to a digital pin, i´m expecting a "real" voltage of +5V in the circuit.
Whem i try the simple led +resistor sequence, and then use a voltmeter, it reads 4.73V.
I'm just interested in better undestanding the diference between the real and the theoretical value.
I unsdestand that there is the internal resistance of the voltmeter (i'm using this cheap model [1] ), allong with other factors but, the question is:
How close is to +5V the real tension in a digital output of an Arduino UNO?

[1] http://www.ferreteriakeerl.com/multimetro-digital-nr-908146-noru-tagCodArt1749R20

#### olf2012

#1
##### Jun 17, 2013, 02:23 pm
The datasheet guarantees an output voltage of minimum 4.2V at 20mA load, so don't expect more...

#### Jack Christensen

#2
##### Jun 17, 2013, 03:04 pm
And the less current that is drawn, the closer the voltage will be to 5V.  If the output voltage is insufficient for your purposes, consider using a transistor (which will still exhibit the same behaviour, although to a lesser extent with the right transistor) or a relay (which should be pretty darn close to 5V).

Your voltmeter is probably fine for doing these measurements; it's not the meter that is loading the circuit and causing the voltage drop, but the LED and the internal resistance of the circuitry in the microcontroller that drives the pin.  You don't say what value resistor you are using with the LED, but try a larger value and you will see that the voltage is then higher.  Try it with no load (remove the LED) and the voltage should be very close to the supply voltage.

#### graciano

#3
##### Jun 17, 2013, 03:24 pm
I was using a 330ohm resistor.
Changing to a 1K resistor incresead the voltage, but removing the led makes the opposite!
Am i missing something?

My data:
330ohm resistor + led
4.73V

330ohm resistor - led
4.56V

1K resistor + led
4.88V

1K resistor - led
4.83V

#### Jack Christensen

#4
##### Jun 17, 2013, 03:37 pm

I was using a 330ohm resistor.
Changing to a 1K resistor incresead the voltage, but removing the led makes the opposite!
Am i missing something?

That is odd, is the meter hooked directly from the pin to ground? Is the pin staying on (and off) long enough for the reading on the meter to settle (usually a few seconds)?

Are you leaving the resistor in the circuit, connected to ground? That would explain your observations, without the LED the load would be greater. What I meant was to measure the pin with no load, i.e. nothing connected.

#### graciano

#5
##### Jun 17, 2013, 06:19 pm
Quote
Are you leaving the resistor in the circuit, connected to ground?

Yes i was  :*

But even then, shouldn't i assume that the set resistor+led has a greater total resistance?

#### cjcj1949

#6
##### Jun 17, 2013, 06:53 pmLast Edit: Jun 17, 2013, 07:24 pm by CrossRoads Reason: 1
Work out the current drain in the two cases. There is a greater voltage drop across the led resistor [moderator edit] without a led. You need bigger output drivers with lower on resistance to get a voltage closer to 5v. This is probably a dead end though. You are looking at logic level outputs which are not designed for high current draw.

#### Jack Christensen

#7
##### Jun 17, 2013, 07:29 pm

Quote
Are you leaving the resistor in the circuit, connected to ground?

Yes i was  :*

But even then, shouldn't i assume that the set resistor+led has a greater total resistance?

Correct, the combination of LED + resistor has greater total resistance, so draws less current, so the voltage sags less.

Go Up