Basic Ohm's law math

My arduino starter kit came with 20 560ohm resistors. Everytime I hook an LED up to 5V power I'm supposed to use a 560ohm resistor otherwise I might over power the LED and burn it out.

Check with my multimeter I see 5.04v before the resistor and, 1.98v after the resistor. The resistor is dropping the voltage as it should. My question is the math, how does one calculate what resistor to use for a given situation. What if I want 3v out instead of 2v?

Ohm's law saws that the resistance is V * I = R. V in this case would be 3v, but how do I know what I is?

V = I * R where V is the voltage drop across the resistor.

"Output voltage" is dependant upon current and resistance. A resistor does not provide a fixed voltage but provides a voltage drop based upon resistance value and current flow.

In the example you give where you start with 5 volts in and 3 volts out the value of voltage drop V = 2 so we have 2 = I * R or R = 2 / I

You therefore have the ability to manipulate R to produce a desired value of I. If you continue to use the 560ohm resistor then I = 2 / 560 or 3.57 mA

However if you want a particular current then you need to manipulate R to give the required resistance where R = 2 / I

Say you want I to equal 9 mA then R = 2 / .009 = 220 ohms Note that the calculation gives 222.22 but in the real world you can round that to 220 (a normally available value)

jack

You also need to know that LEDs haven't read the Ohms Law book... they "act weird".

More details at...

http://www.arunet.co.uk/tkboyd/ele1led.htm

The voltage drop is the amount I want to reduce my standard 5v to? If I had 5v coming off my digital pin and I wanted to drop that to 1.5v the equation would look like:

3.5 = 5mA * R

so R would be 700ohms?

Yes if you want 5mA to flow and the nearest preferred value would be 690 ohms jack

The point is you need to know what current you want to flow through the LED as a start point. Then you need to look up on the LED's data sheet what the forward voltage drop will be with that current flowing. Then subtract this value from the supply voltage. That leaves you with the amount of voltage you need to drop across the resistor. So you know the voltage across the resistor, you know the current through it (same a s the LED) then ohms law will give you the resistor value.

http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

Here is one of my OLD videos: http://www.youtube.com/watch?v=ictCxrkVdqs

@Jeremy1998: I strongly recommend you get a handle on upper and lower-case. 20MA through a LED is going to leave your workbench in a bit of a mess.

@Groove: I ment to do the all caps "OLD", emphasizing on how old it is.

You also need to know that LEDs haven't read the Ohms Law book... they "act weird".

Most devices other than resistors haven't read that book either. That's because Ohm's law applies to linear devices that exhibit a characteristic called 'resistance', and those devices are called 'resistors'. Ohm's law does not apply to non-linear devices such as light bulbs, diodes, microprocessors, etc.

Don

I ment to do the all caps "OLD", emphasizing on how old it is.

@Jeremy1998: I hope that sentence means something to you.

"mA" is the correct way of writing the unit "milli-amperes". "MA" is the correct way of writing the unit "mega-amperes", which is one thousand million times bigger than a milliampere.

Now, you're not very likely to encounter mega-amperes (unless you're interested in astrophysics), but you may well encounter mega-ohms and milli-ohms, so it's best to get the shorthand sorted out, before you hurt yourself.

OH! I had no clue! I will try t remember that... No promise though...