How to dim 4.5v fairy light LEDs on a USB supply?

Thread Starter

TimBav

Joined Jun 19, 2020
7
Hi folks, plea for help.

I've wired my daughter's LED fairy lights to a USB-2 supply, but now they're much brighter than the 3 AA batteries made them (and we quite preferred when the batteries were half flat), so I've been trying to find a variable resistor to put in series to reduce the intensity.

I bought a one on eBay before I did the sums suggesting I needed something around 1Ω (5V-4.5V=0.5V, 0.5A, 0.25W) so what I got is 37Ω-1kΩ and 0.2W, so I know I'm going to have to buy something smaller, but even if the new one is rated for 0.25W, I'm worried about putting it in the plastic battery case the LEDs came with - will it overheat or something? Should I buy for more than my rated wattage?

I looked for fixed resistance 1Ω 0.5W resistors on eBay, thinking I could just put them in series and/or parallel to adjust things permanently, and forget variable dinning, but now I'm doubting my calculations and assumptions - do I need 10Ω instead? I only have one AA battery's space in the case, because I'm using two batteries to wedge the usb power leads in place. :)

Any help would be very welcome!
 

DickCappels

Joined Aug 21, 2008
6,820
LEDs themselves are nonlinear and that might be what made your calculation come up with a less than satisfying result. You can usually be ok by just assuming a fixed voltage drop across the LED before calculating the resistor needed to get a particular current. Also, be aware that the color of the LED correlates with the voltage across it -the shorter the wavelength the higher the voltage.

You did not mention the voltage required, but have you thought about one of these?
https://www.ebay.com/itm/DC-DC-5V-3...710165?hash=item3da30049d5:g:QAEAAOSw9SxeuWnP

If you are going the resistor route make sure there is plenty of surface area to get rid of the heat by convection and radiation. Sometimes it makes sense to get a heatsink resistor and bolt it to a metal plate that will improve the removal of heat.
1592642322678.png

If it is so hot that it hurts your skin make the heatsinking surface larger. Putting such a resistor in a sealed box creates an oven, so poke some holes in it.
 

Thread Starter

TimBav

Joined Jun 19, 2020
7
Where did you get .5 A for the current? It is more likely 1/10 of that.

Bob
I thought usb supplies 500mA unless the equipment negotiates something else, but now you ask me, I realise that's a maximum and I need to break out my ammeter to measure it. Thanks for the pointer!

I'm a software person, not hardware, hence my naïve question! :)
 

Audioguru again

Joined Oct 21, 2019
2,445
A resistor is made to produce heat. A lot of heat. At its maximum power rating it will be hot enough to melt plastic. If it is enclosed then it will still be very hot at half of its maximum power rating.
 

Thread Starter

TimBav

Joined Jun 19, 2020
7
Where did you get .5 A for the current? It is more likely 1/10 of that.

Bob
Ok, having actually measured, it's bobbling about 88mA. And the supply is actually 5.1v.

So... 5.1V/0.088A says the lights are 58Ω and 5.1*0.088 is... 0.45W. So to drop 5.1v to maybe 3v for tired batteries, is... 3:2, so a 40Ω resistor, and p=v²/r says... 26/100, so 0.26W, of which 2/5 is across the resistor, so 0.1W?

I guess I don't need a heatsink for 0.1W, even in a box?

Am I still going to need a heat sink?
 

DickCappels

Joined Aug 21, 2008
6,820
Highly unlikely that you will need to worry about heat.

Do you mind putting together
Something with a transistor or something similar?
 

Thread Starter

TimBav

Joined Jun 19, 2020
7
Highly unlikely that you will need to worry about heat.

Do you mind putting together
Something with a transistor or something similar?
I started looking into an npn circuit, but I'm not experienced in translating the graphs into supporting components - like should my potential divider across the 5V into the base be 1k or 1M - and a nice benefit of adding a resistor is that the LEDs are on a circuit that turns off (as well as making them flash etc), and a resistor would work with that, whereas a transistor will keep using (some) power just to supply a circuit which is off.

So it looks like I'm going to get some 10Ω resistors and put them in serial, so I can adjust the resistance if need be.

Cheers everyone!
 

BobTPH

Joined Jun 5, 2013
2,760
Now you are making another mistake by assuming the LED will draw the same current at the lower voltage. What you really need to do is find the current through and voltage across the LEDs at the brightness level you are aiming for. You are also ignoring the fact that there is already a resistor in series with the LEDs.

If I had to guess, I would say you want about 1/4 of the current you are seeing with the 5V supply to dim them significantly. And, assuming they are white, the voltage needed is probably around 3V. So, lets say 22 mA at 3V with a 5V supply. So the desired total resistance is (5-3) / 0.022 = 91 Ohms.

Based on 4.5V and 50mA, the existing Resistor, I guesstimate at 30 to 50 Ohms. So 40 is probably within a factor of 2 of what you want.

Bob

BTW, I am also a software engineer who will celebrate his 50th anniversary of workong on compilers next year. I am currently working on a compiler for PIC24/33 with ada like syntax and java like classes.
 

DickCappels

Joined Aug 21, 2008
6,820
Just a note about low current transistors in a circuit that dims LED, if you turn the base voltage (or current depending upon the circuit) to zero then no current will flow through the emitter or collector either, except for some leakage current that can range for a few nanoamps to a few microamps. <== That tiny amount of current is so small it is very difficult to measure accurately.
 

Thread Starter

TimBav

Joined Jun 19, 2020
7
Now you are making another mistake by assuming the LED will draw the same current at the lower voltage. [...]
Based on 4.5V and 50mA, the existing Resistor, I guesstimate at 30 to 50 Ohms. So 40 is probably within a factor of 2 of what you want.

Bob

BTW, I am also a software engineer who will celebrate his 50th anniversary of workong on compilers next year. I am currently working on a compiler for PIC24/33 with ada like syntax and java like classes.
Thanks, sorry for not getting back to you. I ended up putting 100Ω in series and it turned out to be just right.

I'm always surprised when folks use compilers for PIC chips, because I've never programmed one and I'm sure they used to be really small. It feels like you should be using machine code! :)

I almost accepted a job in Bracknell with White Cross working on parallel database SQL something something compilers a couple of decades ago. I love data conversion - my final year project was a C compiler written in BBC Basic for the Acorn Archimedes.
 

Thread Starter

TimBav

Joined Jun 19, 2020
7
Just a note about low current transistors in a circuit that dims LED, if you turn the base voltage (or current depending upon the circuit) to zero then no current will flow through the emitter or collector either, except for some leakage current that can range for a few nanoamps to a few microamps. <== That tiny amount of current is so small it is very difficult to measure accurately.
Hi, thanks for this. I'm sure you're right, but the circuit already had an on-off switch so the resistor seemed like the simplest solution - particularly not needing a circuit board.
 

BobTPH

Joined Jun 5, 2013
2,760
I'm always surprised when folks use compilers for PIC chips,
The PiC24F, PIC33F have as much as 1MB of program memory and run at as much as 120MHz. When I started on compilers, mainframes were not near as a powerful as that! On the other hand, they max out at 32KB of RAM.

Bob
 

Thread Starter

TimBav

Joined Jun 19, 2020
7
When I started on compilers, mainframes were not near as a powerful as that! On the other hand, they max out at 32KB of RAM.
Computers are so strange - given how I throw data around now, it's almost impossible to imagine how we managed word processors in 16K ROMs, or entire games like Elite in 32K given nearly 20K of it was screen memory! And even more absurd how little 32K is these days.
 
Top