×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Help on designing a LED circuit

Help on designing a LED circuit

Help on designing a LED circuit

(OP)
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
 

RE: Help on designing a LED circuit

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.- http://www.flaminsystems.com

RE: Help on designing a LED circuit

One FET per panel and control the drive signals to the FETs individually via logic or a uP as Keith suggests.?
 

----------------------------------
  Sometimes I only open my mouth to swap feet...

RE: Help on designing a LED circuit

(OP)
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.  

RE: Help on designing a LED circuit

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.

RE: Help on designing a LED circuit

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.
 

----------------------------------
  Sometimes I only open my mouth to swap feet...

RE: Help on designing a LED circuit

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.- http://www.flaminsystems.com

RE: Help on designing a LED circuit

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.

RE: Help on designing a LED circuit

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
http://www.Hi-TecDesigns.com

RE: Help on designing a LED circuit

(OP)
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.

        

RE: Help on designing a LED circuit

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.

RE: Help on designing a LED circuit

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.- http://www.flaminsystems.com

RE: Help on designing a LED circuit

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?

RE: Help on designing a LED circuit

Keith,

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

----------------------------------
  Sometimes I only open my mouth to swap feet...

RE: Help on designing a LED circuit

We are indeed.  I think I'm giving up on this one.. Disconnected and strange.

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: Help on designing a LED circuit

(OP)
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.

RE: Help on designing a LED circuit

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.- http://www.flaminsystems.com

RE: Help on designing a LED circuit

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
http://www.Hi-TecDesigns.com

RE: Help on designing a LED circuit

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.

RE: Help on designing a LED circuit

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
http://www.Hi-TecDesigns.com

RE: Help on designing a LED circuit

You have 12 on-off outputs or bits to control the panels to make your arrow pattern "moving".

You want to vary the brightness of all panels the same amount.

So, set-up one PWM output in the software. Then just software AND the new PWM output and the on-off output you already have. Make the AND output signals the new outputs to the panels.

You already have the required hardware....

RE: Help on designing a LED circuit

Thanks macgyvers2000
Not trying to hijack the thread.
The pwm is ONE (there are two) of my two newest and biggest problems.  I am going to try to set up it in an interrupt.  My specs call for a much slower clock than the 1kHz, that should not be a problem, but I have a pwm signal accuracy of +/- 50ns that has to be maintained, this is my worry.

RE: Help on designing a LED circuit

Steve start a new thread and we can all look at it.  Sounds interesting.

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: Help on designing a LED circuit

I hope you have a fast processor... 50ns accuracy is 20MHz.  If you plan on running something like a PIC, don't forget the clock signal is divide-by-4... even at 80MHz you won't have any slack if interrupts lag for one reason or another.

As Keith suggested, start a new thread and we'll help where we can.

Dan - Owner
http://www.Hi-TecDesigns.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources