Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on designing a LED circuit

Status
Not open for further replies.

Morcego

Industrial
Apr 11, 2005
39
Hi all,
I need your opinion on a circuit:

I have 12 panels of 55 Leds each. Each panel is powered by 24 VDC (as internal limiting resistors. the total current is about 300mA). The 12 panels must be able to shwitch in sequence or all at the same time.

This is not a problem of course. The problem is that I must also control the brigtness of ALL panels at the same time using PWM.

So if I have the negative side of the panels connected to the ground via a MOSFET transistor that does the PWM, wath is the best way to switch on and off each individual panel while mantaining the PWM ?

Use anothe transistor at the 24V side?

(I cannot use relays because the switching frequency can be about 200ms)


Thanks in advance

M
 
Replies continue below

Recommended for you

Use the transistor in the base to turn them all on and off!! You just run the PWM down to zero.

I hope you're running them with a micro?

Keith Cress
Flamin Systems, Inc.-
 
One FET per panel and control the drive signals to the FETs individually via logic or a uP as Keith suggests.?


----------------------------------
image.php
Sometimes I only open my mouth to swap feet...
 
Hi,
Yes I will use a micro. I know that I can turn them ALL off by putting the PWM to zero.
I need to have INDIVIDUAL on/off control of each panel. That's my problem.

This is for led (panel) arrows in a highway curve, The arrows will turn in sequence one after the other to alert the driver that the curve is dangerous. This is circuit is already working. The problem is that the high brightness Led's used (must be to be visible in the day light) are to bright at night. That's why I need to redraw the circuit to control the brightness while keeping the individual control of the arrows. One other approach is using a programmable step down regulator and bring down the voltage, but I cannot find such an IC...

thanks

M.
 
I think you missed ScottyUk's answer to your question. Let me re-word it for you. Rather than having one PWM for all 12 panels, have 12 PWMs, one for each panel. Then turning any individual channel off is just a case of gating off that PWM drive. This makes each PWM stage smaller and neater anyway.
 
If you are using a micro why can't you establish individual PWM channels for each panel you wish to control? Then you can have some bright, some dimmed, some off, or whatever combination you choose.




----------------------------------
image.php
Sometimes I only open my mouth to swap feet...
 
If these individual panels are spaced apart you run each one with a very small micro and tie them all together with a simple communications line. That way you aren't running a fast signal over any distance.

Make one a master that also has a light sensor that maintains the required brightness based on the ambient light.

Meanwhile each segment is commanded with it's required turn on time, brightness, and duration. That will allow you smoothly or harshly switch segments, whatever you find most appealing or effective.

The boards will be so small and simple that you just make them all identical, even though one is to be the master.

Keith Cress
Flamin Systems, Inc.-
 
I think a 2 input AND gate solves this problem. PWM to one input, on/off to the other, output to the panel. You can either use a gate per panel or use the AND function in your software.
 
One FET for each panel, followed by one FET for the entire set's powerline for PWM... 13 FETs, all can be PWMed to the correct brightness, each panel can be turned off individually.


Dan - Owner
Footwell%20Animation%20Tiny.gif
 
Dan,

Do you mean connecting all the sources of the panels MOSFET's to the drain of the PWM MOSFET and the drain of this one to the ground (keeping the positve side of the panels allways connected to the 24V)?

This was my original ideia, but I'm not sure if it works correctly.

TIA

M.

 
That is not a good idea. When the main PWM is off, the drain of the MOSFET is pulled to +24V. This reverse biasses all the other MOSFET gate-source junctions by 24V. They will either blow up or internal protection zeners will conduct and blow your drivers. Since you are driving from a PAL or micro anyway, you actually save money (one large MOSFET) by not having the "global" PWM MOSFET, and just gating the other MOSFETs inside the PAL/micro.
 
I still don't get it.. If you can turn each panel ON/OFF for brightness modulation you don't need ANOTHER MOSFET just to turn them all ON and OFF.

Keith Cress
Flamin Systems, Inc.-
 
This is an already existing product that you are adapting, right? You are not throwing away the actual control circuits and replacing it with a new one? Then to make it transparent, you need a add circuit that will PWM the 24 volt source to the LEDs, independently of the rest of the circuit that drives the sequences of arrows.

Make sure that the circuit that will PWM the 24 volts only modulates the upplies to the LEDs, and not to the rest of the circuitry. Can this be done just with say a new harness that adds a little box somewhere, or should you modify each control boards to accomplish this?

There isn't just one good way of doing this. The best approach to take will depend on your system configuration, and how you plan to modify them (in the field or bringing them back at the factory). Can you tell more about that?
 
Keith,

I think we are talking the same language. Are we alone?


----------------------------------
image.php
Sometimes I only open my mouth to swap feet...
 
Thanks guys for all the answers. I will try first the easy one as Keith and Scotty suggested. But my micro only as 4 pwm channels and I need 12. I don't know if I can implemented them in software. The other suggestions; AND gates and PWM the entire power source (except for the micro power supply of course) are also very valid options.

One of them will work!.

Thanks again

M.
 
Hi Morcego.

You know, I rarely get satisfaction from the crummy PWMs included in micros to provide PWM "since the competition has PWM".

I generally just use a timer.

Set one up for 1kHz and just mess with making one PWM based on that. Once you have that, think of how to run all the panels at once. It won't be hard.

You may even find it useful to sequence the panels as that will balance the power distribution too. Like Panel B is turned ON During panel A OFF times. Etc.

Keith Cress
Flamin Systems, Inc.-
 
I almost always use software-based PWMs, mostly because my line of work requires a large number of them from any one chip. Once you write the routine, the only reason you have to switch back to hardware is if you're running out of cycles.

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
All of this brings up an interesting question:
I have been working on and off on a project here for about the last 9 months. The project started out with an 8 bit µC, one discrete input, one discrete output, one analog input, and a single pwm to drive a motor. All was well and good. I had it working fairly well. Then everything changed as it always does and now it needs to have 1 pwm input, 1 analog input and 2 pwm outputs I was using the internal timers for the single pwm but now I need 3 and it only has two timer channels. I don’t know were go, I was thinking of changing the µC. A software pwm work fine in theory, but how do you keep the signals exact?

Here’s what I don’t understand:
If you have your 1 KHz timer running, and say 8 different outputs being toggled from it, each on a different duty cycle, how do you keep the duty cycles exact? How do you keep the timer running at exactly 1 KHz? When the µC is servicing the pins it cannot be running the timer and visa versa.
 
The timer runs in the background as an interrupt routine, so servicing the pins has no effect on its ability to keep time. At 1 kHz your resolution is 1ms, so all PWMs will need to be at this resolution or more coarse (not including the jitter due to determining which pins go high/low with each check). Depending upon how your algorithm is set up, doing 100+ software PWMs from a single (large) uC is simple, particularly with a 1ms resolution (assuming a multi-MHz clock). Duty cycle is only a function of your maximum count for each PWM, and none of them need to be the same... in case it's not obvious, the duty cycle is a separate entity from your resolution and one has no real effect on the other.

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor