Optimal way to drive Pfets with 3.3V signal - Page 1
Forum section: electronics / projects

author: 3dgeo
author_rank: Frequent Contributor
timestamp: October 31, 2019, 06:27:11 pm
content: Well hello there,I have 3v3 MCU with 5V tolerant IO and want to drivethese puppiesto switch 5V.I thought I can just pullup MCU pin to 5V like in my first example below, but boy I was wrong – it seems MCU pin acts as a ground for those 1.7V that are above MCUs 3.3V and I'm getting only 3.3V still (correct me if I'm wrong understanding why I'm getting 3.3V). So, my next solution would be to use cheapo darlington transistor array likethis onePotential problem with using array is that Pfets gates will get it's power entirely from pullup resistor, so I assume resistor have to be low value for fast switching, that means more wasted power and loosing power is an issue... I don't have experience driving Pfets, so I hope someone with experience will give his 2cents.Pfets will be switched up to 200 times a second (not PWM) and a bit of "lag" is not an issue cos between switches I2C communication has to happen. Switching current up to 1A.I'm not happy I need extra chips to drive them at all, but as I have 7 Pfets adding one darlington array is'nt end of the world. This is hopefully a comercial product, so component and an assembly price does matter.P.S. I have next to me working 2nd example in the picture, Pfets seems to be a bit slow switching cos I'm using 10K pullups for now. Will test lower values. Sadly I don't have fancy oscilloscope to test this so I'm eye ballingThank you for your time reading and hopefully helpingDON'T MIND FLIPPED FET CONNECTIONS

author: magic
author_rank: Super Contributor
timestamp: October 31, 2019, 07:06:37 pm
content: I have seen the term "high side load switch" several times in similar threads on this forum, it sounds like a kind of IC that would solve your problem.Quote from: 3dgeo on October 31, 2019, 06:27:11 pm5V tolerant pin shouldn't pull down to 3.3V. But it's possible that only some pins are 5V tolerant or they are 5V tolerant only in input or open drain mode. You need to study the datasheet closer.

author: 3dgeo
author_rank: Frequent Contributor
timestamp: October 31, 2019, 07:21:29 pm
content: Quote from: magic on October 31, 2019, 07:06:37 pmIf you measure voltage between positive 5V and positive 3.3V you'll get ~1.7V, that means for that 1.7V 3.3V pin is like a ground, it's basically if you short out 1.7V to GND, that's why I'm getting 3.3V, at least that's my reasoning, I'm no expert tho. Cos I'm using pullups MCU and those pins are fine, but Pfet is not working. Yes, those pins probably can sink 5V or read 5V logic, but as MCU high is only 3.3 it will not work with 5V pullups.By writing "high side load switch" they probably had in mind Pfet or bootstrapped Nfet. Bootstrappis is a bit overkill in my circuit and it will add more cost than darlington arraySadly, I can't find PNP darlington arrays, only NPN, that would make my life easier.

author: OM222O
author_rank: Frequent Contributor
timestamp: October 31, 2019, 08:23:12 pm
content: the solution is quite simple:1) Connect the mosfet the right way around2) Use a logic level N channel fet insteadIn the schematic you have the drain connected to 5V instead of the source which doesn't work with P channel fets. Or again, simply use a N channel fet instead with source tied to ground and the load connected to drain.

author: 3dgeo
author_rank: Frequent Contributor
timestamp: October 31, 2019, 08:38:21 pm
content: Nah, this is not real schematic, I made it just to illustrate my point, so don't mind bad connections. Connections in real schematic is in a right way.I know I may look like and idiot, and arguably probably I'm, but if I could I would have used Pfets.

author: OM222O
author_rank: Frequent Contributor
timestamp: October 31, 2019, 09:02:44 pm
content: there is very little to information as to what you're trying to do ... maybe drawing an *actual* schematic would help? we can't just read your mind sorry.I would bet that the MCU is not your actual issue, rather it's something in your design.

author: ogden
author_rank: Super Contributor
timestamp: October 31, 2019, 09:10:35 pm
content: Quote from: 3dgeo on October 31, 2019, 06:27:11 pmWell, yes indeed. You need push-pull driver that does full 0-5V swing, not 0-3.3V, with 10k pull-up. Something like this (first google image hit):

author: madires
author_rank: Super Contributor
timestamp: October 31, 2019, 09:12:17 pm
content: If you have to use p-channel MOSFETs for whatever reason you can simply add a level shifter, e.g. SN74LVC8T245.

author: langwadt
author_rank: Super Contributor
timestamp: October 31, 2019, 09:48:52 pm
content: since it is only 5V it is much simpler (and safer) to use a USB power switch, they are current limited and thermally protectedthis one is only $0.07@1,https://lcsc.com/product-detail/PMIC-Power-Distribution-Switches_MT9700_C89855.html

author: 3dgeo
author_rank: Frequent Contributor
timestamp: October 31, 2019, 10:55:58 pm
content: Thank you for your replies.Yes, level shifter would do the trick, tho they are more expensive then darlington arrays (8.5ct).USB power switch – this could be the winner, it would eliminate need for extra chip, but would add 3 more parts to pick and place.Lets do math: 4.5 * 7 = 31.5ct +7PNP for USB switches, 3.8 * 4 + 8.5 = 27.7ct + 5PNP with darlington array, hm, stll I will keep in mind USB switches.

author: jonroger
author_rank: Regular Contributor
timestamp: November 01, 2019, 10:34:52 pm
content: You need to switch the MCU between "high impedance" and "ground", not the usual "3.3V" and ground. I've done this on a 5V tolerant MCU and it works well.

author: Zero999
author_rank: Super Contributor
timestamp: November 01, 2019, 11:45:03 pm
content: Quote from: 3dgeo on October 31, 2019, 10:55:58 pmThere are cheaper 74HCT series parts which will run off 5V and accept 3.3V logic levels. Try the 74HCT14, which is inverting, so a P-channel MOSFET will turn on, when the input is high. If it must be non-inverting, then there's the 74HCT241 or 74HCT08 AND gate.

author: 3dgeo
author_rank: Frequent Contributor
timestamp: November 02, 2019, 06:46:37 pm
content: Quote from: jonroger on November 01, 2019, 10:34:52 pmIf you mean open-drain output then yes, this will work, this is exactly how darlington transistor chip I planned to use works. STM32 IOs has open drain, so yeeey, no extra chipThanks!!!!!Quote from: Zero999 on November 01, 2019, 11:45:03 pmGood suggestion, only problem that those are HEX and I have 7 fets

author: Zero999
author_rank: Super Contributor
timestamp: November 04, 2019, 09:58:22 pm
content: Quote from: 3dgeo on November 02, 2019, 06:46:37 pmYou didn't click on all of the links. The 74HCT241 is octal.https://assets.nexperia.com/documents/data-sheet/74HC_HCT241.pdfThe 74HCT1G14 is a single gate package, so you could also use that in addition to the 74HCT14, but it's not a very elegant solution.https://assets.nexperia.com/documents/data-sheet/74HC_HCT1G14.pdf