Go Down

Topic: Controlling 34 LEDs and dimming them in unison... (Read 762 times) previous topic - next topic

450nick

Hi all! I am designing a new car instrument binnacle and am onto the task of backlighting. I estimate that I'll need 34 LEDs to achieve a nice consistent backlighting effect, but I have no idea how bright I want them to be (probably not very bright with 34 of them!). To do this, I was thinking of running all of them off a single PWM channel on the arduino and dimming them in unison using some sort of amplifier. Has anyone got experience of this that could maybe point me in the right direction with regard to hardware and how to configure it? Thank you in advance!

Grumpy_Mike

#1
Aug 20, 2019, 04:11 pm Last Edit: Aug 20, 2019, 04:25 pm by Grumpy_Mike
Quote
. To do this, I was thinking of running all of them off a single PWM channel on the arduino and dimming them in unison using some sort of amplifier
Yes this is simply done using a logic level FET.

Quote
Has anyone got experience of this that could maybe point me in the right direction with regard to hardware and how to configure it?
That depends on if you want to save on resistors by running some of the LEDs in series. Have you got a "stable" 12V supply or are you restricted to a 5V supply?

If you have 12V then you can wire them in groups of 3 with the resistor being set for the appropriate current through the LEDs ( see the LED's data sheet for this figure and the forward voltage drop )


450nick

Thanks Mike!

Well as it's in the car, there will be 12v, but probably not particularly clean. Safer to use my clean 5v feed?

There seems to be a lot of different types of FETs... Any idea what kind I should use? I'm scrolling through Eagle and there are millions of them!

septillion

The cleanness will not hurt, most lighting in cars is just straight from the battery. But do expect a little bit of difference in brightness when the engine is running because the voltage is higher.

Fet to use = fet that suits the job. So probably:
- Logic level
- can handle the current (including thermal) although with just some leds it's not that much
- can handle 15V Vds
- has a footprint you like
- is available (enough)
- cheapest ;)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Grumpy_Mike

#4
Aug 21, 2019, 06:56 pm Last Edit: Aug 21, 2019, 06:57 pm by Grumpy_Mike
With only 5V you can't have three LEDs in series, only one LED and one resistor. But you can parallel up as many as the FET will take.

Quote
I'm scrolling through Eagle
You should be scrolling through your electronics supplier.

Something like this:-
https://www.adafruit.com/product/355

450nick

#5
Oct 08, 2019, 11:38 am Last Edit: Oct 08, 2019, 11:39 am by 450nick
Ok so I have now designed the PCB and housing and am looking at what values to put on the LEDs, and which LEDs to use. I am looking for a really wide angle, white LED with a small footprint, and probably not too bright. I want the light to diffuse so you can't see individual light sources on the backlighting, and don't want the backlighting to be too powerful in a dark car.

I can turn the brightness down with the PWM but I'd rather have it not overly bright to start with so I don't introduce any noticeable flicker. Can anyone suggest a decent type of LED or part number to use? Here's what the back of the housing looks like; there is around a 50mm gap between the LEDs and the numbers that they'll light up. Any help would be very much appreciated!






Paul__B

#6
Oct 08, 2019, 02:11 pm Last Edit: Oct 08, 2019, 02:15 pm by Paul__B
Well as it's in the car, there will be 12v, but probably not particularly clean. Safer to use my clean 5v feed?
No, and a silly idea as it turns out.

LEDs do not care that much and  you will be under-rating them anyway.  If they are rated at 20 mA, you take the voltage drop times three, subtract that from your design figure of 16 V (a car is not 12 V when running, nominal 13.8 V), and calculate the resistor to match.  Edit: But even then, 10 mA may be plenty!

There seems to be a lot of different types of FETs... Any idea what kind I should use? I'm scrolling through Eagle and there are millions of them!
Eagle is a design program, not a retailer.  You choose a retailer (including eBay if you are patient) and see what they have which has the minimum specifications and is the cheapest!  N-channel by the way!  :smiley-eek:

Note:
  • Logic level: Its source-drain conductance is in the low milliohms specified at a gate-source voltage of 5 V or less.
  • Rated current at least twice what you calculate for your LEDs.  Ten times is just perfect if it is as cheap or cheaper.
  • Rated voltage is 50 V or better.  Sorry if someone said 15, that was silly!
  • Package to suit your PCB.

For example, these on eBay are pretty cheap.

