My goal is to drive an infrared LED like (this SFH 4727AS) to control IR remote controlled devices (for example a TV).

I can already output the signal on a pin of my microcontroller. The signal has a carrier frequency of 38kHz.

I am however limited to a 5V 1A power supply and would like to drive the LED as close to the 5W psu limit as possible.

I first thought about using a MOSFET like this AO3400A together with a resistor, but decided it was worth using an LED driver, do you agree?

Now I’m looking at this PAM2804 constant current LED driver but I’m not sure if I can just supply my signal to the EN pin. The EN pin is meant for PWM-dimming, so does that mean the output is smoothed to prevent flickering?

I’d love to hear your thoughts about how I should go about this. Thanks

  • lemmyman@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    I wouldn’t use the PAM2804. The datasheet recommends a PWM frequency of 500 Hz, and if you look at the “PWM Dimming: ILED vs. Duty Cycle” chart on page 5 you can see why - at 1 kHz there is already a significant reduction in the average LED current. The enable response just isn’t fast enough to modulate at 38 kHz - by the time you want to turn it off, it will barely be on.

    This isn’t quite enough for your 38 kHz either, but it’s closer (and waaaay more complicated): MAX16834. The datasheet says it can do up to 20 kHz, but at a glance I did not see a particular spec that seems to actually limit that.

    Here’s an article about fast switching LEDs. All the linked products unfortunately have supply voltage ratings above yours, so they won’t work. But it discusses the concept of shunt dimming, where you’d end up simply bypassing the current around the LED rather than actually turning off the current regulator. Inefficient, yes.

    • silvio2402OP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Hey, thanks for your comment. I’ll look into the MAX16834 as soon as I have time tomorrow. Also, how would I be able to use a constant current driver with shunt dimming? How would I go about calculating the time a constant current source takes to recover from a short?

      • lemmyman@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        How would I go about calculating the time a constant current source takes to recover from a short?

        To the extent possible, I’d look for graphs of “load regulation” in the datasheet, which graphically depict the regulator’s response to a load change. But that seems like maybe an uncommon thing for LED drivers (neither of the two parts we’ve been discussing have those in their datasheets).

        Alternatively, if the regulator lists its control bandwidth in the datasheet, you could use the old rule of thumb to relate that to the rise time. For instance, if you’re modulating at 38 kHz, and you want to be sure your rise time is less than 10% of a period, you’d want it to be less than 1/380,000 = 2.6 microseconds. From the article, you’d want a control bandwidth of no less than 0.35/2.6 microseconds = 133 kHz. (or you could just say you want a bandwidth at least 3.5x your carrier frequency).

        Using that metric, the MAX16834 is more than capable - yet despite that, the datasheet suggests (not a hard spec) that PWM dimming is functional only up to 20 kHz. I don’t know how to explain that discrepancy. This is where I’d buy an eval kit and try it out to see what I’m missing.

  • cmnybo
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    I would just use a MOSFET and resistor to drive the LED if you are only using it in short bursts.

    If you want to drive the MOSFET directly from the microcontroller pin, it will need a series resistor to limit the current since the gate has quite a bit of capacitance. If your microcontroller pins can handle 15-20mA, it will be able to switch an AO3400A fast enough without needing a gate driver.

    • silvio2402OP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Hey, thanks for your comment. I looked at using a resistor in series with the LED, but if my calculations were correct I could only power the LED less than 3W and 2W would be wasted.

      R = (Vs-Vf)/If = (5V-2.8V)/1A = 2.2Ω

      PLED = Vf*If = 2.8V*1A = 2.8W

      PResistor = Vs*If-PLED = 5V*1A-2.8W = 2.2W

      Let me know if the calculations are correct.

      Edit: Calculations

      • cmnybo
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Those calculations are correct.

        Since the remote control signals are short and low duty cycle, you could use a capacitor to provide the peak current for the LED without going over the maximum current of the power supply.