# Voltage and Current in my Circuit

Discussion in 'General Electronics Chat' started by wiston, Dec 26, 2016.

1. ### wiston Thread Starter New Member

Dec 26, 2016
7
0
Hi, I am new in Arduino. Now I created simple circuit.

I just wonder what Voltage is before and after my Resistor. And how I can calculate it? I think the basic formula U = R * I is not enough. Because when I substitute current = 0,0227 my U = 5V again. And 5V is my power. I am confused with this stupid circuit, please help me

What is the Voltage before and after the resistor?
And is current constat?

Thank you!

2. ### #12 Expert

Nov 30, 2010
18,076
9,686
V resistor + Vled = 5V
Your current is NOT 0.0227A because the LED uses some voltage. About 2.2V for the color red.

To save other people waiting for the drawing to load, it's a series circuit: 5V to 220 ohms, to a red LED, to a push button, to ground.

3. ### wiston Thread Starter New Member

Dec 26, 2016
7
0
So the purpose of the Resistor is to get cca 2,2V from 5V power source to prevent the LED from destruction? The main reason why I am confused is: How I can get the value od 220 ohms Rezistors is the good choice for me? Because in Arduino Set there is no LED specifications....max Voltage or Current. So in case I know that I have 5V Power source, LED and button and i know, that LED max Voltage is 2,2 how can I get the best Rezistor value?

And one more questions is: How can be Current constant in whole serial circuit? There is different Current in the wire which is before Rezistor and after rezistor? I = U / R so the bigger is R the lower is I ?

Thank you.

4. ### MrChips Moderator

Oct 2, 2009
18,895
6,052
We don't really know that the voltage across the LED is 2,2V. That is simply an educated guess based on past experience.
To arrive at a more correct voltage you either have to know the I/U equation of the LED or you can use a graphical solution by superimposing the resistor load line on top of the I/U curve of the LED (I/V curve for non-Europeans).

Where the two lines intersect will give you both the current and voltage of the LED.

That is a property of a series circuit when elements are connected in series. The current is the same for each element.
The current entering the resistor must be the same current leaving the resistor.

wiston and anhnha like this.
5. ### magicChristian New Member

Nov 20, 2016
20
2
1. the current in a serial circuit is the same in every component.
2. The voltage from the supply is the sum of the voltages across the components
3. the load resistance is the sum of all components, but a LED or a diode has not a constant resistance.
it is not a linear component, the appearing resistance is depending on the current.

The resistnace of the Buttom is nearly zero, the voltage on a red LED is 1.7 to 2.2 Volts
5 - Vled is the voltage on the resistor p.E. 5.0 - 2.0 = 3 V, the resistor determines the current
p.E 330 Ohm 3V / 330 O = 9 mA wich is good for 3 or 5 mm LED.
If you choose 150 O you shoulg get approx. 3 / 150 = 20 mA, the voltage over the Led will increase very little

wiston likes this.
6. ### wiston Thread Starter New Member

Dec 26, 2016
7
0
Sorry, I don't get the part with p.E (shortcut??) sorry for my english or electronic abbreviations.

And please, where do you get 330 Ohm or 150 Ohm?

Sorry for my stupidity, I need to understand these basics. Can you please show me how to calculate the current in the circuit and required resistor for the LED?

Thank you

7. ### WBahn Moderator

Mar 31, 2012
24,356
7,611
Then you need to take the time to learn these basics. There are LOTS of tutorials and online educational material available, including on this website:

Start at the beginning and work your way through the material only as fast as you fully understand it. Skipping ahead is often a recipe for disaster.

The three laws that you want to get very comfortable with very early on are Ohm's Law, Kirchhoff's Current Law (KCL), and Kirchhoff's Voltage Law (KVL).

In the circuit you are working with, KCL requires that the current in all three devices (voltage source, resistor, and LED) must be the same.

KVL requires that Vout (from the Arduino) must equal the sum of the voltages dropped across the LED and across the resistor.

One property of diodes (including the light-emitting kind) is that when they are forward biased (i.e., conducting more than a tiny amount of current) they have a roughly constant voltage drop across them. For an LED, this voltage drop is primarily a function of the color. So, in most cases, a red LED is considered to drop about 2 V to 2.2 V. If you double the current or cut it in half, the voltage will probably only change by about 20 mV or so. As a result, we can usually just assume a fixed voltage drop in that range and get results that are "good enough".

So with this in mind, we have that

5V = Vr + Vled
Vr = 5V - Vled = 5V - 2.2 V = 2.8 V

Vr is the voltage dropped across the resistor and Ohm's Law tells us that it is equal to the product of the current and the resistance. Since the current in the resistor is the same as the current in the LED (remember KCL from earlier), we have

Iled·R = 2.8 V

R = 2.8 V / Iled

Now we just have to pick the desired LED current. In the "old days" the usual current was 20 mA for a run-of-the-mill LED. Today is it more likely to be somewhere between 1 mA and 10 mA. But you need to look at the specs for the particular LED to determine a reasonable current. If we use a current of 10 mA, then we would have

R = 2.8 V / 10 mA = 280 Ω.

Your original post seems to have the current at ~23 mA, which would yield ~120 Ω.

Flipping it around, if the circuit has a resistor of 220 Ω, then the current through a red LED would be expected to be about

Iled = 2.8 V / R = 2.8 V / 220 Ω = 12.7 mA, which is likely to be a good current for an LED that is spec'ed at about 20 mA of current. The human eye is pretty insensitive to changes in light output on the order of a factor of two and running LEDs at half their rated current allows plenty of margin for component tolerances and will make the LED last pretty much forever.

8. ### WBahn Moderator

Mar 31, 2012
24,356
7,611
THANKS!

@wiston: It is strongly encouraged to not link to third party sites. Instead, make a screen capture and post the capture (scaled and saved at a reasonable size and file type) here as part of your post. That way it will be archived along with the post, meaning that if someone refers to your post ten years from now, they will be able to see the diagram your post refers to. It also makes it so that the issue of the safety of interacting with a third-party site (think malware) is eliminated.

9. ### MrChips Moderator

Oct 2, 2009
18,895
6,052
The I/U characteristic curve of a PN junction semiconductor is an exponential function.
This means that the current will increase rapidly with only a slight increase of applied voltage once you reach a certain threshold or "knee voltage", i.e. where the I/U curve takes a sharp bend upwards.

For a red LED, this threshold is about 2.2V.

We don't need to be too critical about this voltage and we can round it to 2V for simplicity.

When the LED is to be powered from a 5V source, there will be a 2V drop across the LED. That means that 5V - 2V = 3V must be across some other component placed in series with the LED.

A resistor is the simplest why to drop this excess voltage.

Now we select how much current we want through the LED (and through all of the circuit elements connected in series with the 5V supply).

Many LEDs are rated to a max current of 20mA. In many cases this is overkill.
Let us select a current of 10mA.
The value of the series resistor has to be R = U/I = 3V/0.01A = 300Ω
330Ω is the next higher value. Hence we choose R = 330Ω

Next, we calculate the power dissipated by the resistor.
P = I x U = 0.01A x 3V = 30mW
Hence a ¼W resistor will do fine.

Edit: WBahn and I posted our responses independently. As you can see, we both made similar assumptions and arrived at similar results.

Try various resistor values from 220Ω to 1000Ω and observe the effect on the intensity of the LED. Get a DVM and measure the voltage across the LED and the resistor.
Calculate the current through the resistor (which is the same current through the LED) and plot your own I/U curve.

wiston likes this.
10. ### Tonyr1084 Distinguished Member