The datasheet gives it a rated voltage (VDS) of 25 - not the 50 I would like but probably adequate.  Current rating 100 Amps( :smiley-eek: ) which should be plenty, but logic level - Drain-source resistance (RDSon) of no more than 4 mΩ, that is milliohm, at a gate voltage (VGS) of 4.5 V.  It will not require a heatsink!

And they are small!

450nick

#7
Oct 08, 2019, 05:07 pm Last Edit: Oct 08, 2019, 05:23 pm by 450nick
Thank you again Paul! I think I've found a mosfet so my next issue is the LEDs themselves.

I have picked most criteria:

- PLCC-2 package
- White colour
- Top view
- ~3.3v forward voltage


I'm down to just a few LED choices but I'm not sure at all how bright to go for. My options seem to be:

- 160mcd
- 540 mcd
- 1.7cd
- 2cd

My feeling is probably 160 or 540 mcd but I don't really have a feel for whether that will be bright enough or too bright. I suppose I'll need to pick up some and test but does anyone know what would be a reasonable starting point given my application shown above?

Current thought is this one: Link

or this one Link

Paul__B

There will be no such thing as "too bright", that makes no sense!  With due consideration to price, you use the brightest - which is to say most efficient - LED available.  You then choose your resistors to suit, that is how you manage the maximum brightness.

Note however that brightness figures do depend on the dispersion angle; a narrower beam will be more intense in the middle.  Your requirement will then depend on the diffusion layer in your assembly.

And you do not "pick" the forward voltage either.  For a white LED (which is actually a blue/ UV LED with a phosphor) it will generally be about 3.3 V; that is simply the nature of the physics.  :smiley-lol:

450nick

Thanks Paul, ok so maybe I go with this one then:

https://www.mouser.com/ProductDetail/OSRAM-Opto-Semiconductors/LW-T6SC-T2V1-5K8L-Z?qs=sGAEpiMZZMseGfSY3csMkZCQAwdWUKdfZ3wlsEskeFQ%3D

I guess I need to build a test rig then and play with resistance to determine brightness. Putting a bigger resistor on to reduce the brightness - would this generate much heat if all the backlights are on? I guess probably not...

Paul__B

I guess I need to build a test rig then and play with resistance to determine brightness. Putting a bigger resistor on to reduce the brightness - would this generate much heat if all the backlights are on? I guess probably not...
Where "bigger" means higher resistance, what is happening in this situation is that the LEDs drop a quite constant part of the applied voltage since they are by nature, constant voltage devices (they can actually be used instead of Zeners in some non-critical situations).

So for the same supply voltage, the same number of LEDs having much the same voltage across them, the voltage across the resistor will be the same so the higher the resistance, the less current will flow through it and it will get less hot.

AdrianGirling

A few thoughts, hope they are helpful:

If the voltage drop across each (white) LED is 2.7 volts it may be possible to string four in series with a smaller resistor value, but I do prefer the original recommendation of three becuse all LEDs will have consistent brightness with the exta headroom.  Assuming 14 volt supply, and 20mA per string, the power lost in the resitor is VI = 6 x 0.02 = 0.12 watts. Most axial resistors are at least 1/4 watt, so no problem. If the LEDs are good for 30mA, reduce the resistor value, still no power problem.  

Maybe check the LED voltage by running one in series with 100R resistor across the arduino 5V output.  If it's 2.7 Volts the current will be 23mA, 3.3 Volts, 17mA.

I'd just use a bipolar NPN transistor instead of the FET. It's being turned hard on and off, so it won't burn much power, so any transistor with a gain of say at least 100 and a current rating of at least 250mA should do.

Grumpy_Mike

Quote
If the voltage drop across each (white) LED is 2.7 volts
But it is not, that's physics.

Quote
I'd just use a bipolar NPN transistor instead of the FET. It's being turned hard on and off, so it won't burn much power,
In the linear mode a FET and a bipolar NPN will burn exactly the same amount of current into heat.

But in an on / off situation a FET is vastly superior because it has an "on resistance" R on, so the heat produced depends on the characteristics of the FET and the current I.
Power dissipated = I2 Ron
 
Where as a bipolar transistor has a minimum on voltage between collector and emitter Vsat so with a given current I :-
Power dissipated = Vsat * I

Given that Vsat will also rise as I increases, and that Vsat is in the order of 1.2V for currents of this size, compared with a FETs R on of typically 0.01 to 0.004 of an Ohm, I can't see any point in using a transistor for currents above 300mA. 

Go Up