| Electronics > Beginners |
| Basic LED Setup |
| (1/2) > >> |
| justinzagar:
So I have been trying over and over to successfully set up a USB powered LED light, with varying levels of non-success. My goal is to be able to put together a working - and lasting - LED bulb (or an additional bulb for a total of two) powered by a simple USB cord. Sounds simple, and as much research and experimenting I have tried, I simply cannot get the LED to remain constant when powered up. I've used a couple different resisters, a couple different USB cords (one with a dimmer, one straight to the power source, etc), but every single time, after about 10-20 hours of use, the LEDs will start to dim, and slowly fade to the point of being useless. I've used resistor calculators to help me try to sort this out, but I just can't seem to get the right formula. Here is some information on the components I've tried: LED Bulbs: 5mm Ultra Bright with Forward Voltage of 1.9-2.1v Resistor 1: 18ohm Resistor 2: 68ohm To sum up, I am looking to have 1 or 2 LED bulbs powered by USB. The USB should work either when plugged into a computer, or when used with a wall wart. Any assistance would be appreciated!! |
| Jwillis:
R=Vcc−Vf / If where R is the current limiting resistor , Vcc is the supply voltage ,Vf is the forward voltage of LED , If is forward current of LED . Remember LEDs are current driven not voltage driven.As long as the forward voltage is met. As the voltage increases the resistor value must also increase as well the resistor must have a sufficient power rating. It's as important to know the Maximum current rating of your LED and not to exceed that . Most USB should have at least 500 mA some as high as 1 amp of a available current but not always. If your LED is fading over time to destruction then the current limiting resistor isn't high enough or has an insufficient power rating. |
| rstofer:
--- Quote from: Jwillis on November 18, 2019, 09:34:01 pm ---R= ( Vcc−Vf ) / If where R is the current limiting resistor , Vcc is the supply voltage ,Vf is the forward voltage of LED , If is forward current of LED . Remember LEDs are current driven not voltage driven.As long as the forward voltage is met. As the voltage increases the resistor value must also increase as well the resistor must have a sufficient power rating. It's as important to know the Maximum current rating of your LED and not to exceed that . Most USB should have at least 500 mA some as high as 1 amp of a available current but not always. If your LED is fading over time to destruction then the current limiting resistor isn't high enough or has an insufficient power rating. --- End quote --- Added a pair of parenthesis to clarify operator precedence. You need to get the Vf and If values from the datasheet. There's no room for guessing. A common LED might only want 20 mA at say 1.8V so R = (5V - 1.8V) / 0.02A = 160 Ohms. Maybe pick 180 Ohms for a common value. |
| newbie_electron:
Make sure to short out the D+ and D- to let the computer know the USB you plugged into is a dedicated charging port (DCP) for max power delivery. As suggested by @rstofer, here is the schematic for your light bulb. Have a good day! |
| james_s:
Keep in mind too that 20mA is usually the max for small LEDs, in practice you will want to select a resistor that results in a bit less, I usually aim for 18mA if I want max brightness out of a 20mA max LED. The cheap white ones in particular will fade quickly at max power. |
| Navigation |
| Message Index |
| Next page |