Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LED network switching according to 12V PMW

Stephane

New Member
Hello, I wonder about the realization of a switching of led network according to the linear value of a PMW 12V.

I would like to create a switching (without comparator) with a Mosfet type DMN2024 (may be with a voltage reference TLV431 ?) of 4 leds in serial mode (drop 4 x 2.5V) according to a linear value coming from a 12V PMW.

Here is the diagram describing what I would like to achieve, no problem to create the current limiter 30 mA but concerning the switch depending on the percentage of PWM ???? I need help (schematic ???, explanation ???)

1682933673022.png



Thanks in advance for your help
 
Not following your switch function and PWM. Eg. a PWM can create any duty cycle,
is it you only want the PWM for a given branch activate that channel when it achieves
a specified PWM % threshold ?

I see you talking about 12W but you only have 30 mA running thru LED when it is on.
The math does not add up to 12W ?

Current diode for constant current work :


Note is needs a 2.5V headroom, which implies 12.5V supply....


Regards, Dana.
 
Last edited:
you are right, for the current control I use rather a mosfet (N channel) with a voltage reference TLV431 (Resistance 39 ohm) to avoid this 2.5V. But still you are right with the AL5809

Concerning what I would like to realize.
The input is a 12V PMW signal (0 to 100%) then this input is connected to a diode capacitor circuit to linearize the voltage 50% PMW 12 V = 6 V +-/ ripple and connected to 12V PMW diffrent Leds network (3 or 4 depending of current control)

I would like to be able to
activate one network only when I exceed 6V
activate one led netwotk only when I exceed 9V
activate one led netwotk only when I exceed 10.8V

Thanks
 
Then 1 PWM is needed to service 4 channels, one channel active at a time.
A demux to steer PWM out to appropriate channel based on PWM value
currently being generated.

What resolutiuon do you want PWM to be, 8 bit, 16 bit....?

What creates the PWM source, do you need to create that as well ? What is
its clock rate desired ?

Regards, Dana.
 
One approach, no need to introduce voltage analog values (single chip) :

1682941259892.png


Basically PWM produces duty cycle desired for LED. When it is updated also a
value is written to the compare side of the digital comparators, that is compared
against the preset compare value trip points, and appropriate channel activated to
steer PWM value to appropriate LEDs. I did not show current source in the channel,
you would add that to the mosfet/led channel.

~ 10 lines of code needed, and this is a 1 chip solution. Note a lot of other resources left
for use, see right hand window for resources remaining/available.

Other stuff available on this chip, multiple copies in many cases :

1682941667758.png


I could use your approach, create analog value, then use onchip A/D to test for
threshold value, either way 1 chip solution except for current source and external LEDs
and MOSFETs.

Dev board ~ $15, IDE (PSOC Creator) and compiler free.


Regards, Dana.
 
I have an error, forgot to add priority encoder to compare outputs so
that only highest priority channel is only one on at a time. So easy to
handle, just add a LUT and config it, also onchip. Its wired up between the
digital comparator outputs and the respective AND gate input.

1682943080981.png


1682943044768.png



Regards, Dana.
 
thank you, however I have only one output (5V uC) PWM with a mosfet for driving 12V (10W). The Led Board with the 3 stages of led is deported with only one connector for 12V input (PMW) :eek:

Once again thanks for your support.
 
Then I would add this to design, also in chip, to take your PWM output
and determine its period and duty cycle to feed the decison comparators,
if I understand the problem. Note LCD onchip controller was just used for debug.

1682954616612.png


Regards, Dana.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top