i am planning to put in 4 LED's... 1 in each A,B,X,Y Button. I tried this once already, but i guess i didnt get something right. i attached the wires to the positive and negative sides of all LEDs.
For each LED i need a 180 ohm resistor right? would it be correct to use a 720 ohm resistor for all 4 as a whole instead of 4 individual 180's?
and once i have the resistor.. i solder the resistor to power and the wires from positive to the resistor(s) and the wire from the negative to ground right?
thanks Ohm's law states that V=IR, where V = voltage (potential difference), I = current and R = resistance. You'll usually include a current-limiting resistor in series with the LED. The current is the same through both the LED and the resistor, and the voltage across both is equal to the supply voltage, and is the sum of the voltage across the LED and the resistor.

If you know the voltage across the resistor (supply voltage - drop across LED) and the maximum current rating for the LED you can then work out the desired resistance. Differently coloured LEDs will typically have different voltages and different current ratings, so it's usually best to have one resistor per LED. This is even more of an issue when you are driving different LEDs at different times (such as on a seven-segment display) as the brightness of the display will vary depending on how many segments you have lit if you're using a single resistor.

If we suppose the LED has a voltage drop of 2V and the power supply is 5V, that would be 3V across the resistor. With a 180R resistor you'd have a current of 3/180=17mA, which would be rather bright. For most LEDs on a 5V supply I'll generally go with 330R as a minimum, though the only real way to tell is to consult the datasheet for your LEDs.

I presume that if you were to use a single resistor you'd be connecting the LEDs in parallel. In this configuration the voltage drop across all of the LEDs would be the same (2V from the above example) which means that you'd still have 17mA flowing through the resistor. This means you'd also have 17mA in total flowing through all of the LEDs. This current would be shared amongst the LEDs, so every time you added one they would all get a bit dimmer. If you had four LEDs in parallel you'd need to have 17*4=68mA flowing through the circuit to retain the full brightness, and would need to pick a smaller resistor to compensate (44R). This has a further side-effect that if one LED fails in an open circuit, each of the other LEDs will now have a higher current flowing through them which could damage them. One resistor per LED is much more practical to deal with!

Where are you getting the power for the LEDs?

LEDs do not have a positive and negative; they have an anode and a cathode. Current flows into the anode ("positive") and out of the cathode ("negative"). The anode typically has a longer lead than the cathode and the cathode will usually be on the flattened side of the package, but unfortunately not all LEDs follow this system.

I'm sorry if the above rambling doesn't make much sense; it's been a long day. Ben, you post seems totally sensical to me. To paraphrase:

1) 330 ohms is a good rule-of-thumb if you're not positive what the supply voltage is
2) (Vsupply - 2)/0.01 = 100(Vsupply-2) would be a good resistor value for a single LED in series with a resistor connected to a supply of Vsupply volts. For example, Vsupply = 5 -> resistor = 100(5-2) = 300 ohms, close to the 330 ohm rule of thumb.
3) Two resistors in series = (Vsupply - 4)/0.01, so a 100-ohm resistor would be sufficient.

Plus of course the more complex parallel-LED arrangements that Ben explained.

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» All times are GMT - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum