Author Topic: Optimal way to drive Pfets with 3.3V signal  (Read 1595 times)

0 Members and 1 Guest are viewing this topic.

Offline 3dgeoTopic starter

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: au
Optimal way to drive Pfets with 3.3V signal
« on: October 31, 2019, 06:27:11 pm »
Well hello there,

I have 3v3 MCU with 5V tolerant IO and want to drive these puppies to 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 like this one Potential 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 balling  :palm:

Thank you for your time reading and hopefully helping :)

DON'T MIND FLIPPED FET CONNECTIONS
« Last Edit: October 31, 2019, 08:40:21 pm by 3dgeo »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #1 on: October 31, 2019, 07:06:37 pm »
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.

I have 3v3 MCU with 5V tolerant IO and want to drive these puppies to 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).
5V 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.
 

Offline 3dgeoTopic starter

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: au
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #2 on: October 31, 2019, 07:21:29 pm »
5V 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.

If 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 array :)
Sadly, I can't find PNP darlington arrays, only NPN, that would make my life easier.
« Last Edit: October 31, 2019, 07:23:23 pm by 3dgeo »
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #3 on: October 31, 2019, 08:23:12 pm »
the solution is quite simple:

1) Connect the mosfet the right way around  :-DD
2) Use a logic level N channel fet instead   :-//

In 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.
 

Offline 3dgeoTopic starter

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: au
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #4 on: October 31, 2019, 08:38:21 pm »
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 :D , but if I could I would have used Pfets.
« Last Edit: October 31, 2019, 08:57:46 pm by 3dgeo »
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #5 on: October 31, 2019, 09:02:44 pm »
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.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #6 on: October 31, 2019, 09:10:35 pm »
Pfets seems to be a bit slow switching cos I'm using 10K pullups for now
Well, 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):

 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8276
  • Country: de
  • A qualified hobbyist ;)
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #7 on: October 31, 2019, 09:12:17 pm »
If you have to use p-channel MOSFETs for whatever reason you can simply add a level shifter, e.g. SN74LVC8T245.
 
The following users thanked this post: 3dgeo

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #8 on: October 31, 2019, 09:48:52 pm »
since it is only 5V it is much simpler (and safer) to use a USB power switch, they are current limited and thermally protected
this one is only $0.07@1, https://lcsc.com/product-detail/PMIC-Power-Distribution-Switches_MT9700_C89855.html
 
The following users thanked this post: edavid, ogden, 3dgeo

Offline 3dgeoTopic starter

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: au
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #9 on: October 31, 2019, 10:55:58 pm »
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.
 

Offline jonroger

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #10 on: November 01, 2019, 10:34:52 pm »
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.
I am available for custom hardware/firmware development.
 
The following users thanked this post: 3dgeo

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #11 on: November 01, 2019, 11:45:03 pm »
Thank you for your replies.

Yes, level shifter would do the trick, tho they are more expensive then darlington arrays (8.5ct).
There 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.
 
The following users thanked this post: 3dgeo

Offline 3dgeoTopic starter

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: au
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #12 on: November 02, 2019, 06:46:37 pm »
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.

If 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 chip :)

Thanks!!!!! :)

There 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.

Good suggestion, only problem that those are HEX and I have 7 fets  :-\
« Last Edit: November 03, 2019, 02:24:21 am by 3dgeo »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20357
  • Country: gb
  • 0999
Re: Optimal way to drive Pfets with 3.3V signal
« Reply #13 on: November 04, 2019, 09:58:22 pm »
Good suggestion, only problem that those are HEX and I have 7 fets  :-\
You didn't click on all of the links. The 74HCT241 is octal.
https://assets.nexperia.com/documents/data-sheet/74HC_HCT241.pdf

The 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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf