Using a MOSFET to provide/cut off supply to a circuit - Page 1
Forum section: electronics / projects

author: kian0079
author_rank: Contributor
timestamp: June 23, 2023, 07:26:24 am
content: Hi all,My applications uses a MCU that is connected an audio chip. In order to save power while the audio chip is not in used, I have put the MCU into deep sleep. However the audio chip itself consumes about 30mA in the idle state and the audio chip doesn't come with a power down function. When the audio chip is driving a speaker load, its VCC pin (3.3V) consumes up to about 400mA.Is it possible that I connect a MOSFET to the audio chip VCC supply pin and use the MCU to turn on/off the MOSFET such that I can cut away the supply to the audio chip when the MCU is in deep sleep? I have searched on the internet, but there are so many ways to connect the MOSFET and I am confused on which one is a better/good implementation. Should I be using a NMOS or a PMOS (example in this article:https://diyodemag.com/education/mosfet_drivers_why_you_need_them). In some example circuits, 2 MOSFETs are used (example:https://www.onelectrontech.com/mosfets-load-switch-pmos-nmos-on-resistance-inrush-current-applications/)Which circuit should I be using in my application? Hope to get some advise on this. Thanks in advance!

author: shridmaster
author_rank: Contributor
timestamp: June 23, 2023, 07:39:09 am
content: Generally speaking you want to use a PMOS. PMOSes are "worse" in general than NMOS, but this is a high-side switching application (meaning the switching is at the positive end instead of the negative).You would have the MCU pin go out to an NMOS, tie the NMOS's drain to a pull-up resistor, and then connect the drain to the gate of the PMOS that supplies the audio circuit. This is the safest way to do it to protect your MCU. When the NMOS gate is low, the drain is a high voltage, so the PMOS is off. When the NMOS gate is high, the drain is switched low, so the PMOS is on and current goes to the audio chip.

author: kian0079
author_rank: Contributor
timestamp: June 23, 2023, 07:53:29 am
content: Thanks. I presume you are referring to a circuit that looks like this:https://www.next.gr/circuits/switches-MOSFET-as-a-switch-l26103.htmlWhat should the considerations for the values of R1 and R2?Quote from: shridmaster on June 23, 2023, 07:39:09 am

author: shridmaster
author_rank: Contributor
timestamp: June 23, 2023, 08:25:05 am
content: Exactly that, yes.If you go too low, then when the NMOS is on it pulls a lot of current and wastes power. If it's too high, the leakage current can pull enough current when it's off that it actually never fully turns off.It's fairly arbitrary, but anywhere between 10k and 100k is generally what you want based on Ohms law and power consumption. 49.9k is a common value as well.

author: magic
author_rank: Super Contributor
timestamp: June 23, 2023, 08:42:35 am
content: Since the supply you want to switch is only 3.3V, and the MCU probably also runs on 3.3V, you could simply use a single MOSFET and control it directly by MCU pin. No further components required, no extra power wasted.400mA is not a lot of current, even a small 0.1Ω RDS(on) MOSFET will only drop 40mV under full load. And there surely are better ones available if you want. However, you will need so-called "logic level MOSFET", one which can be switched by low gate voltage. Older FETs may require 5V or more gate voltage to reach their rated RDS(on).NMOS vs PMOS:If you disconnect ground with NMOS, outputs of some chips may go to 3.3V, possibly causing problems if there are loads directly connected to ground on those pins.If you disconnect the supply, outputs of the chip will go to ground. Possible problems if there are loads on those pins connected to the positive supply (you could turn off such loads together with the chip, if they are on the same 3.3V rail).N channel tend to be better, cheaper and more common.

author: kian0079
author_rank: Contributor
timestamp: June 23, 2023, 09:18:54 am
content: I am using a DMC2400UV in another part of my circuit. Its used for a battery level monitoring application. I wonder if another DMC2400UV can be used? I really don't know how to spec out the MOSFET for my application.https://datasheet.lcsc.com/lcsc/2201121900_TECH-PUBLIC-DMC2400UV_C2940616.pdf

author: ArdWar
author_rank: Frequent Contributor
timestamp: June 23, 2023, 10:32:22 am
content: For simple switching you usually try to get RDS(ON)as low as possible. Other "dynamic" specs don't really matter. Of course look for appropriate VDSrating, and for this situation keep VGS(TH)well within the voltage drop your MCU (and supply) can generate.The 300-600mR RDS(ON)of your P-MOSFET will drop 120-240mV at 400mA. That's a bit high IMO for 3.3V supply. Depends on the audio IC, the output signal quality might get affected.

author: larsdenmark
author_rank: Regular Contributor
timestamp: June 23, 2023, 12:01:40 pm
content: There are specialized ICs that can take care of the switching:https://www.ti.com/power-management/power-switches/load-switches/overview.html?DCMP=loadswitch&HQS=loadswitchRds(ON) can be very low. E.g. 5-15 mOhms.

author: Terry Bites
author_rank: Super Contributor
timestamp: June 23, 2023, 12:42:45 pm
content: Save yourself the pain and use a "Load Switch" eg TPS22919

author: Zero999
author_rank: Super Contributor
timestamp: June 23, 2023, 01:05:15 pm
content: Quote from: kian0079 on June 23, 2023, 07:53:29 amThe IRF530 and IRF9530 are unsuitable for 3.3V operation.Just use a sinlge P-MOSFET and make sure it can pass he full 4A, with a gate drive of just 3V.A couple of examples: SSM3J328R and DMP1045U.https://www.mouser.co.uk/datasheet/2/408/SSM3J328R_datasheet_en_20211022-1916357.pdfhttps://www.diodes.com/assets/Datasheets/DMP1045U.pdf

