PWM and Power supply requirement question

Discussion in 'The Projects Forum' started by russpatterson, Jun 17, 2011.

  1. russpatterson

    Thread Starter Member

    Feb 1, 2010
    351
    16
    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?
     
    Last edited: Jun 17, 2011
  2. wayneh

    Expert

    Sep 9, 2010
    12,086
    3,024
    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.
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  4. russpatterson

    Thread Starter Member

    Feb 1, 2010
    351
    16
    @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?
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  6. russpatterson

    Thread Starter Member

    Feb 1, 2010
    351
    16
    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.
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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....
     
  8. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,000
    1,512
    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?
     
Loading...