How did they know what resistor to use?
What I'm Looking at is "What is a Microcontroller? Student Guide Version·2.2 page 47 - 55". What I need to understand is how·the value of the resistor was calculated. Are all LED's the same? Does the resistor change if I were working with 12 volts? What is important to look at when looking at the LED specs.
I know that to just follow along with book that the resistor is correct. But what about the how and why.
Thanks
woodturner550
I know that to just follow along with book that the resistor is correct. But what about the how and why.
Thanks
woodturner550
Comments
As with most electronics parts, the manufacturer's datasheet has the definitive data on the part including the "forward voltage" of the LED. Again, consult the Wikipedia ... look up LEDs.
LEDs have different forward voltages depending on how they are made and the materials used. Most red LEDs have a forward voltage of around 1.7V. If you use a 5V supply, the amount of voltage left for the resistor to drop is 5V - 1.7V = 3.3V. If you consult most LED datasheets, you'll find that they're rated for a current up to about 20mA. Much more will probably damage the LED and less will produce less light. Let's assume you want 20mA. Ohm's Law says R = E / I = 3.3V / 0.02A = 330 Ohms. You can figure out other resistor values given different assumptions for supply voltage and LED current.
Gave me the direction I need to go to understand the basics of the circut calculations.
woodturner550
Granted, I went to school decades after Ohm did, and they might not have taught us the same math, but the way I learned it, 3.3/.02 = 165. Is there another step here I'm missing?
Thanks again
woodturner550
P.S. It should be 165 ohms. I'll bet he did that to see if it would be caught.
It makes more sense now. Thanks, and thanks for asking the question, woodturner.
Say you come up with 98 ohms. Just go to the next highest available value, say 100 ohms, and use that.
An LED circuit is very forgiving and "close" is good enough. Pick the next highest value to keep overall current below 20 mA (or the current value you want) instead of over the desired value as a general safety rule.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Richard Vannoy
Programming and Electronics Instructor
www.RichardVannoy.info
·