Is this a viable way to switch P-channel MOSFETs with a 3.3V input? - Page 1
Forum section: electronics / projects

author: physx
author_rank: Newbie
timestamp: June 23, 2025, 02:17:36 pm
content: Hi all,I'm building a circuit where I would like to use a 3.3V input signal to control two (or perhaps three) P-channel MOSFETs.I have created teh below circuit, which, I believe, would do just that.Could you please let me know wehther it woudl work or if it needs any adjustments.The MOSFETs would only operate as a simple on/off switch, they would not be switched at high frequencies, this would only turn some high-current devices on and off using that 3.3v signal, which can go up to 500mA, although it clearly won't get anywhere close to that with the 10k resistor R5.UPDATE: SW1 is just a mechanical switch that would allow the mosfets to be switched on manually without the 3.3V input signal, if needed.Many thanks!

author: Peabody
author_rank: Super Contributor
timestamp: June 23, 2025, 02:42:03 pm
content: Yes, I think it should work ok. But a couple comments:Since you are switching both mosfets together, you don't really need both R6 and R7. And I would think 100K would still work fine, and use less current.As drawn, R5 and R8 create a voltage divider. Of course 1.65V is still enough to switch the NPN, but if it were a mosfet, it might be different. So while it doesn't matter most of the time, it's better to get into the habit of doing it right, which is simply to move the R8 connection ahead of R5, so it's actually a pull-down on the 3.3V GPIO instead of directly on the NPN base. And again, R8 could be 100K if it's needed at all.Edit: If your switch is in the other position, the mosfets will be always-On, regardless of the state of the 3.3V GPIO. I assume that's what you want.

author: tooki
author_rank: Super Contributor
timestamp: June 23, 2025, 02:42:36 pm
content: Why not just use some off-the-shelf load switches?

author: physx
author_rank: Newbie
timestamp: June 23, 2025, 02:49:14 pm
content: #tookiWhat would you recommend? I'd need about 20-30A at 12V.#PeabodyThanks, I'll update the position of the resistors. The 3.3V supply is from a high-current PSU rail of another device, so it can easily go up to 1A, if that makes any difference, although I don't believe it should.

author: tooki
author_rank: Super Contributor
timestamp: June 23, 2025, 03:01:47 pm
content: Quote from: physx on June 23, 2025, 02:49:14 pmOh, that is a bit more unusual. Infineon has several:https://www.digikey.com/short/mndhbhp3You could also start looking at solid state relays. They’re more expensive, but tend to be quite robust.

author: PGPG
author_rank: Frequent Contributor
timestamp: June 23, 2025, 03:41:19 pm
content: Quote from: Peabody on June 23, 2025, 02:42:03 pmYou should immediately tell it to:Nexperia:https://assets.nexperia.com/documents/data-sheet/PDTC114EU.pdfToshiba:https://www.mouser.pl/datasheet/2/408/RN1901_datasheet_en_20211115-2580038.pdfROHM:https://fscdn.rohm.com/en/products/databook/datasheet/discrete/transistor/digital/dtc114emfha-e.pdfON Semiconuctor:https://www.mouser.pl/datasheet/2/308/DTC124E_D-1773603.pdfDiodes:https://www.diodes.com/assets/Datasheets/DDTD_XXXX_C.pdfMCC:https://www.mouser.pl/datasheet/2/258/UMH1NHE3_SOT_363_-3366411.pdfand may be others as all they simply don't know what they are doing.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 24, 2025, 01:50:05 pm
content: I suggest you start with using FET symbols for your fets instead of rectangular white boxes.

author: physx
author_rank: Newbie
timestamp: June 24, 2025, 06:40:54 pm
content: #tookiI don't think I really need to go that far, and I don't need the rails to be isolated, so mosfets will likely be less expensive without being inferior in terms of functionality. I'm expecting to dissipate around 1W of heat at 10A with the particular mosfets, which is probably fine, and most of the time it will be closer to 3-5A per mosfet.#Doctorandus_PI do appreciate the suggestion, but this was the default symbol for the part in the editor I'm using and I wasn't going to redraw it just out of spite.#PGPGSo should R8 be before R5 to act as a pull-down on the switched 3.3V input? I know it's probably a rather basic question, but as you can probably see, I am rather new to electronics.Thank you all! It's all been quite helpful!

