Driving a P Channel MOSFET from an AVR

Go To Last Post
25 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm sure this is very elementary for most of you, but I'm just a hobbyist who is using MOSFETS for the first time. This is pretty simple, switching a load of LEDs via PWM for dimming. The LED load consist of an inline constant current regulator (OnSemi NSI50350AS in one instance) and can be anywhere from 9-24V @ .35-1A. The processor is an Xmega8E5 @ 3.3V. I'm trying to keep cost low as there will be 18 of these circuits on each board and I need to make 5 boards. I've researched schematics and theory on various sites and stared at so many datasheets my eyes are glossy. Am I headed down the right path with this or am I interpreting the data wrong? Will the MOSFETS I've chosen be in spec and are the pull up / pull downs adequate? Appreciate whatever help or verification I can get on this.
thanks,
-shelby

Vin: 9-24V
CH1: 3.3v logic from Xmega
CH1-3 Header: output to LED/CCR load @ .35-1A
N Channel MOSFET - NXP 2N7002PW - http://www.mouser.com/ProductDet...
P Chanel MOSFET - OnSemi NTR4171P - http://www.mouser.com/ProductDet...

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

At what frequency is the PWM running ?
What is the max current the NTR4171P has to endure ?

One problem I see is that Vgs for the NTR4171P is too high when running at supplyvoltage of 24V.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

400-500Hz is what I'm anticipating for pwm frequency and 1A through the P channel MOSFET. Checking max Vgs skipped me after being in the mindset of finding logic level FETs. Thanks for that. What about a FDN352AP instead? http://www.mouser.com/ProductDet...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Vgs = + or - 25V .... hmmm .... quite close to your max supply voltage. Not very safe.

And why do you choose components that are stretched to their max ? Ids max for FDN352AP is 1.3A ! Even in Chinese ledstrip-controllers much heavier driver-fets are used ;)

Also have a look at the power dissipation: at 500Hz PWM, the driver goes 1000 times per sec through the transition phase (from on to off and vice versa) The drive circuit has an impedance of 1k. Two enemies: Cgs and Cds. And the second one is the real mean guy: the gate sees a multiple of the value of Cds because the drain swings 24V. Let's assume that 1V change on the gate is enough to go from on to off and vice versa. The gate sees Cds then 24 times larger.
All this means that the fet will dissipate a bit. A sot23 device on an smd-pad can hardly dissipate.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 1k drive impedance is not true, my mistake. In my head I already used a zener to limit Vgs for the driver and that requires a series resistor.

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Last Edited: Sun. Sep 15, 2013 - 09:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would recommend a fet like the IRLL2705PbF, but then in Pch version. SOT223 has more umpf than SOT23. Dpack is another alternative.

And about keeping costs low: let me tell you what really expensive is: having a PCB made and then finding out that the design requires a heavier fet :D



A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
Vgs = + or - 25V .... hmmm .... quite close to your max supply voltage. Not very safe.

And why do you choose components that are stretched to their max ? Ids max for FDN352AP is 1.3A ! Even in Chinese ledstrip-controllers much heavier driver-fets are used ;)


Mainly because this is my first go around at this and I'm trying to stay cheap as possible while still staying in spec :) Also, space is a major concern. I'm on a 70mm x 75mm board with the Xmega, RS485 circuit, two RJ45 jacks, 6 4 pin .1 headers (MTA-100) for outputs, ncp3063 switcher, NRF24L01 module and mounting holes.

My initial requirement was to drive 10W RGB LED modules, putting my specs around 12V @ 350ma max. Being able to drive 24V @ 350ma would be nice for supporting 20W modules in the future, and the capability to handle 1A was just a goal. It would be nice, but if it's pushing me into larger packages then I have no choice but to scale back my requirements.

There are 3 rails (RGB) each powered by their own buck converter and dialed in +2V above the forward voltage of the LEDs in that rail in order to give the CCR modules adequate headroom.

Quote:

