Author Topic: Understanding PMOS (battery-usb power switch)  (Read 1100 times)

0 Members and 1 Guest are viewing this topic.

Offline vireswiresTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Understanding PMOS (battery-usb power switch)
« on: December 12, 2023, 10:16:31 pm »
Hi - first post here!

I'm learning about PMOS for the case of a switch between usb and battery power.
The USB and battery are both ~5v (battery 4.8, and usb I've read can fluctuate between 4.75-5.25).
I understand that the PMOS in the diagram below behaves like a switch. Here's how I'm thinking about it:
Switch closes when USB power is removed, to allow power to flow from battery. Switch is "blown" open by the voltage if USB is re-inserted.

My trouble is in understanding the PMOS equations in the chart. I've chosen a PMOS from digikey that seemed appropriate (6v Vdss, 6v Vgs(max), 1.2v Vgs(th). I was more interested in exploring the conditions, than solving for current, so I plugged in some examples using 4.8V for Source, 1.2V for V(th), and then several options for the USB (including ones well below/above 5v).

In the end I was able to get an example that worked for Cutoff, one that worked for Saturation, but I somehow couldn't find one that matched the inequality given for Linear.

I'm using the USBv - BATTERYv = Vgs, 1.2 = Vth, 4.8 = Vds

So I'm thinking I must have some confusion about what I'm doing, and was wondering if anyone could help :)
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2504
  • Country: gb
  • Recovering Electrical Engineer
Re: Understanding PMOS (battery-usb power switch)
« Reply #1 on: December 13, 2023, 11:44:21 am »
Your MOSFET is the wrong way around and that will kill it.
To fully turn on a MOSFET the voltage applied to the gate must be larger than Vgsth. Most power mosfets will have a Vgsth greater than 5V so you have to be careful about choosing the right one for your application. Search for "logic level MOSFET”, these are designed for low voltage applications and have very low Vgsth.
The source connects to the incoming supply and the gate must be pulled low wrt to it. Pulling it down to ground will turn it on, pulling it up to Vs will turn it off.  If you want to switch it from another source (ie not refered to Vbus) just add a small npn as shown.
 
The following users thanked this post: vireswires

Offline Chalcogenide

  • Regular Contributor
  • *
  • Posts: 167
  • Country: it
Re: Understanding PMOS (battery-usb power switch)
« Reply #2 on: December 13, 2023, 12:44:28 pm »
The mosfet is correctly oriented in vireswires's post, because its main purpose is to prevent back-feeding of the USB voltage into the battery. but for that circuit to work he needs a diode between the 5V USB and the supply to the rest of the circuit (with the pull-down on the USB side), so that when the USB is connected, power flows through the diode to the rest of the circuit, and the gate is pulled to 5 V, disabling the mosfet, but when the USB is disconnected, the pulldown on the USB side pulls the gate low and turns on the mosfet. I have used that circuit many times and all you need is a mosfet with low threshold (like the Si2301).
 
The following users thanked this post: vireswires

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2141
  • Country: us
Re: Understanding PMOS (battery-usb power switch)
« Reply #3 on: December 13, 2023, 03:33:35 pm »
Yes, the mosfet is oriented correctly, and you do need the (schottky) diode in the 5V line.  Without it, immediately after the mosfet turns on, high voltage would be applied to the gate, which would turn the mosfet off again.

This is typically called a "load sharing" circuit, or sometimes "power path".  Here's a Microchip app note on this kind of circuit.

http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf

One thing to watch out for is that the 5V source should be the same or higher voltage than Vbat.  If Vbat gets much higher than 5V, current from the battery will flow though the mosfet's body diode even when it's off.

The mosfet doesn't ever operate in the linear region.  It's either off or full-on saturated, at least ideally.
 
The following users thanked this post: vireswires

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1625
  • Country: ua
Re: Understanding PMOS (battery-usb power switch)
« Reply #4 on: December 13, 2023, 04:09:52 pm »
Yes, the mosfet is oriented correctly, and you do need the (schottky) diode in the 5V line.
...or another PMOS instead of the diode to avoid the junction voltage drop. Will likely be irrelevant considering a typical 5V USB device's power consumption, though, as long as the device is fine with seeing 5V - Vf, which is apparently the case (because of the battery power option).
 
The following users thanked this post: vireswires

Offline vireswiresTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Re: Understanding PMOS (battery-usb power switch)
« Reply #5 on: December 13, 2023, 05:57:17 pm »
Thanks so much everyone. Really appreciate the help with this. I had meant to post this chart as it has the equations I was referring to in the OP, which I'm very much interested in understanding better. If anyone wants to take a shot at a conceptual explanation  :D

I'm interested in why I can't find a working example for linear, even if it is ideally not something that happens.

I'm also unclear on some things in particular. Understand Vth (an inherent property of the MOSFET given on data sheet). Understand Vgs (voltage to gate - voltage of source). But I'm confused about Vds... is this referring to the MAX Vds given on a data sheet, or is it supposed to be difference between the source and whatevever's on the other side of the MOSFET when it's off (in this case gnd which is 0v)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf