inverting PWM?

Discussion in 'General Electronics Chat' started by s_mack, Apr 12, 2014.

  1. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    Hi. I have a circuit that I helped design several years ago. One of the components - an LED driver IC - is being obsoleted and currently is unavailable. Of course, I find out the hard way, with the factory ready to assemble and wondering if I can "do a quick redesign". Thanks guys.

    Anyway, there are no drop-in replacements and, in fact, I can't find any suitable replacement that behaves in the same way as the one we were using.

    In general: The LED is controlled by an EN pin that's counter-intuitive. When the EN is high, the LED output is off and when EN is low its on. If PWM pulse is applied to EN, a 100% duty cycle turns OFF the LED and a 0% duty cycle produces full current. Here's the diagram.

    [​IMG]

    Virtually all LED drivers behave the opposite (and more intuitive) way, with HIGH or 100% duty cycle resulting in full brightness, as you'd probably expect, and LOW or 0% duty cycle resulting in the LED being off.

    So I want to replace the old driver with a new one, but have the EN behave as before. Is it as simple as just using a logic inverter on the EN line? That should work for HIGH/LOW but I can't seem to wrap my head around whether or not that is suitable for PWM.

    The reason I don't want to change behavior is that this circuit interfaces with another circuit that is out of my design control. That other circuit utilizes firmware that is expecting to send HIGH/LOW/PWM as described before. It would be much simpler to implement this change if we didn't have to change firmware as well.

    info:

    PWM (and/or HIGH/LOW) is output from an ATMEGA64A GIOP
    Old LED driver Data sheet here.
    New LED driver yet determined but here's one I'm looking at.
    Input voltage was variable from ~7V to ~12V (suitable for old driver) but I can regulate it onboard simply enough as per new driver's needs.


    Thank you.
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    Reading the data sheets now but it should be just as simple as inverting the signal.

    Well... I don't think the new driver is PWM compatible, but no matter, the old "driver" is just a dual NPN transistor.

    If you were willing to redesign your board for the new IC it should be even easier to replace the dual transistr with another dual transistor, at most you have 1 external resistor to add, and the remainder of the circuit functions the same (as also does this block).
     
    Last edited: Apr 12, 2014
  3. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    It is... if I gave you the full info :) Sorry. I forgot that the datasheet covers 4 variants and I'm looking at the 4th, which is PWM.
     
  4. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    I hadn't really thought of it that way. It was cheap and did the job, but it looks like you're right!

    Still, I think I might prefer using the new driver if I can simply invert the PWM. Saves me from having to carefully spec out the transistors.

    Edit: Scratch that. Your suggestion is better, especially considering the detailed transistor specs are right there in the datasheet. Just being lazy. Thanks!
     
    Last edited: Apr 12, 2014
    ErnieM likes this.
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    Hey, anytime! You are welcome.

    Sometimes all it takes a fresh set of eyes to look for a sec.
     
Loading...