author: artag
author_rank: Super Contributor
timestamp: June 24, 2025, 07:05:07 pm
content: Quote from: physx on June 24, 2025, 06:40:54 pmEither can be fine. Just do the sums to ensure the transistor has adequate base (or gate) drive.Fwiw, I rarely use R8 (or have it's value be zero) with mosfets. This might be an excessively capacitative load for the driving device but modern miocrocontrollers often have current-limited outputs and too much resistance will make the fet switch slowly, which may or may not be good. There's rarely one correct way to design a circuit. it's always a compromise..

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 24, 2025, 10:06:34 pm
content: Quote from: physx on June 23, 2025, 02:49:14 pmIf you are switching such high currents, you might want to pay attention to inrush currents and slew rates.That's where proper power management drivers help.You cannot simply whack a milli-ohm fet plus cable inductance and a simple driver.

author: tooki
author_rank: Super Contributor
timestamp: June 25, 2025, 09:54:49 am
content: Quote from: physx on June 24, 2025, 06:40:54 pmSo is it 3A, 5A, 10A, 20A, or 30A per MOSFET?The number of ready-made load switches goes up as the current rating drops, so unnecessarily specifying really high currents does you no favors.

author: PGPG
author_rank: Frequent Contributor
timestamp: June 25, 2025, 11:14:39 am
content: Quote from: physx on June 24, 2025, 06:40:54 pmFor bjt transistors (npn, pnp) R8 should be after R5 (directly between base and emitter) - like in all these ready made 'digital' transistors I have linked.When bjt transistor works as switch then the key parameter influencing the switching off speed is how deep transistor is saturated and what is the current taking out from base excess charge when you want to switch it off.You have 5k (two 10k resistors) to 12V in collector so Q1 collector current is 2.4mA. If we assume beta being 100 than base current 0.024mA is the minimum base current to get collector down to GND (I call it 'saturation border' current and any current higher than this saturates transistor).If R8 is before R5 then you get:- base current = (3.3-0.7)/10 = 0.26mA (11 times the 'saturation border' current),- switching off current = 0.7/10 = 0.07mAIf R8 is after R5 then you drive transistor from Thevenin source of 1.65V with internal resistance 5k. Now you get:- base current = (1.65-0.7)/5 = 0.19mA (8 times the 'saturation border' current),- switching off current = 0.7/5 = 0.14mA (two times! higher then if R8 is before R5).So if R8 is after R5 transistor is about 30% less saturated and is switched off with 2 times higher current. I think switch off time will be 2..3 times shorter and slope (when switching off) will be steeper (Miller effect will be smaller because of smaller driving base circuit impedance).If you want to understand electronic confirm it with Spice simulation. See what will be changing in on and off when you will be changing resistors to other values (they need not to be equal).

author: thm_w
author_rank: Super Contributor
timestamp: June 25, 2025, 10:00:59 pm
content: If you care about switch on/off time then you wouldn't use 10k resistors for pulldowns and pullups.I don't think OP cares about switching time but it might be good if they specified what the load actually was.

author: PGPG
author_rank: Frequent Contributor
timestamp: June 26, 2025, 10:16:18 am
content: Quote from: thm_w on June 25, 2025, 10:00:59 pmOf course you are right.But saying that R8 after R5 is a mistake, and the only right is to have R8 before R5 and "it's better to get into the habit of doing it right," was not correct.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 26, 2025, 12:33:22 pm
content: Quote from: PGPG on June 26, 2025, 10:16:18 amIndeed. There is nothing wrong with using a voltage divider on the base of a BJT. It does shift the input voltage to which the BJT reacts, but that can very well be intentional. For example, compare the ULN2002, ULN2003 and ULN2004 IC's. The difference between them are the resistors on the input divider.

author: Peabody
author_rank: Super Contributor
timestamp: June 26, 2025, 01:55:26 pm
content: I don't know how this could have happened. I'm almost never rong about these things.So, how does it work for mosfets?

author: PGPG
author_rank: Frequent Contributor
timestamp: June 26, 2025, 02:01:40 pm
content: Quote from: Doctorandus_P on June 26, 2025, 12:33:22 pmEach transistor in each of them have its own B-E resistor.And the message, I reacted to, suggested that B-E resistor is absolutely wrong solution and it should be moved before serial resistor and there were suggestion that we should get into the habit of doing it well (meaning - not using B-E resistors).

author: PGPG
author_rank: Frequent Contributor
timestamp: June 26, 2025, 02:04:23 pm
content: Quote from: Peabody on June 26, 2025, 01:55:26 pmMosfets are voltage driven while BJTs are current driven.This is the crux of the differences in how they are controlled.

author: PGPG
author_rank: Frequent Contributor
timestamp: June 26, 2025, 02:31:23 pm
content: Quote from: Peabody on June 26, 2025, 01:55:26 pmIf you really want to understand bjt transistors working, see here:https://archive.org/details/Re0184OCR/Re_04_84_OCR/page/n7/mode/2upIt is the schematic of oscilloscope that I have designed and build in 1982. Those time, being a student, it was the only way for me to have scope, and I needed to have it so much, that spend a year on doing it. I still have this scope (but I'm not using it).Rys(fig).3 and Rys(fig).4 together are Y amplifier. 10mV not symmetrical DC signal is amplified to about 30V symmetrical signal at output (giving 1cm at screen). The key is to make gain being dependent on resistors and not transistor parameters.

author: physx
author_rank: Newbie
timestamp: June 26, 2025, 03:42:52 pm
content: Well, the highest current is very unlikely to exceed 10A per MOSFET and if it does so, it will only be for 10-15 seconds. My main reason for using two is to reduce the heat that they dissipate. 10A would give me 1W on one MOSFET, which they could probably get away with, if they have some sufficiently large copper planes underneath. However, with 3A, that drops to 0.09W per MOSFET, which is pretty much negligible, while 5A would give 0.25W per MOSFET and that's a rather likely scenario for the circuit.The switching speed is not a concern. I do expect this, as it is, to switch on and off within a second, and that's going to be good enough. I could use a relay, but this is less expensive and I need the low profile, plus isolating the rails is not a requirement.The load is going to be a couple (well, maybe 10+) hard drives and/or SSDs, so I don't expect a large inrush current either, immediately when the MOSFETs switch on. Rather, it will gradually ramp up as the drives start up.They will simply act as an on/off switch, controlled by a 3.3v signal from a computer, not even an MCU, so the current of the 3.3v rail isn't limited in any way, but of course, I don't want to use excessively large amounts there.Accoding to the suggestions, I've changed R8 to 100K and moved it to be before R5, so this is how it looks like now. I think this would probably do the job well enough, and that's all I need for now.

author: PGPG
author_rank: Frequent Contributor
timestamp: June 26, 2025, 07:19:14 pm
content: Quote from: physx on June 26, 2025, 03:42:52 pmHave in mind that if your load is 10A and it is resistive than during transistor switching there is the moment when at transistor there is half the supply voltage and at the same moment there is half of load current. So you have 6V*5A=30W.I have no experience with high current switching but how long is transistor going through such intermediate states can be important, so switching speed can be a concern, I think.

author: shapirus
author_rank: Super Contributor
timestamp: June 26, 2025, 07:40:48 pm
content: Quote from: physx on June 26, 2025, 03:42:52 pmThis is an interesting point. Assuming the hard drives are rotational, I would expect the opposite: quite large inrush current, which will then gradually drop down to relatively low values, as you would expect from any electrical motor. I don't know if there's any slow start circuitry in hard drives, never thought of this. Have you actually tested it with an oscilloscope (using for example a shunt or a current probe) to see what the current profile is at power-on?

author: physx
author_rank: Newbie
timestamp: June 26, 2025, 07:53:19 pm
content: Quote from: shapirus on June 26, 2025, 07:40:48 pmWell, while I have not tested it, the electronics will take some time to start up the motor. It's not like connecting a resistor, as it will not pull the peak power consumption straight away, so I imagine that would give enough time for the mosfet to fully open.Quote from: PGPG on June 26, 2025, 07:19:14 pmYes, switching speed can be a concern, if you put it that way, but I won't be switching them at high frequencies, so it doesn't have to be milliseconds. That's what I really meant. Whether it takes 0.1-0.3s to switch to fully open doesn't really matter.

author: shapirus
author_rank: Super Contributor
timestamp: June 26, 2025, 08:04:45 pm
content: Quote from: physx on June 26, 2025, 07:53:19 pmRight, judging simply by the sounds the HDD makes when plugged in, the time before it begins to spin should be more than enough for the transistor to fully turn on.Measuring the current profile may still be useful to understand what peak current is to be expected (to see if the transistors you choose are suitable). That information may be available on the internet, though, surely someone measured this before?

author: UnijunctionTransistor
author_rank: Frequent Contributor
timestamp: June 26, 2025, 08:13:25 pm
content: I second Tooki’s suggestion of using a dedicated high side load driver.They possess a number of protection features which are not easily implemented with discrete devices, and many have additional diagnostic and status outputs.

author: Someone
author_rank: Super Contributor
timestamp: June 26, 2025, 08:37:05 pm
content: Quote from: shapirus on June 26, 2025, 07:40:48 pmPlenty of examples found on computer forums of people measuring spinup current profiles. Going back some time servers did have options to stagger (for minimum current draw) or simultaneously (for minimum boot time) turn on hdd units, probably still an option buried somewhere in some servers today.tldr: minimal to no soft start in hdd, they want to turn on as fast as possible

author: Peabody
author_rank: Super Contributor
timestamp: June 26, 2025, 08:54:56 pm
content: I think the current draw of an electric motor at startup is very high. It's essentially the stall current.

author: thm_w
author_rank: Super Contributor
timestamp: June 27, 2025, 12:02:52 am
content: Quote from: Someone on June 26, 2025, 08:37:05 pmYes and we are talking about 1-2 seconds before the load actually ramps up, which is an eternity in terms of a FET switch, even with a 10k pullup.https://www.reddit.com/r/DataHoarder/comments/111qhff/calculating_hdd_spinup_peak_power_draw_from/https://knowledgebase.45drives.com/kb/start-up-power-draw/Quote from: Peabody on June 26, 2025, 08:54:56 pmHDD is brushless with IC control so it can soft start and delay start up if it wants to.

author: Someone
author_rank: Super Contributor
timestamp: June 27, 2025, 01:27:37 am
content: Quote from: thm_w on June 27, 2025, 12:02:52 amThe slew of the switch can probably be relatively relaxed and remain within the SOA, but the context from the OP was around (peak) current handling. 10 drives can easily be somewhere in the order of 20A for many seconds of spin up!

author: shapirus
author_rank: Super Contributor
timestamp: June 27, 2025, 07:47:49 am
content: Quote from: Someone on June 27, 2025, 01:27:37 amTwo separate issues actually:1) transistor turn-on time: seems to be a non-issue as the drives will start consuming bulk of the power well after the transistors become fully on; also a non-issue if a mosfet driver or a dedicated load driver is used;2) peak current handling capability: has to be taken into account in any case, as 10 electric motors starting to spin up at the same time can draw a lot of current for considerable time.

