Electronics Theory Question

I have a question about resistance in circuits.

I understand Ohms law and I understand how to calculate resistance in an existing circuit. My question is, how do you determine the required resistance in a circuit that you are creating?

Say I have a simple circuit with 1 LED. Because of Arduino projects, I know that it will require a 220 ohm resistor. However, this may not always be the case. As I continue to grow and build more complicated circuits, how am I to determine the required resistance in order to select the correct resistors to use? Is it in the tech specs of the components? Or is there a way for me to measure and test my circuits without the resistors in place in order to use Ohms Law to calculate my needed resistance?

I very well could be overthinking the heck out of this one.

You need to know the current required by the other components, which can be quite complicated. In the case of the LED, the resistor's function is to LIMIT the current to a safe value. 220 Ohms is common because common red LEDs can tolerate 20 mA, and at that current the LED voltage drop is typically about 2 V (not true for blue or white LEDs).

See this web page on resistors and LEDs: https://hardwarefun.com/tutorials/calculating-correct-resistor-value-to-protect-arduino-pin

1 Like

Thank you! I look forward to reading this!

For an LED, it's pretty simple.
An LED has a voltage that it turns on at, Vf.
You can select how much current will flow thru it, usually 5 to 20mA.
If the source voltage is known, say 5V in an Arduino environment.
Connection could be 5V to the LED to the resistor to Gnd.
There will be 5V, Vf, and the voltage across the resistor.
The same current has to flow thru the LED and the resistor (Kirchoffs Law).
Resistor voltage divided by its resistance = the current flow.
Resistor voltage is the Source voltage minus the LED voltage.
So now Ohms Law, V = IR, or V/I = R, can be applied.
To sum up: (5V - Vf)/20mA = resistance.
If Vf = 2.2V, typical for Red, then (5V - 2.2V)/.02A = 140 ohm.
But 20mA is pretty bright for modern LEDs.
Say your aforementioned 220 ohm is used. How much current will flow?
(5V - 2.2V)/220 ohm = 12.7mA

Don't know Vf of the LED? Connect 5V, the LED, a 1K resistor, and measure the voltage across the LED. Now Vf is known, and you can calculate a resistor for a desired current flow, or calculate the current with the resistor(s) you have available.

To throw a twist in, if using an Arduino IO pin instead of 5V, then 5V may drop to as low as 4.2V with high current loads (4.2V at 20mA is guaranteed per the datasheet). The voltage drop is from current flow thru the output transistor, which a resistance Rds that is not specified. Using Ohms law, it can be calculated as (5V - 4.2V)/.02A = 40 ohm. So to be really technically correct, that should be taken into account as well.

1 Like

Technically speaking, the question makes no sense, unless what you are really trying to say
is "How do I calculate the current limiting resistor for 'n' leds or a led that is rated for 'x' current ?"
In that case , the question would make sense and the answer would simply be RTDDS ("Read the Damn Data Sheet") or, more politely "That information can be found on the datasheet".
The RTDDS comes from the fact that so many posters are too lazy (or simply are not even aware that such a document exists) but often they are aware but don't take the time to
read it. If you are serious about learning electronics, I would recommend that you make a
commitment to learn how to read datasheets and interpret them. You can google the
parameters , such as "hfe" etc .
However, if you are not referring specifically to leds, then the question makes no sense
because the load IS the resistance. Be it an incandescent lamp or a motor or a relay, current limiting resistors are generally not needed. An exception would be powering a 12V /0.2A incandescent lamp from 120Vac, in which case, if you really do know Ohm's Law, you can
easily calculate by:
((VACin*sqrt(2))-Vload))/I(load)
= ( [120v * SQRT(2)]-12v)/0.2A
= (169vac-12v)/0.2A
=157V/0.2A
=788 ohms
This is called a "Dropping Resistor" because it's function is simply to drop the input voltage.
This differs from a led current limiting resistor because that is based on the led forward
voltage.
For almost all other cases. Resistors are not needed if you are only interested in powering
some device. Resistors are generally used for signal conditioning and voltage dividers but
are required for BJT base resistors. Mosfets are voltage devices and don't need a 'base resistor'.

1 Like

YMMD :sweat_smile: :rofl: :joy:

Leds have a forward voltage (Vforward) thst varies based on the led color. Blue is higher
color vs forward voltage
This is the spec you need from the "damn"
datasheet because when you calculate the
current limiting resistor you subtract this boltage
from the Vcc voltage anc divide the result by the
led current rating. In plain English, if it isn't a
standard red 5mm led, then you can't calculate
the resistor value without reading the "damn"
datasheet.

1 Like

While the calculation of resistance is easy, determining the requirement is not.

Usually a resistor is chosen to control the current going to a device. So one answer to your question is; one has to know what the component the resistor is working with and what is the goal.

For instance, in the below:

Assume Vin is the output pin of a 5V arduino processor.
To select Rin you would need to know the max current the arduino pin could supply and the minimum current the operate the transistor. In this case the transistor is either conducting (i.e. bringing Vout to 0V) or open.

image

So you see the real question requires learning about the components associated with the resistor.

1 Like

Thanks for all of the input. I am serious about getting into this, but needed some direction because I am new to it. Now I have something to work with.

1 Like