High side mosfet as a switch

Thread Starter

pcbenthusiast

Joined Mar 24, 2017
62
i am designing a trail light with leds. i am using a PIC microcontroller for the turn & brake lights logic and the output needs to drive the high side of the LEDS via 2 uC output pins (one for left turn/brake and second for right turn/brake). The LEDs are all tied to common ground (cathode) so im stuck with driving the leds on their high side. One idea i read was to drive an n-channel mosfet from the uC's output and use the n-channel to drive a P-channel mosfet, which inturn drives the LEDs? Would this work? can i do this to both output pins of the uC? How do i choose the mosfets? Since it is for a trail light kit, i'll be using high intensity red LEDs, havent chosen yet. Any advise or input is appreciated. If any of you have worked on this before, please share!
 

Thread Starter

pcbenthusiast

Joined Mar 24, 2017
62
Welcome to AAC.

Should do. What is the PIC supply voltage?
Well I'm using pic16f1503, which can take up to 5v and I would like to drive the leds with 12v supply.. would this then work? Do you have any input on which mosfets to choose? Would any general purpose one work? Like say 2n700 for n channel and need suggestion for p- channel
 

dl324

Joined Mar 30, 2015
16,840
drive an n-channel mosfet from the uC's output and use the n-channel to drive a P-channel mosfet, which inturn drives the LEDs?
You can eliminate the P MOSFET if you use a logic level N MOSFET.

upload_2017-3-24_14-10-53.png

EDIT: OP wants high side switching... Will work on a single P MOSFET solution later.
 
Last edited:

dl324

Joined Mar 30, 2015
16,840
Just realized you want high side. You can do that with a single PMOS device if you're willing to force current into the PIC output; but low enough to not cause latch up or electromigration.
 

Thread Starter

pcbenthusiast

Joined Mar 24, 2017
62
You can eliminate the P MOSFET if you use a logic level N MOSFET.

View attachment 123312
So my leds trail light kit is already off the shelf and the wires coming out of this module are right turn, left turn, running lights and ground. All except ground requires +12v from the flasher module I'm making.. so essentially I need to drive this led kit on their high side (+12v) did th explanation Make sense? The flasher module in putting together has inputs in the form of left turn switch (12v), right turn (12v), brake switch (12v) and ground. I'll need to convert these signals into 5v using LM317, feed into uC, do the right/left/brake logic and output needs to drive the led trail light kit. This drive is where I'm stuck at. Output from micro are 5vs and can potentially drive an N-mos which intern will drive the gate of p mos. the source of p-mos will have positive lead of the respective led and drain of pmos will be connected to +12v. Would this work?!
 

Thread Starter

pcbenthusiast

Joined Mar 24, 2017
62
Just realized you want high side. You can do that with a single PMOS device if you're willing to force current into the PIC output; but low enough to not cause latch up or electromigration.
How do you do that? Pmos needs negative potential at its gate with respect to source, but my source will be connected to 12v
 

crutschow

Joined Mar 14, 2008
34,281
How do you do that? Pmos needs negative potential at its gate with respect to source, but my source will be connected to 12v
So if you connect the gate to ground, what is the relative polarity of the gate-source voltage?

Below is a common way to drive a high-side P-MOSFET.

upload_2017-3-24_14-43-26.png
 
Last edited:

Thread Starter

pcbenthusiast

Joined Mar 24, 2017
62
I have not chosen leds yet. That's something I would like advise on too. It's for trail light and has to be red (amber) and bright. Any suggestions? I saw Cree has high intensity line of XPL leds..
 

Thread Starter

pcbenthusiast

Joined Mar 24, 2017
62
so im planning on buying this trail light strip from amazon and build my flasher circuit with nmos-pmos combo. so to size up the mosfets, ill need the current draw/led type thats used in this light strip. wpuld anyone here have any idea of what the draw might be or what type of LEDs are used here? if anyone has a general idea of what led is used in a trail lights, would be a big help!

https://www.amazon.com/Waterproof-Submersible-Brake-Light-Trailer/dp/B00YHY10XQ
 

Thread Starter

pcbenthusiast

Joined Mar 24, 2017
62
It's a pullup resistor to drive the gate to 12V (and the MOSFET off) when Q1 turns off.
Without that resistor the MOSFET would not turn off.
i just tried this circuit and i use 47Kohm for R1 and the lights are staying on regardless of the uC's output & after giving uC output, the lights do not blink per my code, they stay bright! should i stick with 10k or use lower? i am using FQP27P06 for p-MOS (-60v -27A 70mohm) and RFD14N05L for n-mos(50V 14A 100mohm).
 

crutschow

Joined Mar 14, 2008
34,281
i just tried this circuit and i use 47Kohm for R1 and the lights are staying on regardless of the uC's output & after giving uC output, the lights do not blink per my code, they stay bright! should i stick with 10k or use lower? i am using FQP27P06 for p-MOS (-60v -27A 70mohm) and RFD14N05L for n-mos(50V 14A 100mohm).
47kΩ is fine.
Sounds like you have the MOSFET's source and drain connections interchanged.
With that, the substrate diode will continually conduct the current, independent of whether the MOSFET is biased on or off.
 
Top