author: PGPG
author_rank: Frequent Contributor
timestamp: June 27, 2025, 10:19:10 am
content: Quote from: physx on June 26, 2025, 07:53:19 pmI was not writing about high frequency switching but about one time switching. Imagine how small the transistor structure is and how fast it get hot when dissipated power is few times higher then nominal. When structure get something about 175°C Game is Over.

author: tooki
author_rank: Super Contributor
timestamp: June 27, 2025, 11:07:10 am
content: Quote from: PGPG on June 26, 2025, 07:19:14 pmThe selected MOSFET turns on fully in 50ns, assuming it’s driven properly. So unless you’re switching a high current millions of times a second, the heat dissipation from the intermediate state simply won’t matter, because it won’t dwell in that state long enough to matter.

author: tooki
author_rank: Super Contributor
timestamp: June 27, 2025, 11:08:47 am
content: Quote from: shapirus on June 26, 2025, 08:04:45 pmMOSFETs turn on in the order of nanoseconds, so orders of magnitude faster than the electronics in the hard drive will even try to spin up the disk.

author: tooki
author_rank: Super Contributor
timestamp: June 27, 2025, 11:14:30 am
content: Quote from: thm_w on June 27, 2025, 12:02:52 amSure, but the problem is that by default, all the drives start without any meaningful delay, so unless the BIOS staggers them, a bunch of drives all clobber the power supply at the same time.

author: tooki
author_rank: Super Contributor
timestamp: June 27, 2025, 11:19:30 am
content: Quote from: Someone on June 26, 2025, 08:37:05 pmSATA has a pin specifically for inhibiting spin-up, and apparently you can also change the drive firmware parameters to disable automatic spin-up. There’s no way this would be removed today, even more so than in the past! Since we now use SSDs as our everyday drives, hard disks are now largely used for backup and archiving, or for bulk storage, so in server rooms, hard disks are likely toonlybe used in arrays. I wouldn’t be surprised if, by sheer numbers, the vast majority of hard drives in use today are used in large storage arrays, where staggered spin-up would be essential.

author: shapirus
author_rank: Super Contributor
timestamp: June 27, 2025, 04:00:47 pm
content: Quote from: tooki on June 27, 2025, 11:08:47 amIt'll beno lessthan nanoseconds. But it can be more. It depends on the circuitry that charges and discharges the gate. It can potentially be slow enough to become a problem if it's done wrong enough.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 27, 2025, 07:10:53 pm
content: spin up of HDD's can be controlled by software. There are no extra "pins" needed. You can also program a HDD so it does not spin up when it gets power. But do be aware that if you do so, you can't boot from it until you reverse this.

author: tooki
author_rank: Super Contributor
timestamp: June 27, 2025, 08:29:25 pm
content: Quote from: shapirus on June 27, 2025, 04:00:47 pmTechnically speaking you’re absolutely correct, but let’s be realistic for the situation being discussed here:1. we know the proposed drive circuit, and 2. even if it gets slowed down 1000-fold to 50μs, that’s still completely acceptable for an application like this one, where it’s switching and then staying there for a long time.It’d be one thing if we were switching it continuously at 100kHz. But we are looking at practically nonrecurring switching events here.The datasheet (attached) doesn’t have much information about pulsed current, just an absolute maximum pulsed current of 80A. Unfortunately there is no pulsed current SOA diagram.

author: shapirus
author_rank: Super Contributor
timestamp: June 27, 2025, 09:31:04 pm
content: Quote from: tooki on June 27, 2025, 08:29:25 pmAgreed. In any case, however, guessing and assuming wouldn't be right, especially when measuring and calculating the required parameters is very feasible. It's better to be certain that the transistor (or whatever will be used as the switching element) will stay within the SOA and thermal limits, and if that is easily achievable, then there's little reason not to do it.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 28, 2025, 03:04:34 am
content: Quote from: physx on June 23, 2025, 02:49:14 pmWith what sound like expensive loads, you could look at true gate drivers.Newish parts like 1EDL8011 are HighSide gate driver for NMOS with ChargePump operating 8-125V and with a ILim sense and output using RDS, in SO8.NMOS drive allows you to use lower RDS parts.There are also ideal diode drivers that are similar.

author: Psi
author_rank: Super Contributor
timestamp: June 28, 2025, 04:06:38 am
content: Quote from: physx on June 23, 2025, 02:49:14 pmVN7003ALH is one option, nfet+built-in-gate-driver. Single package that can switch 10's of amps at 4 to 28 V. Even PWM up to a few 100 hz if needed.It's RDS is 3.5 mΩ. So 30A = 3.1 watts to burn off, which is doable with enough copper on the PCB, and easy with a heatsink.Also has built in current sense amp output so you can measure the amps from a MCU.

author: physx
author_rank: Newbie
timestamp: June 28, 2025, 05:26:43 pm
content: Thanks for all the responses!I can't respond to everyone, but I think the below would answer most of the questions and I think I've also got my answer, so, again, thank you all!The peak current for the spin-up of HDDs is going to be perhaps 10A, as this won't drive more than 6 drives. So one might say that using two MOSFETs for that is overkill, but the reason for that is to lower the per-mosfet and also the total power dissipation.I could use a driver, yes. But there is no microcontroller involved, so I wouldn't be able to take advantage of any of the "smart" functionality of such a device. Yes, current limiting is nice and temperature monitoring and shutdown in the event of overheating is also nice, but I can use a simple fuse for the first one and spread the load across two MOSFETs to ensure that they won't ever need to dissipate more than 0.25W each, as the sustained load will be around 10A across the two MOSFETs combined, if they are used with 12 SSDs instead of 6 HDDs, as that's the other possible use case for this. (With some 12->5V DC-DC converters, of course).And as some of you have pointed out, yes, the HDDs do pull a fair amount of current during startup, but it si delayed by at least 0.5s, which should be plenty of time for the MOSFETs to fully turn on, and so I don't think they could possibly overload them whilst they are not fully turned on.