Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: New to LED's: resistance question  (Read 2296 times)

0 Members and 1 Guest are viewing this topic.

jholman76

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 188
  • Last login:May 05, 2015, 03:40:45 pm
New to LED's: resistance question
« on: July 07, 2008, 07:37:33 pm »
OK, so I am new to LED's and resistors.

I want to connect a LED to my PC (preferably through a molex connection) to light my trackball. I have bought a couple from radio shack that are 7000mcd. 25mA 3.3- 3.6V.

I basically want to take 12V or 5V and make it into 3.3-3.6V. Ive tried to figure out various sites that calculate resistance, but nothing is clicking... any help would be appreciated.

-Also I have a couple of LED's I pulled from my old Antec True Blue PSU that died and they have resistors already. I'm just not sure what kind of LED's they are. can I hook them up to a 5V or a 12V and see if they work? what happens if its too much for them?

Thanks.

Joe

weisshaupt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 128
  • Last login:April 12, 2024, 05:54:45 pm
    • The Ghost in the Machine Project Thread
Re: New to LED's: resistance question
« Reply #1 on: July 07, 2008, 08:53:03 pm »

Is the 3.3v the Reverse Voltage?  A LED is basically a Diode- Current will only flow in one direction, so if you hook it up the wrong way (reverse voltage)   it gets destroyed.

Normally forward voltage  is closer to around .7 - 1.2 Volts or so.  5V-Forward Voltage of the diode = the voltage across the resistor.  You want 25 mA current so solve the equation V=IR where V is the "left over voltage" after you subtract the Diode Forward Voltage from the Power Supply voltage, and I = 25 mA. Normally R should be in the range of 100-300 Ohms.

Normally as long as you don't exceed the reverse voltage by hooking them up the wrong way, a LED + Resistor will be fine, as the Resisotr will take on the "left over" voltage ( and might get very hot)   The 5 V power supply is the one I would dink with ..
“A government ... cannot have the right of altering itself. If it had, it would be arbitrary. It might make itself what it pleased; and wherever such a right is set up, it shews there is no constitution” - Thomas Paine, Rights of Man

Ed_McCarron

  • Nothing worse than Picard issuing the self destruct order and the next thing you know it your apartment blows up.
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2404
  • Last login:June 20, 2022, 02:33:39 pm
  • Get your mind out of the gutter. THIS is a dongle.
Re: New to LED's: resistance question
« Reply #2 on: July 07, 2008, 10:04:32 pm »
A LED is basically a Diode- Current will only flow in one direction, so if you hook it up the wrong way (reverse voltage)   it gets destroyed.

First part, yes.  Second part, no.  Hook up a diode backwards and current just won't flow - no destruction.

Try this:  http://home.cogeco.ca/~rpaisley4/LEDcalc.html

Fill in values.  Plugging in your numbers (12v, 3.3v drop, 25ma) gives 349.99 ohms, .22 watts.  A 360 ohm 1/4 watt resistor should do the trick.

As for the pre-resistored LEDs, try 'em on 5V first.  That way, on the off chance they are geared for 5v, they won't blow.  If they're out of a PS, I'd wager they are set for 12v.  Can you read the color bands on the resistors?
But wasn't it fun to think you won the lottery, just for a second there???

jholman76

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 188
  • Last login:May 05, 2015, 03:40:45 pm
Re: New to LED's: resistance question
« Reply #3 on: July 07, 2008, 10:26:24 pm »
Yes, I can...

LED<>--+pos------<resistor- gold, brown, red, yellow>----

from the LED, the positive (red) wire goes to the resistor and those are the bands. the red looks like a maroon or burgandy... dark red...

thanks

joe
       

Namco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 623
  • Last login:September 08, 2025, 04:47:00 pm
  • Now addicted to Williams pins... all of them.
    • Freddo Mame Project
Re: New to LED's: resistance question
« Reply #4 on: July 08, 2008, 12:45:08 am »
I'm going to bookmark this thread. Awesome answer from Ed to jholman's question, a question that I myself have been meaning to research. So you saved me some time.  :cheers: Thanks!
Yes, I can...

LED<>--+pos------<resistor- gold, brown, red, yellow>----

from the LED, the positive (red) wire goes to the resistor and those are the bands. the red looks like a maroon or burgandy... dark red...

thanks

joe
      

Using the calculator found here (and reversing the order of the bands): http://www.sizes.com/materls/resistorcolor.htm
I come up with 420 Ohms, too high for 5v, more like 12v... actually 14v, I wonder if it'll work for the 12?
« Last Edit: July 08, 2008, 01:02:14 am by Namco »

Dak-ak

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 29, 2008, 05:14:50 pm
  • RSD: Redefining Slacking Daily
Re: New to LED's: resistance question
« Reply #5 on: July 16, 2008, 06:08:19 pm »
I'm going to bookmark this thread. Awesome answer from Ed to jholman's question, a question that I myself have been meaning to research. So you saved me some time.  :cheers: Thanks!
Yes, I can...

LED<>--+pos------<resistor- gold, brown, red, yellow>----

from the LED, the positive (red) wire goes to the resistor and those are the bands. the red looks like a maroon or burgandy... dark red...

thanks

joe
      

Using the calculator found here (and reversing the order of the bands): http://www.sizes.com/materls/resistorcolor.htm
I come up with 420 Ohms, too high for 5v, more like 12v... actually 14v, I wonder if it'll work for the 12?

420 Ohms, at the rated 25mA, gives a voltage drop of ~10.5V on the resistor, 12V - 10.5V = 1.5V left for the diode, which is a much more reasonable forward voltage for an LED.  Most are that range or a bit lower, with blues being unusually high (closer to 2V).  Typically, at any rate. 

bluraven

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:August 04, 2019, 01:20:56 am
Re: New to LED's: resistance question
« Reply #6 on: July 16, 2008, 10:20:50 pm »
I'm also new to LED's and resistors, and at the moment trying to wrap my head around it also :)  I read in the LEDWiz documentation I think, that LED's are like goldfish, they will keep eating untill they pop, because they don't know any better of when to stop consuming.  So does that mean that LED's are not really 12v or 5v by nature?  They are just geared to run at those voltages by resistors?  So if I am working with a 5 volt power source, and I obtain some "12 volt LED's", I simply have to remove their resistors and put ones instead that work for a 5 volt power source (which would mean the resistors would resist less since there is less power to resist)?   :dizzy:

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: New to LED's: resistance question
« Reply #7 on: July 16, 2008, 10:57:49 pm »
This is a long post, but I hope it is informative.  I'm attempting to explain a fair bit of circuit theory using language that is fairly plain and easy to understand.  About all you need to know is the concept of current and voltage and a tiny bit of freshman algebra.  Please forgive me if I seem to gloss over specifics.


LEDs are diodes that happen to emit light.  They don't look like conventional light bulbs.

Conventional light bulbs draw current roughly proportional to the voltage you apply across them, like a resistor would (in fact, a light bulb is pretty much a resistor that is allowed to get hot enough to emit light).  This means they're fairly forgiving of minor variances in applied voltage.  They also can be made to take just about any voltage desired, and 5, 6.3, 12, and 14.4V are all common.  If you're off by a little, the current is also off a little from the design value.  This means it will either be dim or bright with corresponding small, but measurable differences in longevity.

LEDs conduct next to no current until a certain voltage is applied across them, then they will conduct just about as much as you can shove through it with negligible increase in forward voltage.  This is how diodes in general work, but LEDs happen to emit light when they are on (forward biased), which is cool.  The downside is that if you apply just a bit too little voltage, they are rather dim, and if you apply just a hair too much, they conduct lots of current, and you let the magic smoke out.  The relationship is actually exponential, rather than linear like a resistive light bulb.  People refer to the point at which it changes from increasing volage/little current to constant voltage/lots of current as the "knee" due to the sharp curve if you plot a graph.

Typical values for the voltage at the "knee" for a red or green resistor are between 1-2V, usually about 1.4-1.7.  For blue and white LEDs, the voltage is higher, sometimes as high as 6V.

Now, you probably only have a 5V and 12V power supply handy, so what to do?  You can go to the next higher rail above your rated forward voltage (Vf) and use a resistor to drop the exta.  If you go more than just a little above, you get the added bonus that the linear relationship between voltage and current of the resistor swamps the exponential behavior of the LED, allowing for more tolerance on your supply.  The only cost is the resistor and maybe 1/8-1/4W of extra heat - still less power overall than a comparable light builb might draw.

So, how do you calculate what resistor to use?  Well, up need some information about your LED from its datasheet and you need to know how a resistor behaves.  The first is easy: grab the datasheet.  The second is also easy: V=IR - voltage equals current times resistance.

We'll wire up our LED with our resistor like this:

Code: [Select]
O---|>---/\/\/\---O
+                 -
Where the + is your power supply + and - is your power supply ground.  You can swap the resistor and the LED if you want to.  There's valid arguments both ways about where to put it, but either is electrically correct.

Suppose there's 5V between + and -, and our LED is rated as follows (reasonable values below, but check your datasheet):
Typical forward voltage @ rated If:  Vf = 1.7V
Rated forward current: If = 10mA

Since we need to go across both the LED and the resistor to go from + to -, we can write:
Code: [Select]
Vpp = Vf   + Vr
5V  = 1.7V + Vr

So, we can do a little algebra to find that Vr should be 3.3V.  So, now we just need to make that happen.  Recall Ohm's law: V = IR.  We know V (it's Vr, or 3.3V).  We also know that we want 10mA (the rated If) to flow through the LED.  Notice that the current has no where else to go but through the resistor if it is to flow through the diode, so we know that I in V=IR = If = 10mA.  So:
Code: [Select]
3.3V = 10mA * R
R = 3.3V/10mA = 330 ohms

And, nicely for us, 330 ohms is a standard 5% value that you can buy at Radio Shack.  If you get a number that you can't buy, round up to the next value you can.  That will reduce the current slightly resulting in a dimmer LED, but that's better than going the other way and blowing up your LED.

You also need to consider the power dissipation in the resistor.  You can know that, though, because Pr = VrIr.  So, Vr = 3.3V, and Ir = 10mA, so Pr = 33mW.  So a 1/4W or even 1/8W resistor would be fine here.  Common practice is to oversize the resistor in terms of power handling by a factor of 2 or more if possible, otherwise they get really hot.


All that said, many LEDs people on here will buy will already have a resistor integrated with them.  These will usually be specified as "12V" LEDs or whatever.  This is common with the wedge base replacement types, but not discrete LEDs.

Oh, and one last thing about hooking up LEDs backwards.  If you exceed the maximum reverse voltage rating (Usually given in the datasheet as Vrm or something like that), you can damage it.  Without going into details, the diode will fail to act like a traditional diode and will suffer what is known as "avalanche breakdown" basically conducting a bunch of current until it breaks.  It also won't emit light.  If you keep the applied reverse voltage under the maximum rated, it won't light up, won't conduct any current (and therefore will draw no power), and won't be damaged.
« Last Edit: July 16, 2008, 11:00:25 pm by MonMotha »

protokatie

  • I DO try to be insulting and horrible to my fellow Terran
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1396
  • Last login:March 27, 2012, 09:36:43 pm
  • Is anyone here a member of team retard?
Re: New to LED's: resistance question
« Reply #8 on: July 17, 2008, 12:25:55 am »
Quote
Oh, and one last thing about hooking up LEDs backwards.  If you exceed the maximum reverse voltage rating (Usually given in the datasheet as Vrm or something like that), you can damage it.  Without going into details, the diode will fail to act like a traditional diode and will suffer what is known as "avalanche breakdown" basically conducting a bunch of current until it breaks.  It also won't emit light.  If you keep the applied reverse voltage under the maximum rated, it won't light up, won't conduct any current (and therefore will draw no power), and won't be damaged.

If I remember correctly from a digital logic book I read as a teen, there are some diodes designed to be reverse-biased (And wont suffer ill effects as long as the voltage isnt too insane). Apparently usefull in certain logic gates and as a way of biasing voltage based on polarity. (EG forward = Vs - 1.5v   Reverse = Vs - 4.5v) Then again, if memory serves, this was a feature in only non-LEDs (such as Zener diodes)
--- Yes I AM doing this on purpose, and yes I DO realize it is pissing you off.

---If my computers were cats, my place would look like an old widows house, with half of the cats having obvious health problems

Franco B

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3766
  • Last login:February 15, 2024, 09:14:06 am
Re: New to LED's: resistance question
« Reply #9 on: July 17, 2008, 01:13:00 am »
Just a bit of a heads up, I have always found [this] site handy for calulating resistors for LEDs. It also has a [LED series/parallel array wizard] which I have found very useful. You put the LED data/source voltage in and the amount of LEDs you wish to light and it will design an array for you (displayed as ASCII, schematic or a wiring diagram) and tell you what resistors to use and will also tell you how much power is being drawn etc.

AndyWarne

  • Trade Count: (+18)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1938
  • Last login:April 11, 2021, 03:37:09 am
    • Ultimarc
Re: New to LED's: resistance question
« Reply #10 on: July 17, 2008, 05:27:11 am »
Personally I just keep a 1 K ohm pot handy, and connect it in series with the LED and a multimeter to measure the current, set the pot to give the correct current according to the LED spec and then measure the pots resistance and choose the nearest resistor value.

Andy