Sep 24, 2015
3,292
861
The voltage BEFORE the resistor is the same as the source. Whether it's an Arduino or a simple battery or plug in power pack, before the resistor it is the same voltage. AFTER the resistor some of that voltage must be calculated as a 'DROP'. More on that in a sec.

Your LED has a Forward Voltage. 2.2 is typical of a red LED, but forward voltages for other led's can be much higher. I know off hand that I have some super-bright LED's with forward voltages of 3.2 volts. That means they drop (there's that word 'DROP') 3.2 volts from the circuit. If your power source is 5 volts then if you drop 3.2 volts (5 - 3.2) you are left with 1.8 volts.

BUT WAIT! LED's are much less dependent on voltage as they are on current. The TYPICAL RED LED should operate on around 10 milli-amps. So you need to understand Ohm's Law. E (voltage) = I x R (Current times resistance).

If you have 5 volts from your supply and you know your LED will drop so many volts, lets stick with 2.2 volts for the sake of argument, then you have a circuit that has a remaining voltage of 2.8 volts. Voltage divided by current equals resistance. So 2.8 (volts) divided by 0.010 (10 milli amps or 10 mA) = 280 ohms.

The voltage drop across a 280 ohm resistor will be 2.8 volts, leaving 2.2 volts to light the red LED. But like I mentioned before, the LED is not dependent on voltage so much as it is dependent on current. In this case, 10 mA is sufficient to light the LED.

If your power source were higher you'd have a higher value resistor to keep the current down to 10 mA.

Kirchoff's laws basically say the sum total of the drops are equal to the total of the source. Be it voltage or current. If you have a 5 volt source and a 2.8 volt drop across a resistor and a 2.2 volt drop across an LED then 2.8 + 2.2 = 5. If your calculations come out that way then you've done it right.

{edit}

LOOKS LIKE THEY BEAT ME TO THE PUNCH. Slight differences but minor. 2.2 or 2 volts forward - very little difference. And Mr. Chips thought to mention the wattage of the resistor being used. That's something I neglected. Sometimes to my own detriment, I might add. Wattage IS important too.

FYI, you can light the same LED from 120 volts. You just need a much higher resistance value. In that case (using 120 volts) I'd ignore the forward voltage of the LED and just calculate for 10 mA. 120 ÷ 0.010 = 12000 ohms (or 12KΩ). And in this case, 120 X 0.010 = 1.2 watts. A physically much larger resistor to handle the heat generated from the resistor dropping all that voltage. There's that word again, DROP.

Last edited: Dec 26, 2016
wiston likes this.
11. ### #12 Expert

Nov 30, 2010
18,076
9,686
I guessed kind of high on that "red" voltage. Maybe because my drawer stock is over 20 years old, and maybe because I just have a poor memory.

At my age, I'm working with kilobytes of RAM.

12. ### WBahn Moderator

Mar 31, 2012
24,356
7,611
My rule of thumb is also 2.2 V for calculations (2 V for quick mental calculations). I just did a quick search on DigiKey and the forward voltage specs ranged from about 1.6 V (at 20 mA) to 14 V (at 14 mA). I would like to look more closely at the higher voltage ones than I have time for right now. Most of them, particularly if I narrow the search to T1-3/4 packages, tend to be between 2 V and 2.2 V, so I think either value is still good for rough calculations.

But one thing is for sure -- the variety available today is astounding compared to what we lived with a few decades ago.

wiston likes this.
13. ### Tonyr1084 Distinguished Member

Sep 24, 2015
3,292
861
At MY age I'm working with Kilogumes. (bites with no teeth)

14. ### wiston Thread Starter New Member

Dec 26, 2016
7
0
So Rezistors are created mainly for reducing the current?

And one more question. When I have some device that needs e.g. 5V with 1A current. I have an trafo (or adapter). In the past when I had trafo with same voltage, but lower current needed e.g. 5V and 0,5A I just used the trafo with higher current and everything was OK. Someone told me, that when I have trafo with higher current than I need, everything is fine and the device will take only Amps needed.

Is this true, and if yes, why?

Thank you!

15. ### wiston Thread Starter New Member

Dec 26, 2016
7
0
EDIT: I know, that when I have same Voltage and different current in trafo for my calculations are important Voltage and required current (like my example with LED) so my circuit should work with any current with the same voltage?

My next question is: how can I change Current with the same Voltage? And answer is I hope with resistance? When I decrease resistance my Current will be higher?

16. ### Tonyr1084 Distinguished Member

Sep 24, 2015
3,292
861
TRAFO ? ? ? Transformer? Wall wart? One of those things that plug into the wall?

If your circuit requires 5 volts and 200 mA (0.2 amps) and your "trafo" is rated for 5 volts 800 mA then yes, your circuit will only draw the 200 mA. Your trafo is big enough. But if your circuit requires 1.2 amps (1200 mA) then your trafo won't handle the load.

As for resistors, the name says it all. It resists current. NOT VOLTAGE, CURRENT! If you take a 5 volt transformer and put a test meter on it you'll see it has 5 volts. If you put a resistor in series with the test lead it will still see 5 volts. If you put the resistor across the leads (more on that in a sec) you'll still see 5 volts (in theory). The resistor across the leads will act as a load. Suppose you put a 10KΩ resistor across the test leads: At 5 volts powering a 10KΩ resistor your circuit is now seeing current flow of (5 ÷ 10,000) 0.0005 amps (0.5 mA, or 500 µA). Very low power consumption. 500 µA x 5 = 2.5 mW (milli-watts). A quarter watt resistor will handle that with no problem. However, if you use a 500Ω resistor then you're drawing 0.01 amps (10 mA). That times 5 (volts) means you're consuming 0.05 watts (50 mW). Again, a quarter watt resistor will handle that with no problem. Lets keep going down with resistance: 100Ω across the leads means (5 ÷ 100) 0.05 amps (50 mA). 50 mA x 5 volts = 250 mW. That's at the max of what a quarter watt resistor can handle. At that point it's worth going up to a half watt resistor. The quarter watt resistor will be running very hot resisting that much current. Resistance is like friction. The smaller the resistor the faster it heats up. The larger it is the slower it heats up. It may even be capable of dissipating that much heat without burning up.

You said
That worries me. If you're thinking that if you control voltage you don't have to worry about current. Well, if that's your thought then stop. Voltage is equal to current times resistance. Change any one and you change the whole thing. Now, if you're thinking that having a bigger transformer won't hurt your circuit, then yes, that's OK. Because it's like having a gas tank and a lawn mower engine. The mower draws as much fuel as it draws. A bigger tank means it can run longer between fill-ups. But if the tank is too small then the engine will starve for fuel. Not the best analogy, but I hope you can think in terms of big enough or bigger (regarding your trafo).

17. ### Sinus23 Active Member

Sep 7, 2013
245
805
Yes, but often used to divide voltage also.

Edit: One note though, I would say controlling the voltage drops and the current is the resistors primary role.

Last edited: Dec 28, 2016
18. ### wiston Thread Starter New Member

Dec 26, 2016
7
0
Thank you for great explanation! Of course I was talking about higher current than I need. If it is lower than I need I can see the problem of course

19. ### wiston Thread Starter New Member

Dec 26, 2016
7
0
I have last question. When I have power supply (battery) it supplies electricity to the electrical circuit. So the electrons are "moving" through the circuit from the "-" to "+" (in the real world i suppose). So after the electron passes through the circuit it is coupled with some proton on the + "end" of the battery? So finally at the end there are no electrons attracted by protons in the battery?

And where are electrons going when I use some transformer, wall wart or something.

Thank you!

20. ### #12 Expert

Nov 30, 2010
18,076
9,686
They just wiggle back and forth at the frequency of the local power company. It still requires energy to wiggle the electrons, and that energy is used by the device you are plugging in to the wall.