I'm using a PWM IC to control some LEDs, and it uses an Open Drain setup. So I run 5V to the LED (through the appropriate resistor) then connect the LED ground to the PWM terminal.

I have one led that uses 100mA, which I believe is too much for the PWM IC. So I thought I would use a MOSFET, but I don't understand them enough to make this work.

The gate of the MOSFET is what the PWM IC would control to change the brightness, but the MOSFET requires a voltage to the Gate to close, and the PWM IC would only connect it to Gnd as an open drain.

I'm guessing I'm just wrong to use an N-type MOSFET for this setup, but I don't know what I should be using.


simulate this circuit – Schematic created using CircuitLab

The schematic doesn't show, but the PWM is open drain, so just a connection to gnd. The other LEDs being used are all drawing less than 40mA current, so they go directly to the PWM IC

Parts: PWM IC - PCA9685 MOSFET - MMBF170L LED - IR333-A

Thanks for helping a clueless hobbyist. -Seth


2 Answers 2


If you are going to use a BS170, use it like this (with the PCA driver configured as a totem pole output): -

enter image description here

At the moment you have the source connected to the positive rail and the internal body diode will conduct all the time and you won't be able to turn the LED off.

Regards the other LED outputs connected directly the the PCA device take note what its data sheet says: -

The LED output driver is programmed to be either open-drain with a 25 mA current sink capability at 5 V or totem pole with a 25 mA sink, 10 mA source capability at 5 V.

In other words, if you are trying to source current into an LED you will only get 10 mA LED current.

  • \$\begingroup\$ Ok, thanks for the quick reply. If I'm reading it right, the reason I want it configured as open drain is because I can run more current through the LEDs. So I want totem for the one high intensity LED, and Open Drain for all the others. But the PCA only does one or the other. So is there a way to drive the high intensity LED using open drain and a MOSFET? Or am I still way off base? \$\endgroup\$ Jun 5, 2017 at 11:08
  • \$\begingroup\$ I should add that I'm not committed to the N-type MOSFET, I'm happy to use whatever part is best for this application. But as I understand it, Open Drain on the PCA is better for my purposes (the other LEDs), so whatever works with that works for me \$\endgroup\$ Jun 5, 2017 at 11:29
  • \$\begingroup\$ You can configure them all as totem pole and still pull 25 mA sink current. Those LEDs won't care/know the difference. \$\endgroup\$
    – Andy aka
    Jun 5, 2017 at 11:31
  • \$\begingroup\$ Ok, so if I do that, rather than running +5v to the resistor, then led, then PCA, I'll now run PCA (providing 5V), to resistor, to LED, to ground? \$\endgroup\$ Jun 5, 2017 at 11:52
  • \$\begingroup\$ No, because you will only get 10 mA (sourcing current). Sinking current means +5-->resistor-->LED-->PCA_pin \$\endgroup\$
    – Andy aka
    Jun 5, 2017 at 12:04

If your IC is an open-drain, then you are required to pull that pin to 5V with a resistor. The resistor value will determine the rise time of the high signal. Right now, all your PWM is doing is toggling between 'floating' and GND, when it should be 'high' and GND.

  • \$\begingroup\$ note that the pin does not have to be pulled to 5V, but rather it's either open-circuit or ground, so that you have to ground your LED through it (which then has a resistor to whatever voltage you need, ideally close to the LED forward voltage so it doesn't have to burn as much current). \$\endgroup\$
    – nonchip
    Nov 7, 2022 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.