Electrical – Using MOSFET with Open Drain Controller

ledled-drivermosfetpwm

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.

schematic

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

Best Answer

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.