PWM and Power supply requirement question

Thread Starter

russpatterson

Joined Feb 1, 2010
353
Hi,

I've got a question. I've got 4 strings of LED's that each draw 3.3 Amps at 12V. Two strings are green, two are yellow. I fade between the two. So when the green is 100% on, the yellow is 0% on, etc. They are never both 100% on.

If All 4 strings were on (100% duty cycle) then it would draw 13.2 Amps and I would need the 4, 5 amp power supplies. However since I don't run 100% duty cycle for both colors of lights at once, at most it's 50/50, then you might think that I would only need 2, 5 Amp supplies.

The reason I think I need four supplies is that when I'm at say 50/50 for both colors, (PWM at 300 Hz) then all the strings are on at the same time for the first part of the duty cycle, then off for the rest of the duty cycle. So, even though it is for a very short time (1/600th of a second) it's drawing the full 13.2 Amps. Is this correct?
 

Attachments

Last edited:

wayneh

Joined Sep 9, 2010
18,088
Sounds right. Are all strings on the same clock? Even if they aren't, it could happen randomly from time to time that the pulses get in synch.

I think some buffering could prevent the power supply from seeing anything other than the DC component, though, the time-averaged current. This may already be built in to your supplies.
 

SgtWookie

Joined Jul 17, 2007
22,230
You'll increase the ripple current in your supply's output capacitors quite a bit, possibly overheating them.

Why not make the PWM signal for one color complementary to the other colors' signal? As one color fades in, the other fades out, so your supply current flow is constant. That basically removes the ripple current on the output filter.
 

Thread Starter

russpatterson

Joined Feb 1, 2010
353
@wayneh, yes they are all on the same clock.

@SgtWookie, I did it that way at first. I used the half-bridge mode on PIC's ECCP module, with the programmable deadband and everything. I thought I was being pretty clever but the guy sent it back because his green LED's were putting out 3 times the lumens of the yellow LED's and overpowering the yellow, ruining the effect he was after.

So I decreased the maximum green duty cycle but in doing so the yellow never fully turned off (if green is 70% then yellow is 30%). I thought this wouldn't be that bad since the green should overpower the yellow at those numbers but the guy didn't like it. So I had to break out each color on it's own PWM pin, re-do the firmware and re-wire it. At least now I've got that half-bridge mode figured out.

So you agree that the 4 power supplies are what's needed?
 

SgtWookie

Joined Jul 17, 2007
22,230
The human eye is most sensitive to the color green, which is why that did not work so well.

I don't have a good answer for you at the moment.
 

Thread Starter

russpatterson

Joined Feb 1, 2010
353
I guess it might be possible to set two of the PIC timers with the same attributes, set each PWM peripheral to use a different timer. Then start one, then start the other once you've reached one half of a duty cycle. How you do that I'm not sure. Maybe setup an interrupt at double the frequency of the timers and start each one in the interrupt routine. That might work but you'd still have some overlap.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, so can you increase the deadband significantly when the yellow is dimming and the green is predominant?

I don't know offhand what your deadband limit is. You probably started off with a constant value for the deadband. However, if you could increase the deadband while the green was increasing in intensity....
 

shortbus

Joined Sep 30, 2009
10,050
May be a dumb way to make both colors give the same brightness, but, couldn't you change the dropping resistor value to make both colors look the same? If not, why?
 
Top