# Using a N-Mosfet to switch a common cathode ledstrip

I am trying to drive a RGB-ledstrip using the following circuit: http://learn.adafruit.com/rgb-led-strips/usage

As I am using a Common Cathode led-strip instead of a Common Anode one as used in the above link thus I came up with this 'modified circuit'. Because my experience with FETs was nihil this didn't actually work as I would need at least a voltage => Vcc to saturate the MOSFET.

                                   VCC
+
STP50N06FI   |
N-MOSFET    |
||-+
___            ||<-
|   \_----------||-+
|___/              |
Logic 5V (PWM)         |    Ledstrip
V -> (Common
-    Cathode)
|
|
===
GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)


Is it possible to use a N-channel MOSFET at all for this application? and if so, what do I need to do to make this work (Control the LED-strip brightness with a PWM signal, logic 5v).

• Please edit your question, hit Ctrl-M and a nice circuit editor pops up. Graphics from that editor are much clearer than your ASCII art. – jippie May 23 '13 at 21:26
• Unrelated but your avatar is terrifying. – NickHalden May 23 '13 at 23:29
• @jippie, I tried that but it forces me to use partnumbers instead of generic components. – peterrus May 24 '13 at 9:48
• You can disable that by clicking 'Edit Individual Parameters' – jippie May 24 '13 at 10:15
• @jippie cleaner sure, but for such a simple schematic, it's not needed. – Passerby May 24 '13 at 12:53

If all you need is to turn all the LEDs on/off using PWM, you can attach the N-chan MOSFET between the common cathode and ground. Here's an example circuit, ignoring LED current limiting schemes for now.

simulate this circuit – Schematic created using CircuitLab

If what you want is to control individual LED's, then you might still be able to use an N-Chan MOSFET, but your control signal will need to be at least Vthresh above the source voltage to turn the LEDs on. Alternatively, if you have use an up-stream P-Chan MOSFET, your control signal will need to be at least the level of the source voltage to turn the LEDs off (this is the MOSFET pin source voltage, not supply voltage).

If your micro is not able to achieve either of these levels, you can use a second transistor to drive the transistor in series with the LED(s).

Here's a basic example which uses a P-chan MOSFET to drive the LED's, and a N-chan MOSFET/pullup resistor to control the P-chan MOSFET: (again, ignoring any LED current limiting schemes)

simulate this circuit

Resistor values were chosen semi-arbitrarily. You can probably get away with anywhere from 1k up to 100k. Smaller values will draw more supply current when the N-chan MOSFET is on, larger values are more susceptible to noise when the N-chan MOSFET is off.

• Very concise, thank you! My microcontroller is indeed not able to deliver that voltage so I designed this: circuitlab.com/circuit/sw85t9/pwm-mosfet I am however only measing 2,6v instead of the expected Vcc (12v). When I connect the base of the transistor to Vcc I measure 9.5v. – peterrus May 23 '13 at 22:30
• Notice that I used a P-chan MOSFET in series with the LED, not an N-chan MOSFET. This is very important because the pull-up is to the supply level, not above it. Also, you have BJT to your PWM signal, not a MOSFET so you really should have some current-limiting resistor on the base pin. This should be small enough to allow the BJT to saturate, but large enough that your micro doesn't have to source excessive current. – helloworld922 May 23 '13 at 22:37
• So what it comes down to is: I need a P-channel MOSFET, correct? – peterrus May 23 '13 at 22:40
• Unless you have a second "higher" voltage you can pull-up to, yes, you will need a P-chan MOSFET. – helloworld922 May 23 '13 at 22:48

NMOS on high side needs gate voltage beyond main power rails. So you'll need some auxiliary power supply to drive a transistor. Left schematic shows the principle.

simulate this circuit – Schematic created using CircuitLab

Common solution is to add boost circuit, which deliver required voltage. One of the simplest shown on the right: it charges capacitor when transistor is off, and use charge to deliver voltage over the rail. Unfotrunately this circuit annot be used with 100% duty cycle, as capacitor will discarge after some time, so you'll need periodically turn off transistor and on it again to recharge the capacitor.

I've had success with using the Vishay SI1040X-T1-GE3 to drive common cathode leds.

https://www.digikey.com/short/qtmr0n