LED bank night/day mode using single PWM

Thread Starter

Pete.CAN

Joined Oct 11, 2018
10
I am attempting to provide a low cost and adjustable night/day mode for a set of panel LEDs.
I have I/O outputs free but only one PWM.
Microcontroller I/O will be used to switch each LED on/off.
The LED On/Off control signals will be fed through AND gates with the second input taken from a PWM output.
In this way the output level of all the LEDs may be controlled (to a single level) using a single PWM.
Will the current capability of the AND gates be similar enough so as to give uniform LED intensity?
 

Thread Starter

Pete.CAN

Joined Oct 11, 2018
10
Apologies. Thanks for checking all the factors.
Up to 20 or 25 mA full brightness I would say. Its intended for a bright reflective/dazzle environment (marine). We are free to choice voltage but 3.3V and 5V available. Colour will be white or company colour of 470nm (off blue).
I have driven RGB LEDs using an AP3156 and 3 mA seems quite bright in the office.
The mechanics have not been decided though and guess heavy frosting to give uniform button lighting. So more current may be best.
 

Thread Starter

Pete.CAN

Joined Oct 11, 2018
10
Thanks, Who says you cannot teach an old software engineer new tricks ;)
So 5V CMOS then.
The micro is 3.3V so then I need level shifters and cost....
Sounds like this idea does not fly in white and also seems tight at 470nm (3.2V).

Would the current/intensity have been uniform if the forward voltages had worked out (i.e. each AND drives the same)?
 

ericgibbs

Joined Jan 29, 2010
21,439
hi,
If you are asking about apparent uniformity of White versus Blue, I would say the Blue would not appear as bright, taking this plot as a guide.

E
5snTb.png
 
Last edited:

ericgibbs

Joined Jan 29, 2010
21,439
hi,
Using a AND gate is so that you have PWM on one pin and a 'On/Off' control on the second pin could be realises by using a transistor + components.
Eliminates the need for additional level shifting.

E
EDIT:
A draft sketch posting of the project, showing the numbers of each type of LED and wiring pattern would helpful.
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
One possibility, PWM for each R, G, B channel. I got lazy and only wired up Red.
Part can handle the rest of the design. I picked 8 of each color as an example.
Other parts can handle more I/O, more total LEDs.

So you would have control, on/off each LED, and all Reds on one dedicated PWM,
same for G & B.

Lastly would have to look at allowed total rail currents, to not exceed them. That is
in datasheet.

upload_2018-10-11_19-8-58.png

Cypress PSOC 4 design. If you need A/D, monitor supply, temp blah blah blah part can also do that.

This is a single chip solution unless external power drivers needed to handle
LEDs, depends on how many you are going to use and their current ratings.

Regards, Dana.
 
Last edited:

Thread Starter

Pete.CAN

Joined Oct 11, 2018
10
Thanks.
In summary then:
The AND gates will each provide the same current and so we have uniform brightness (when using same colour) controlled with a single PWM channel.
I will need to use CMOS ANDs because of the current needed on each AND input.
I will need 5V logic if using white LEDs.
Thanks again, I learnt a lot!
 

danadak

Joined Mar 10, 2018
4,057
I will need to use CMOS ANDs because of the current needed on each AND input.
CMOS AND's (or for that matter CMOS logic in general) is a voltage input, with very
small currents needed to charge/discharge the input gate C (typically 2 - 5 pF).

Regards, Dana.
 

ericgibbs

Joined Jan 29, 2010
21,439
hi Pete,
When using 3.3V White/Blue LED from a 5V supply, you should have a series resistor in order to limit the current thru the LED.
Are the White and Blue separate LED's or are they an RGB type.?
E
 

Thread Starter

Pete.CAN

Joined Oct 11, 2018
10
Thanks,
The white and blue are presently made up using separate LEDs (ASMB-MTB1-0A3A2) - we were playing with colour schemes.
Our prototype drives 3.3V. The datasheet gives forward in range 2.8V to 3.5V.
Does that mean:
a) acceptable driving range i.e. that 2.8V will always switch on but don't go over 3.5V or it will fry
or does that mean
b) you may need 3.5V to switch on?
I would assume a) as otherwise there is no stated maximum voltage but why then 'typical' value?
 

ericgibbs

Joined Jan 29, 2010
21,439
hi,
This spread in working forward voltage occurs in all general purpose LED's.
Some users buy in quantity and select groups/batches that have the same Vfwd.

LED's will not self limit the current they can draw from a higher than a Vfwd supply, so a series resistor is required.

E
 

Thread Starter

Pete.CAN

Joined Oct 11, 2018
10
Thanks. Yes I will have a current limiting resistor. We used a charge pump before but are switching to PWM so we will need the resistor.

I am still not quite clear on how to read the datasheet. Is your reading that some of our LEDs may not switch on until they have 3.5V applied?
 

ericgibbs

Joined Jan 29, 2010
21,439
The LED may start conduction at just below the specified Vfwd, but the light output will be very low.
Perhaps this graph will show it better.
E
IV-curves-all-colours.png
 

Thread Starter

Pete.CAN

Joined Oct 11, 2018
10
Great. So if I want more current then I am likely to need a higher voltage.
The datasheet is telling me that I may need 3.6V to achieve 20mA.
Looking at the plot though I am likely to achieve 5mA or better at <3.3V however.
It just depends on the LED.
 

ericgibbs

Joined Jan 29, 2010
21,439
hi,
My next step would be to get a small quantity of White and Blue LED's and do some empirical test on that batch.
The problem is that light intensity is a subjective effect, especially in different ambient lighting conditions and the transmission quality of the planned frosting diffuser.
One way to match the White/Blue apparent light intensity would be by choosing a different resistor value for the White and Blue LED's
[thats is setting the operating current with a series resistor]

E
 
Top