Ok total newby here, I just got my board yesterday, set everything up as per instructions on the web and then started playing around with this LED I found in my drawr. So long story shor when i put the leads of my didgital multimeter on the LED witch IS blinking as per the example it only reads 2.7volts......This is really bothering me as I was under the assumption it was supposed to be 5V for HIGH and 0V for LOW. I have tried both a usb powersource and a 12v external source bothe yeilding the same results.... only 2.7V for a "HIGH" output using "digitalwrite" and "analog write" at 255.
if anyone has any ideas or tips pls let me know thx
When using a digital pin as an output, the output voltage on the pin when it is high is usually equal to the Vcc you supply your mega168. The Arduino boards use a Vcc of 5 V as far as I know. However, this will only hold true if the mega168 is able to source or sink as much current as you're trying to sink or source. For example, if you short the I/O pin to ground and drive it high, it will not read 5 V on a digital multimeter (also, this stands a good chance of destroying the pin, so don't try this at home). Lighting the LED is obviously pulling the output voltage down quite significantly by drawing more current than the mega168 can supply (~40 mA) while still maintaining a solid 5 V output. This tells me that your LED's current-limiting resistor is way too small. Are you even using a current-limiting resistor? If not, you are very quickly going to either burn out your AVR I/O pin or the LED.
ok so in short the LED is drawing too much current which is why I am reading such a low voltage. I will use a resistor next time, i just didnt have one at the time and couldnt wait to tryo out the board. I'll also try connecting the leads with out anything drawing current to see what i get.
The "D" in LED is diode. An LED will clamp the voltage just like a non light-emitting diode will.
-j
Yes but the diode is drawn (and used) the wrong way round. An LED produces light when it goes into reverse bias breakdown so it will clamp at the breakdown voltage. Put the LED in the wrong way round (or forward bias) and it clamps at a much lower voltage. Anyway the outputs of a micro can usually drive an LED directly without a resistor so while you are better off with one you are not granted to blow anything up without one if you are using it to source current. Sinking current is another matter however and it is easy to exceed the sink current of an output pin.
Yes but the diode is drawn (and used) the wrong way round. An LED produces light when it goes into reverse bias breakdown so it will clamp at the breakdown voltage. Put the LED in the wrong way round (or forward bias) and it clamps at a much lower voltage.
I think this is not right. As far as I know, the diode in an LED is both drawn and used the right way around, producing light when you forward bias it. Most of the energy lost in the diode drop goes into the emitted light. I just did a simple test using a power supply limited to 30 mA and an LED. Forward biasing it caused the LED to light at around 2 V and above. Reverse biasing it gave no light up through 25 V. Or am I completely misunderstanding what you're trying to say?
Anyway the outputs of a micro can usually drive an LED directly without a resistor so while you are better off with one you are not granted to blow anything up without one if you are using it to source current. Sinking current is another matter however and it is easy to exceed the sink current of an output pin.
Can I ask what makes you think this? As far as I know, you can damage a pin by attempting to source or sink too much current, but maybe my understanding is incorrect.
I think this is not right. As far as I know, the diode in an LED is both drawn and used the right way around, producing light when you forward bias it. Most of the energy lost in the diode drop goes into the emitted light. Or am I completely misunderstanding what you're trying to say?
You get photons from a semiconductor when the electrons make a transition from the conduction band to the valance band. To excite those electrons into the conduction band in the first place you must apply a potential by reverse biasing a PN junction. The photon energy (and hence the colour of light) is determined by the material, that's why you get IR light from silicon and you have to go to Gilaum Arcinide (or other mixed up stuff) for viable light. So in the normal way a PN junction is biased it has to be reverse bias to produce a potential across the two bands and excite the electrons. Light is only produced when reverse bias breakdown occurs. This confuses electronic engineers because in practice you want current flow and light, so the symbol is drawn to show a forward bias diode with current flowing in the direction you would expect in a normal diode. However, this is the wrong way round from a pure Physics point of view compared to a silicon diode.
OK on you not seeing any current in the "forward" direction. I must admit I have never tried this but remember it is not a silicon diode so that might explain the results.
As far as I know, you can damage a pin by attempting to source or sink too much current, but maybe my understanding is incorrect.
Normally TTL and other logic can stand a short circuit to earth on it's output. In fact a short to earth is current limited to a value shown on the data sheet. What it can't stand is a short circuit to the +ve rail, in other words sinking too much current will often kill a device. Therefore while it is not good practice to put an LED from an output to ground it will often work and you can get away without any permanent damage. However try the same trick between the +ve rail and the output pin and you probably will kill it. Sourcing too much current can often lead to problems on a processor when reading back the value of a logic output, say in a read modify write processor cycle of a bit set or bit clear instruction.
Sorry I think we may have strayed off the original topic here.
You get photons from a semiconductor when the electrons make a transition from the conduction band to the valance band. To excite those electrons into the conduction band in the first place you must apply a potential by reverse biasing a PN junction. The photon energy (and hence the colour of light) is determined by the material, that's why you get IR light from silicon and you have to go to Gilaum Arcinide (or other mixed up stuff) for viable light. So in the normal way a PN junction is biased it has to be reverse bias to produce a potential across the two bands and excite the electrons. Light is only produced when reverse bias breakdown occurs. This confuses electronic engineers because in practice you want current flow and light, so the symbol is drawn to show a forward bias diode with current flowing in the direction you would expect in a normal diode. However, this is the wrong way round from a pure Physics point of view compared to a silicon diode.
OK on you not seeing any current in the "forward" direction. I must admit I have never tried this but remember it is not a silicon diode so that might explain the results.
To the best of my knowledge, this is mostly wrong... I've been doing some research on LEDs and it seems to confirm what I already believed to be true: an LED is comprised of a positively doped and negatively doped substrate in contact with each other, just like a normal diode, and when forward biased (that is to say, when electrons are made to flow from the negative N-type region to the positive P-type region, photons are emitted as the electrons combine with the positive holes in the P-N junction. LEDs differ from diodes only in the energy released by this recombination. In an LED, this recombination releases enough energy to produce visible photons. The energy that needs to be overcome to produce light is not the reverse-bias breakdown voltage, it is the forward bias energy required to elevate electrons above the depletion zone and allow them to flow freely past the holes. It is the same as with normal diodes, where you need to exceed the forward-bias voltage drop before they will start to conduct (this is the energy needed to elevate normal diode electrons above the depletion zone).
Here are a few resources that support what I'm saying above:
LEDs are p-n junction devices constructed of gallium arsenide (GaAs), gallium arsenide phosphide (GaAsP), or gallium phosphide (GaP). Silicon and germanium are not suitable because those junctions produce heat and no appreciable IR or visible light. The junction in an LED is forward biased and when electrons cross the junction from the n- to the p-type material, the electron-hole recombination process produces some photons in the IR or visible in a process called electroluminescence. An exposed semiconductor surface can then emit light.
Can you provide any resources that support the idea that LEDs are actually reverse-biased diodes?
Sorry I think we may have strayed off the original topic here.
Indeed we are getting off topic, but the original topic of this thread seems to have been settled and I think that the physics of LEDs is a concept worth understanding as there's a very, very big difference between forward-biasing a diode and reverse-biasing a diode.