My question stemmed from trying to figure out the correct resistor to use for an LED. I know that if I am using a 5v supply, and I want 20ma for the LED, then:
V=IR
5=.05R
5/.05=R
The resistor I should use is 100 ohms.
No biggie, I get it.
What I’m having trouble understanding is - How do you calculate how much voltage will drop over the resistor?
Is Ohm’s law the correct formula to use for this? Please let me know where I’m going wrong.
Ok so I see my math was wrong. Thank you for correcting it and showing me the proper way to do it.
My LEDs have a voltage range. For example: white is 2.8-3.6v, which I think is what threw me off. So would you just choose a number in the middle to be safe? Like 3.2v?
And I know it’s not common practice or wise to do so, but let’s say I had a regulated and stable 3.2v supply, and I wanted to power that white LED. Ohm’s law tells me that I would not need a resistor (that is if I’m finally doing my math right)
If you actually had a datasheet for the LED, it would include a chart showing Vf vs I - so you would look at the chart, find your desired operating current, then look at what Vf would be at that current.
But it is generally sufficient to pick a value close to, but not at, the high end of the Vf range. For that 2.8-3.6 range, I might choose 3.3V, and calculate an R using that and my desired current.
Not not wise, stupid in the extreme. That's a recipe for blowing up LEDs, nothing more. You can do that, and quite possibly get away with it in a single, glowing instant, but no, it's not something any reasonable designer would do.
If you really want to worry about it, pick a Vf somewhere in the middle of the range, calculate a resistance, stick the next highest value in a breadboard with the LED, and measure the voltage drop across the LED. Then re-calculate with the actual voltage drop and see if you need to change the resistor.
I’m not really worried about any of this. All I am trying to do is gain a deeper understanding about what I am doing through hypothetical situations where I doubt I’ll ever find myself. I do appreciate yours and all the other helpful replies.
Yep. In practice, just use whatever you've got handy that gives enough light for purpose.
It's like when I need a base resistor for a transistor acting as a switch. I don't bother looking at anything on the datasheet; I just pick a value that's going to put a few milliamps thru the base and move on to the next thing to think about.