Walk me through a very very basic LED circuit.

Say that I want to build a circuit with this LED:

Data Sheet

In real life without a tutorial, you've only got a few knowns:

  • Your power supply voltage, or the Vin for that particular section of your circuit.
  • The component datasheet. I'm just using a standard 5mm LED that only lights when the anode and cathode have a voltage difference of 1.8-2.2V and a max current of 0.020A (ideally between 16-18 mA).

The problem is obviously figuring out what else needs to be added into the circuit to make it work.

I know that there is a formula for "what resistor is needed to make an LED work" but I want to work it though instead of blindly using a formula and plugging numbers in.

So...

  • It's easy enough to drop the current down to 0.020A: 20V = 0.020(R), and R is 1,000 ohms.
  • BUT the LED will have it's own resistance once it has turned on, and the resistance is no where to be found on the data sheet. So the total resistance of the circuit would be 1k + whatever the LED is.
  • I'm confused on the voltage across the anode and cathode. How do you "set" this voltage difference? Does the LED just naturally have a ~2V difference across itself when given a current of 20mA? What if the source voltage was 5VDC? Or 100VDC? or 1000VDC?
  • Does the source voltage even matter as long as the current is dropped down to 20mA (and provided the resistor doesn't fry).

The led don't know the voltage but you no that the led is say 2 volt that's set the led is 2 volt
so it's 20 volt - 2 volts for the led for a max of 20mA so you need 900 ohms a 1000 would add a little safety.

Most don't take the led drop into account.

You could use a big resistor on higher voltage not really a good ideal but it does work just uses power.

fuzzybabybunny:
How do you "set" this voltage difference? Does the LED just naturally have a ~2V difference across itself when given a current of 20mA?

The voltage drop depends on the material (silicon vs. germanium), doping, temperature...

Read about PN junctions.

Voltage drop of forward biased diode.

dougp:
The voltage drop depends on the material (silicon vs. germanium), doping, temperature...

Read about PN junctions.

Voltage drop of forward biased diode.

"The electrons must be pushed by a voltage with enough force to cross the p-n junction, and this push is the source of the diode forward voltage, or forward bias voltage drop."

So if I'm reading this right, the forward voltage (in my case ~2V) will be generated automatically by the p-n junction when any kind of current starts flowing, and it will stay at 2V regardless of if the input voltage is 5V, 12V, or 1,000V?

As long as you don't let more then 20 mA go threw it . You only need 2 volts to make it light up nothing else if it's a 2 volts forward
drop.

Don't play with really high voltage a red led can blow up and it could hurt you the case can pop off and sharp pieces hit you i know because i was messing with a current source and didn't set it to it's lowest setting if i had not had glasses on it would of got my eye it broke the glass plus i had to dig some of it out of me.

fuzzybabybunny:
Say that I want to build a circuit with this LED:

Understanding Ohm's law is useful for this one, plus knowing that an LED operating under usual conditions will have a forward voltage drop of whatever they tell us from the data sheet. Eg 1.8 volt. A resistor in series with the LED will be used to set a desired amount of current that flows through the LED. Maybe 5 mA of current is ok. Depends on how much power the LED can handle.

fuzzybabybunny:
So if I'm reading this right, the forward voltage (in my case ~2V) will be generated automatically by the p-n junction when any kind of current starts flowing, and it will stay at 2V regardless of if the input voltage is 5V, 12V, or 1,000V?

It depends. You can run it at higher currents and the voltage will rise with increasing current but unless you have it sitting in a canister of dry ice, heat will quickly kill it à la the post by @be80be. Is there a current limiting resistor in the circuit? A graph of current vs. voltage.

dougp:
It depends. You can run it at higher currents and the voltage will rise with increasing current but unless you have it sitting in a canister of dry ice, heat will quickly kill it à la the post by @be80be. Is there a current limiting resistor in the circuit? A graph of current vs. voltage.

Yes, there is a current limiting resistor.

I just didn't know if there was anything further I needed to do to "set" the voltage drop / forward voltage of the LED to the 2V on the datasheet.

The answer is that the 2V is provided by the LED itself under normal conditions and the recommended current of ~20 mA.

If I had a high voltage source, I just need to worry about limiting the current to the LED safely. The forward voltage will take care of itself.

You are not so much "setting" anything, but rather providing the requirements of the device. The led requires the Vf to operate due to it's construction, and is restricted to max If.

All components are restricted in some matter or another, some more-so than others. Resistors are limited by Watts, capacitors by voltage, inductors by current, ic's by all the above. It's up to the designer to ensure that the parameters are maintained. Exceeding those parameters generally results in destruction of the device in all cases.

tinman13kup:
You are not so much "setting" anything, but rather providing the requirements of the device. The led requires the Vf to operate due to it's construction, and is restricted to max If.

All components are restricted in some matter or another, some more-so than others. Resistors are limited by Watts, capacitors by voltage, inductors by current, ic's by all the above. It's up to the designer to ensure that the parameters are maintained. Exceeding those parameters generally results in destruction of the device in all cases.

Well, I mean, in the context of my question, "setting" and "providing the requirements" are the same thing.

I knew from the data sheet that the LED requires a max of 20 mA and a forward voltage of ~2V. "Providing the required" / "setting" the current at 20 mA is straightforward. But I wasn't sure how to "provide the required" / "set" the voltage difference across anode and cathode at ~2V.

You have to explicitly provide the 20 mA current because the device can't really self-regulate its own current draw. But the 2V forward voltage is something that it does provide for itself (within reason) owing to the properties of the p-n gate. That's what I didn't know.

I would suggest that rather than attempting to describe this system with english/words you describe and analyze it with its native language, mathematics.

All the "words" "in" "quotes" are confusing what is really a very trivial situation. Write the math and accept it.

This design proceeds in simple steps:

  1. Subtract the specified LED forward voltage from the supply voltage
  2. Divide that voltage by the current that you want.
  3. The result is the resistor value.

It's not rocket science.