author: kian0079
author_rank: Contributor
timestamp: June 24, 2023, 12:50:17 am
content: Thanks guys! I learned a lot from your comments.I don't know that there are specialised ICs that can take care of the switching. They are classified underPower Distribution Switches on LCSC website. They can go as low as US$0.05 each at low volume. The cheapest one on LCSC website is this:https://datasheet.lcsc.com/lcsc/1809291208_XI-AN-Aerosemi-Tech-MT9700_C89855.pdfI am already using a DMP1045U in another part of my circuit, so probably I can consider using another DMP1045U for switching this 400mA load. Thanks @Zero999

author: MathWizard
author_rank: Super Contributor
timestamp: June 26, 2023, 11:54:49 am
content: I've seen on modern motherboards, they will use an upside down, pretty generic Nch MOSFET, so S on Vdd, Drain as output for 3.3V and 5V, like to a USB port, so at least 0.5A.Those load switches mentioned above look nice too, and they have some built in protections.

author: magic
author_rank: Super Contributor
timestamp: June 26, 2023, 01:54:20 pm
content: N-ch power MOSFET has P-doped body internally shorted with the source. So there is a straight PN diode from the source terminal to the drain (which is N, of course).I don't know what you have seen, but this isn't going to work for the OP.

author: MathWizard
author_rank: Super Contributor
timestamp: June 26, 2023, 08:29:43 pm
content: They weren't JFET's, and they were turned on/off with the 5V on the gate, I'll see if I can it, but I'm sure it was Nch, upside downI'll have to find it on the circuit, now I don't believe it myself, but I'm sure I saw an upside down Nch, on a motherboard somewhere, acting as a pass element/switch.

author: magic
author_rank: Super Contributor
timestamp: June 26, 2023, 09:55:23 pm
content: It could be used for switching USB between 5V and 5Vsb (when the computer is off).Body diode forward biasing is not a problem, because the USB rail is always powered up from one source or another.When main 5V is down, the "backwards" orientation of the FET ensures that USB is not backfeeding it.Not sure how they drive the gate of the 5Vsb FET when 12V is down?Maybe it's a P-ch in this position and N-ch only on the main 5V rail?

author: avaqsemi
author_rank: Newbie
timestamp: June 27, 2023, 06:58:42 am
content: To control the power supply to the audio chip using a MOSFET, you can use either an N-channel MOSFET (NMOS) or a P-channel MOSFET (PMOS). Both options can work, but the specific choice depends on your requirements and constraints. Here's an overview of each option:N-channel MOSFET (NMOS):Advantages: NMOS typically has lower on-resistance (RDS(on)) and can handle higher currents compared to PMOS. It is commonly used for high-side switching in low-voltage applications.Implementation: To use an NMOS for high-side switching, you'll need to add a level-shifting circuit between the MCU and the MOSFET gate, as the MCU operates at a lower voltage than the audio chip's VCC. This level shifter can be implemented using additional components, such as a voltage divider or a dedicated level-shifting IC.P-channel MOSFET (PMOS):Advantages: PMOS can directly switch the high-side power supply without the need for a level-shifting circuit. It is suitable for high-side switching in applications where the MCU and the audio chip share the same voltage level.Implementation: To use a PMOS for high-side switching, you connect the source terminal to the VCC of the audio chip and the drain terminal to the positive power supply rail. The gate is controlled by the MCU.

author: magic
author_rank: Super Contributor
timestamp: June 27, 2023, 07:04:59 am
content: Are you a spammer or what's your problem?Your description of PMOS wiring is backwards and I'm dying to know how you would level shift the drive to a high-side NMOS with a voltage divider

author: Smokey
author_rank: Super Contributor
timestamp: June 27, 2023, 07:53:21 am
content: How about $0.37 in 1s with 8700 in stock?https://www.digikey.com/en/products/detail/microchip-technology/MIC2005A-2YM6-TR/2062425

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 27, 2023, 03:18:50 pm
content: As an alternative, you can also use an extra voltage regulator with a built in on/off switch.If the biggest load is handled by this voltage regulator, you can also use a small voltage regulator with a low quiescent current for the uC itself.

author: kian0079
author_rank: Contributor
timestamp: June 28, 2023, 09:42:38 am
content: If using a single PMOS for loading switching, the gate needs to be logic 1 to turn off the PMOS. In this case, the microcontroller has to output a logic 1. Would this drain excessive current from the microcontroller then? Since the PMOS is intended to be off most of the time.

author: magic
author_rank: Super Contributor
timestamp: June 28, 2023, 12:44:40 pm
content: Quite unlikely. All modern microcontrollers are CMOS, the outputs are driven by MOSFETs which connect the pin either to the supply rail or to ground. Power consumption is essentially zero, regardless of output state, unless the output is driving external load (e.g. a resistor to ground).

author: rhodges
author_rank: Frequent Contributor
timestamp: June 28, 2023, 11:28:01 pm
content: Maybe a P AO3401 would be a good choice if the MCU and audio chip are the same voltage?It claims up to -30V, 4A, at 0.085 ohms with a gate of -2.5V.I bought 50 for $1.70 in 2019.As our friend magic noted above, the MCU output pin will drive the gate with nearly zero current, after reset and sleep.