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?
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:
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.
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.