Also have a look at the power dissipation: at 500Hz PWM, the driver goes 1000 times per sec through the transition phase (from on to off and vice versa) The drive circuit has an impedance of 1k. Two enemies: Cgs and Cds. And the second one is the real mean guy: the gate sees a multiple of the value of Cds because the drain swings 24V. Let's assume that 1V change on the gate is enough to go from on to off and vice versa. The gate sees Cds then 24 times larger.
All this means that the fet will dissipate a bit. A sot23 device on an smd-pad can hardly dissipate.

This is where I had a feeling I was over simplifying stuff. I'm honestly clueless about how to calculate thermal dissipation based off mosfet capacitance and switching frequencies. 400-500Hz was a swag and I could definitely go lower to the 120-200Hz range if it will help thermals. I definitely have more to learn about to properly design mosfet circuits. My bad for responding while I was at the beach :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'm on a 70mm x 75mm board
It has two sides :)

And a tip: use a multiple layout for the fets. I did mine for SOT23, SOT223 and Dpack. It's a bit of fiddling, but pays off.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the schematic and pulling me into spec. I'll do some more research and see what I can find. SOT223 should fit, but dpak's are pretty iffy. Just not enough room to fit 18 of them. I'm already using the smallest passives I'm comfortable with on board (0603) and it's getting tight. And yes I'm using both sides!! :) I may have to scale back my requirements. Appreciate your help on this and pointing me in the right direction. It'd probably we wise of me to etch a few small test boards for the different package sizes so I can see how they perform. Thanks again!
-shelby

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

18 fets ? Each capable of handling 1A ? That means that the powertracks on the board need to carry 18A max. The controller with a size of 70mm x 75mm would have to handle 432 Watt :shock:

I like challenges but I think you need to review the specifications in this case. It's simply not feasible IMO.

Edit: EMI and RFI are issues you will have to look into as well.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
The 1k drive impedance is not true, my mistake. In my head I already used a zener to limit Vgs for the driver and that requires a series resistor.

I've always loved the "Plons CAD" , dataentry seems so easy :wink:

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The initial layout had 6 rails at 60mil each starting at the power header (two sets of RGB rails). The math I did on the traces said I was in spec, but could be wrong. I realize it's a lot of power for a little piece of copper, but I was designing to 1A MAX to give myself headroom to play in the future. 24V @ 1A wasn't really a requirement, but a MAX goal. My hard requirement and planned usage is switching 9-12V @ 350ma. The NRF24L01 header is optional as well. I included it just to play with the modules to see if I wanted to go wireless at a later date. Control is via RS485. Given the lesser requirement of 9-12V @ 350ma, do you think the FDN352AP would be a viable part? Or a slightly beefier SOT-6 packaged FDC658AP - http://www.mouser.com/ProductDetail/Fairchild-Semiconductor/FDC658AP/?qs=sGAEpiMZZMshyDBzk1%2fWi0dsXOGve85xCjonrmJGYbs%3d? Staying in a smaller package would really help, but I also realize we can't alter physics (yet). On the flip side, I'd also prefer seeing blinky-flashy leds instead of magic smoke.
As for EMI and RFI issues, I think have proper power filtering and decoupling down and I've been actively researching that in regards to board layout. I realize multiple buck converters being too close to each other can give me issues and may have to migrate the whole thing to a larger enclosure, but will try to stuff this into the case I have. The 3 RGB bucks are on separate boards (mounted in lid of enclosure). If required due to noise issues, the whole thing can be migrated to a larger case and spread out, but I'd be all sad face about it :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Carsten: yep, paper and pencil ... old school :)

@shelby:

PS I was mixing up two threads ... be back in a while ...

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So your plan is to pwm and have that followed by buck converter, and then a constant current device ?
I am a bit puzzled. Maybe the right time to show the total picture.

Dinnertime :)

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
So your plan is to pwm and have that followed by buck converter, and then a constant current device ?
I am a bit puzzled. Maybe the right time to show the total picture.

Dinnertime :)


History of the project is located here - http://www.diychristmas.org/vb1/showthread.php?829-18-Channel-10W-Flood-System. In order not to overwork the red channel CCRs, I decided to use separate buck converters for each color rail. Those along with the linear CCRs I mention below seemed to be more economical than 18 separate CC bucks. The initial designs were based around N channel devices since CAT5 was used for cabling (3 +/- pairs). When I decided to go to a different wiring scheme utilizing only 4 wires in common cathode (for more current capacity / longer runs and better connectors), that's what sent me into P channel land and brought me to posting here :)

6 ports to control 6 RGB 10W floods, so 18 channels. 3 adjustable buck converters, one for each color rail. The CCR is an OnSemi NSI50350AS - http://www.onsemi.com/PowerSolut.... The CCRs are located w/ the RGB LED in the floodlight housing (I had said otherwise in the post linked above, ignore that).

Red Buck Rail (8.6V)
^---> FET -> CCR -> LED-> GND (x6)

Green Buck Rail (11.3V)
^---> FET -> CCR -> LED-> GND (x6)

Blue Buck Rail (11.6V)
^---> FET -> CCR -> LED-> GND (x6)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quite recently I posted a schematic here in GE of the output stage I use for led-strips. That is quite a bit simpler than your approach, but it works nicely. Now see if I can find it ... yep

https://www.avrfreaks.net/index.p...

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just wanted to update this for anyone else who may run across this thread at a later date. My choice of parts has been working great so far for driving my 10W led flood lights. The CH1, CH2, and CH3 lines on the left of the attached schematic are connected to the Xmega and the CH1-3 port on the right is the header running to a single flood light.

Here are some shots of the board as well:

Topside SMD populated by smerrick, on Flickr


Bottom SMD done by smerrick, on Flickr


Light! by smerrick, on Flickr

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm puzzled as to why the OP hasn't used N channel fets...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

chartman wrote:
I'm puzzled as to why the OP hasn't used N channel fets...

Please explain how I can use a N channel solution to switch 3 separate voltage rails with loads on the other end of a 4 pair cable with a common ground. It was my understanding I had to use a P channel for high side switching. Please correct me if I'm wrong.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
with a common ground
Unless it HAS TO BE common ground (ie automotive or similar) you use a common positive rail and switch ground with a N channel device. A little simpler and cheaper.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Quote:
with a common ground
Unless it HAS TO BE common ground (ie automotive or similar) you use a common positive rail and switch ground with a N channel device. A little simpler and cheaper.

On the design in question, I have 3 separate voltage rails set at different voltages, all referenced to a common ground. I would've preferred a common voltage rail but was running into thermal issues with the linear current regulators I was using (NSI50350) due to the large voltage drop to run the Red channels. My solution was a seperate buck converter for each rail set at 2V above the forward voltage for that color. This led to the high side switching which brought me here inquiring about P channel fet usage. Each one of these boards powers and controls 4 to 6 10W RGB flood lights. When I was running the numbers, this seemed like the most economical solution (its for personal usage).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK that makes sense now.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 0v paths look rather torturous. You probably wanted to keep them separate from the logic 0v and join them at one point. Hopefully you have some fusing otherwise at a quick glance the whole thing looks like a fire hazzard.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
The 0v paths look rather torturous. You probably wanted to keep them separate from the logic 0v and join them at one point. Hopefully you have some fusing otherwise at a quick glance the whole thing looks like a fire hazzard.

I just tied everything together with ground planes on top and bottom. I'm pretty sure everything has a healthy current path. Is this not acceptable? I understand there could be noise issues, but haven't experience any glitching or noticed the effects of it if there is. I chose not to have an on-board fuse since the whole thing is running off a 19V laptop power supply with overload protection. I agree however it would've been best to include one anyways. What else seems so hazardous about the layout? Should I be concerned?


floodpanel_gerber-20130919 by smerrick, on Flickr

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No fires yet!
http://www.youtube.com/watch?v=p...

Eye-gouging maybe, but no fires..