LEDs are also photodiodes, and generate a small current and voltage when exposed to light, similar to PV panels. That is why you get a voltage reading when the switch is open. Overview here.
LEDs are color sensitive, responding best to light that is a bit bluer than the emission color.
If I measure with a tester the voltage between the anode and the cathod I get a -1.60V value, but I expect 0V in this configuration.
With the LED on? That's about right for an LED.
A regular silicon diode (with current through it) has about a 0.7V "forward voltage drop" across it. LEDs have a higher forward voltage.
The diode (or LED) has high resistance below it's rated voltage. Above its rated forward voltage, the resistance drops dramatically and current flows freely. So with a resistor in series, the LED voltage "falls into place" and it remains constant with the remaining voltage dropped across the resistor.
The resistor limits the current. Without the resistor the total resistance is very low (at 5V) and you'd get excessive current that could blow the LED or your Arduino, etc.
You can calculate the current (through both the LED and resistor) by applying Ohm's Law to the known resistance and the known voltage across the resistor.
larryd:
Use the diagonal terminals on that switch.
You would do well to read a datasheet or check with a continuity tester before incorrectly assuming
the pin-out of the push-button - you have a permanent short wiring it that way.
Thank you guys, sorry for the late reply but I had some problems with my internet connection.
@jremington - You are right: the pushbutton is open, therefore the circuit is open. In this configuration, I measured a negative DC voltage across the LED.
As I wrote earlier, I expect a 0V value. Am I wrong? :-\
The open circuit voltage of a photodiode is roughly constant, independent of light intensity (except for total darkness, of course). However, the short circuit current is proportional to the intensity.
jremington:
The open circuit voltage of a photodiode is roughly constant, independent of light intensity (except for total darkness, of course). However, the short circuit current is proportional to the intensity.
Ah, yes...but it's not exactly open circuit, is it. There is the meter's internal impedance. I gave it a try with my best mmeter and got at most around 0.2V
But, that was under fairly dim lighting, and I had to press the LED right up against the fluorescent bulb on my desk lamp [the rest of the room lighting is all LED].
So, I agree with Paul__B, must be some bright lighting -- or a different explanation.
larryd:
Show us a image of the meter dial and test lead placement when you are measuring the voltage across the LED in the circuit with the open switch.
BTW, in the same LED/switch circuit, what do you measure across the open push button switch?
Do you live under high voltage power lines or near a radio/TV broadcast antenna? I.e., maybe your meter probe wires are picking up some sort of RFI/EMF that is being rectified by the LED.
Well done and documented experiments! Congratulations, few people are able to do so.
Sadly I don't understand this phenomenon either but I can confirm it exists. Not only LEDs but all PN junctions do this (i.e. "normal" diodes, BJTs). When you connect one lead to something and leave the other open a voltage "magically" appears over the device. I believe it has something to do with AC coupling between mains, power source and you - holding the test leads (the isolated part) make the voltage higher. I think only the long wires of testing leads and you touching them makes this significant so I postponed further experiments to "later".