For my Xbox 360 controller, I want to light up the A, B, X, and Y buttons. I'm going to use 3mm LED's with a red for the B button. Blue for X, Yellow for Y, and green for A.

The power supply for the controller is 5v. That means the resistor for a good brightness level while not using a lot of battery juice, would be 180Ohms. That's what we used in our Electrical Engineering class last year at least ( a 180ohm resistor for a 3mm led powered by 5v ). How many watt's should the resistor be though?
The standard resistor for current-limiting an LED powered by 5V is generally 330ohm, in my experience. 1/4 watt resistors should be more than enough, especially for little 3mm LEDs.
Assuming 2V through the LED the resistor would have 3V across it, yielding a current of V/R=17mA. That will be rather bright (I tend to aim for 10mA for a bright LED) and may even be out of range - as Kerm pointed out at least 330Ω would seem more appropriate, especially if it's for an indicator (you don't want them to be so bright as to be distracting).

Power can be calculated by multiplying current and voltage, so for the above example you'd be looking at 50mW. A standard 1/4W resistor should be more than sufficient.
The maximum current I would put through a regular (ie, not a super bright) LED is 30mA, so you're looking at 90mW tops, though 10mA (30mW) should be good for an indicator, as Ben pointed out. Throw in a bit of margin for safety, and a 1/8W (125mW) resistor could handle the current just fine. If you're tight on space in the controller, this is the way to go (of course there's always SMD...).

One word of caution: don't put more than one LED on a single resistor. Each LED should have its own resistor, otherwise the LED's could draw current unevenly, leading to premature failure.
Whoa, what kind of LED are you putting 30mA through? I hope it's a super-bright illumination (non-indicator) LED. Also, ++ on the second thing that christop said. LEDs are not matched in any way, so if they share resistors, one will draw more current. Not only will it burn out faster, but the brightnesses will be out of whack.
KermMartian wrote:
Whoa, what kind of LED are you putting 30mA through? I hope it's a super-bright illumination (non-indicator) LED.

That's the maximum current I would pass through an indicator LED. I would stick to between 10 and 20 mA to stay on the safe side.

Also, with a 5V power supply, you could put two LED's and one 100 ohm resistor in series. That should give you about 10 mA through the LED's (all components draw the same amount of current in a series circuit).

N.B. Indicator LED's don't run at exactly 2V; they typically run at between 1.7V and 2.2V, depending on the color and brightness. With 2 LED's and a 100 ohm resistor on a 5V supply, the actual current will be between 6 and 16 mA, which is a safe range.

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