How to select the right MOSFET? - Page 1
Forum section: electronics / projects

author: krcm0209
author_rank: Contributor
timestamp: February 02, 2021, 08:48:41 pm
content: I'm working on a project to create an audio spectrum analyzer using the new Raspberry Pi Pico. I've started working on the schematic for it to figure out how I will drive all the LEDs I need and I'm at a point where I am not sure how to best move forward. Specifically, I'm unsure how to select the right P-channel MOSFET for my application.I am planning to drive a 12x31 LED display using MAX6971 constant-current LED drivers. These operate open-drain, so to select a specific row I need to be able to switch enough power to the LED anodes. (up to 31 on at full brightness at a time, because multiplexing) The LEDs are 3mm green LEDs with a max forward-current of 30 mA.In order to drive P-channel MOSFETs from the Pico's 3.3V GPIO, I selected 3 SN74AHCT125N quad bus buffer gate chips to convert 3.3V to 5V.My problem now is that I don't know enough about MOSFETs to know how to select something that will work for my application, while also not spending too much on a part that is completely overkill.I am also open to ideas that involve major overhauls to my circuit, like ways to avoid using P-channel MOSFETs altogether, or perhaps how to avoid using the SN74AHCT125N quad bus buffer gate chips.P.S. I'm aware the schematic is probably too verbose, I'll be trying to simplify it later. I don't have a lot of schematic experience either.

author: ajb
author_rank: Super Contributor
timestamp: February 02, 2021, 09:50:08 pm
content: Your schematic seems pretty reasonable at a glance.Generally, for applications like this, you would first select based on current and voltage ratings, then ability to drive it from your circuit, and then power loss factors. Since you have a pure switching arrangement, you don't have to worry so much about safe operating area as you would in an application like a voltage or current regulator.The voltage you want to switch will set your Vds requirement, and if you're switching 5V that's pretty easy. It'd be hard to find a FET with a Vds less than that. You would need to take into account transients, and you never want to design for the absolute maximum ratings, so maybe look for something with a Vdsmax of 10V or more. Still pretty easy. Going higher won't hurt much, although you may find other specs are less favorable on higher voltage parts, but that can be resolved in the next selection steps.Current rating is similarly straightforward, the maximum current draw will set the maximum drain current (Id), and again you want some headroom here. If you're running 31 LEDs at 30mA (probably don't need that much current even with multiplexing; modern LEDs are crazy efficient), that's about 1A, so you likely want a part rated for 1.5-2A. Again, higher current ratings are fine, and may get you a part with other advantages, but may come with tradeoffs on switchability or price.The next part is where the specs get a little trickier. You need to be able to turn the FET on, and that means that the gate threshold voltage (where the FET transitions from high resistance to low resistance) needs to be less than the voltage the circuit driving the FET can supply. In this case, you need something with a Vgs(th) of less than 5V. In general, you want something even lower than that, because you want to be well past the threshold voltage both for reliability reasons and efficiency reasons. You probably want to stick with parts that have a Vgs(th) of 3V or less.Beyond this is where you need to start looking at datasheet charts and detailed specs, because a FET isn't really a binary "on" or "off" device. At various gate voltages the FET will exhibit different relationships between the drain current and Drain-Source Voltage. Some datasheets will show this as a chart of drain-source resistance (Rds) vs gate-source voltage, others will show multiple Vds vs Id curves at different gate voltages, but either way you'll need to see which parts give you acceptable levels of power dissipation given the gate voltage you can supply and the current the FET needs to handle.Finally, you'll need to look at the way the FET moves between off and on states. The gate of a FET acts like a capacitor, so to turn it on you need to drive charge into it and to turn it off you need to suck charge out of it. That takes a certain amount of time, which is determined by the impedance of the driver and the charge requirements of the FET. The longer it takes to charge or discharge the gate, the longer it will take for the FET to move between off (extremely high resistance) and on (extremely low resistance) and the more time it will spend in regions where the resistance is intermediate, which is where you can see substantial amounts of power dissipated by the FET. In things like DC-DC converters where transistors are being switched constantly these switching losses can dominate the power dissipation of the power stage, so those applications sometimes demand specific FET driver ICs designed to drive the gates very hard to minimize the transition time, but this comes with EMI ands stability challenges since it involves high slew rates both on the gate of the FET and at the output of the power stage. Your situation is far less demanding, since each FET is switching at 1/12 of your matrix scan rate. Sometimes you'll see datasheets give a gate capacitance spec, but other times they will list gate charge values. Either way you can use these values to figure out how long it will take to switch a given FET on and off, but unless you're trying to scan your matrix at stupid high frequencies (like, tens of kHz) you can probably mostly ignore this parameter--as long as you're looking for something in the <30V and <3A range the gate charge shouldn't be a big problem for your application.

author: krcm0209
author_rank: Contributor
timestamp: February 02, 2021, 10:04:00 pm
content: @ajb,Thank you so much for the long and thoughtful reply. I just finished reading through it and I think it will be an immense help in pushing my project forward.To you or anyone else, I will be keeping up with this thread, and will still be open to more radical design changes if it means simplifying part count or reducing overall BOM cost.Thanks again.

author: Benta
author_rank: Super Contributor
timestamp: February 02, 2021, 10:50:29 pm
content: A very basic question: Why are you so fixated on a MOSFET?This is an application for PNP bipolars. Cheap and easy, will require a base resistor, but at the same time eliminate your AHCT125s.

author: krcm0209
author_rank: Contributor
timestamp: February 03, 2021, 01:15:16 am
content: Quote from: Benta on February 02, 2021, 10:50:29 pmIs this what you mean? If so, I guess I need to figure out an appropriate value for the base resistor.

author: krcm0209
author_rank: Contributor
timestamp: February 03, 2021, 05:05:57 am
content: I'm now a bit more confused by the PNP + base resistor suggestion, because this thread I found would indicate that it won't work unless I also add an NPN transistor as well.https://electronics.stackexchange.com/questions/341928/control-5-v-load-with-transistor-3-3-v-raspberry-piSeeking clarification.

author: larsdenmark
author_rank: Regular Contributor
timestamp: February 03, 2021, 09:27:51 am
content: Why the MAX6971? Maxim makes nice parts, but they are usually expensive.Why not use a TLC5928?

author: Zero999
author_rank: Super Contributor
timestamp: February 03, 2021, 09:48:29 am
content: Quote from: krcm0209 on February 03, 2021, 05:05:57 amIf your Raspberry Pi Pico is powered off 3.3V, then you do need NPN transistors as well, but your schematic shows it powered off 5V, which is probably why PNP transistors were suggested.

author: krcm0209
author_rank: Contributor
timestamp: February 03, 2021, 01:35:38 pm
content: The Pico is powered from 5V USB but its GPIO is strictly 3.3V.

author: krcm0209
author_rank: Contributor
timestamp: February 03, 2021, 01:38:53 pm
content: Quote from: larsdenmark on February 03, 2021, 09:27:51 amI didn't come across that part because Digikey doesn't sell a through hole version of it.

author: Zero999
author_rank: Super Contributor
timestamp: February 03, 2021, 04:06:11 pm
content: Quote from: krcm0209 on February 03, 2021, 01:35:38 pmI didn't know that. If the output is 3.3V, then some level shifting is required to drive a PNP output transistor;.