Author Topic: FETs are voltage controlled devices?  (Read 16679 times)

0 Members and 1 Guest are viewing this topic.

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 7992
  • Country: gb
Re: FETs are voltage controlled devices?
« Reply #50 on: May 16, 2015, 04:47:02 pm »
Which only matters if you try and connect a USB host to the port with Vin too low. In which case, well.. I suggest you shouldn't do so. Alternatively we could go back to the high threshold FETs.

Don't you mean low threshold FETs?

It's confusing using terms like high and low when talking about negative voltages.  Do you mean fets with a Vth of < -4.5V?  Or < -2V?

Higher magnitude. -2V is a greater magnitude than -1V. -4.5V threshold would never work for 5V switching, let alone lower.

Quote
Either way, I think I found a problem with the earlier circuit when using FETs that have too negative a threshold voltage.  For example, if Vin is only 3.6V, and I pull the gate down to enable USB OTG, Vgs will only reach -3.6V, so a Vth of -4.5V won't work.

If Vin is only 3.6V and you pull the gate down to enable USB OTG, you'll only have 3.6V going out to a device expecting 5V.


Quote
And yet, we've seen it's possible to make a non-inverting level shifter using a single FET, but this circuit uses two.

Using four transistors where only two would suffice is bad design.  If only because it wastes precious space on the PCB and increases your BOM and placement costs.

And yet Atmel used it because it's good design: You don't spend a week fussing over it.

There are off-the-shelf power switches which can probably do this with no external components if you really care about that.
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Re: FETs are voltage controlled devices?
« Reply #51 on: May 17, 2015, 06:55:12 pm »
I'm still lost.

I'm trying to figure out how Atmel's circuit works.  The one where they've got two PFETs back to back:

USB - DS - SD - VIN

For the sake of argument, let's say I want to ditch the NFETs and pull the gate up to 3.3V instead so I can drive it directly with my uC pin and the ID signal for USB OTG. (ID is connected to ground when VIN should be powering the USB. Otherwise it is not connected.)

And this is what I know about how PFETs work:

If Vgs < Vt and Vgd > Vt, then S and D are connected by a variable resistance.
If Vgs < Vt and Vgd < Vt, the resistance drops to Rds ON.
If Vgs > Vt the FET is off.


So let's say I have 5V on USB and 3.6V at Vin.

USB = 5V
Vin = 3.6V
G of Vin side PFET = 3.3V
G of USB side PFET = 3.3V

But that's as far as I get.  The source pins of the PFETs are connected together and, and the body diodes of the PFETs are pointing at each other, so no current should be able to flow.  And if no current is flowing, wouldn't that mean the source pin of each PFET has to be at the same potential as its drain pin?  But the two are connected together.  So they can't be at different potentials or current would flow between them.  Which it can't because of the body diodes.  UGH.

To make matters worse, this circuit doesn't even seem right.  I'm sure it works fine on Atmel's board with the 5V supply and the power multiplexer, but unless I tap it off between the USB and Vin PFETs, I can't see how it could work for my needs.  I only just came to this realization now. 

If The USB is at 5V and Vin is at 3.6V then I want the USB to supply power to the 3.3V regulator.  But I don't want the USB supplying VIN. 

I also noticed that in my simplified circuit with a single PFET, the problem I was having with the body diode allowing the USB to power VIN is because the diode is pointing at Vin.  But in the Atmel circuit, it's pointing away from Vin.  So I guess I need to do some more math and try to figure out if I can, or why I can't just flip that PFET around.

Ugh, this seemingly simple circuit is such a pain in the ass.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 7992
  • Country: gb
Re: FETs are voltage controlled devices?
« Reply #52 on: May 17, 2015, 07:25:46 pm »
They are not connected source to source. Look again.
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Re: FETs are voltage controlled devices?
« Reply #53 on: May 17, 2015, 09:02:35 pm »
Son of a bitch.

Okay, so two PFETs back to back with their drains connected, and the supply line for my 3.3V regulator connected between them. 

If ID or uC is LOW, both the gates of both FETs need to be pulled LOW so they're ON and Vin can supply the USB.
(And yes, I am aware that supplying a USB device with less than 5V is bad, this feature will only be used when Vin is supplied with 5V.)

If USB is HIGH, pull Vin FET gate HIGH to turn it OFF, so USB won't backfeed battery.
Except... USB can be HIGH if it's being fed from Vin.  So I can't switch the Vin FET on or off based on the USB voltage level alone. 
I guess I need to use the state of the USB FET's gate to set the state of the Vin gate?
Hm...

If USB is LOW, pull Vin FET gate LOW to turn it ON?


Hm... I'm not sure if I'll be able to figure out how to make that work, but if that won't work, I could try reversing things, so if Vin is powered, the USB won't power the circuit, and it's only connected if ID or uC pin is LOW, stating that the USB should be powered from Vin.  This might be easier.   Plus... if the device requires more than 500mA having Vin be the primary supply would allow the device to be powered properly even when being programmed.  (Though that's an unlikely circumstance.)

Also I wish the forum would stop timing out on me while I'm in the middle of typing my replies. :/
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Re: FETs are voltage controlled devices?
« Reply #54 on: May 19, 2015, 12:35:16 am »
So I'm still having difficulty with this, but I'm making some progress, in figuring out what WON'T work at least. 

There's something I don't get about the Atmel schematic though.

The Atmel SamD21 Xplained schematic shows two PFETs, with their drains connected.  The body diodes point away from eachother, to the source pin of each FET.

Now here's the thing I don't get:

A PFET is OFF when Vgs > Vth, and for PFETs, Vth can be between 0.4V and 4V depending on the FET.   

But the voltage at each source is 5V in that circuit.  And the voltage at the gate is 5V at most.  That would mean Vgs, at most, would hover around 0V.  Which is not enough to ever turn the FET completely off.

Am I wrong?


 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Re: FETs are voltage controlled devices?
« Reply #55 on: May 19, 2015, 03:10:48 am »
I think to solve this I need to connect the mosfets back to back, such that the sources are connected.  It appears I can do this with either P or N FETs.  I'm not sure what the difference is when using one or the other, aside from the logic at the gate being reversed, but using PFETs seems to be suggested for this kind of circuit far more often than NFETs, which is strange to me because NFETs are cheaper, and tend to be smaller for the same power dissipation rating.

But here's an example of two NFETs connected in this manner:


My question is this:

With the sources connected like this, how do I determine what Vgs is?  Like, if I set the gate high or low, I can't calculate what Vgs is to determine if it is above or below Vth.  With a PFET I can calculate that because the body diode can conduct, but here... well I don't know what's going on inside the FET.

I assume that pulling it high will turn it on, but I don't like assuming. :/  I want to know WHY and when it will turn on.

I mean as far as I can tell the source of both NFETs should be in a hi-z floating state.  So the behavior when I set the pin high or low should be unpredictable.
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Re: FETs are voltage controlled devices?
« Reply #56 on: May 19, 2015, 08:33:05 pm »
Ugh, god damnit!

I spent the last two days drawing up circuit diagrams and doing calculations while working on the assumption that P-FET voltage thresholds were always between +0.4V and 4V because when I wanted to know what the range of thresholds were I went to Digikey, searched for PFETs, and looked at the range of values on the chart:

http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&keywords=PMV48XP

BUT THE FRIGGIN VALUES ARE WRONG.

The Vgs on that part isn't 1.25V, it's -1.25V!

I have to assume the same is true for all the rest of the parts.

Also, while I'm ranting, if you don't include the body diode in your diagram of a mosfet in your tutorial on mosfets, I hate you.  And if you don't label the gate, source, and drain I hate you a little less, but I still hate you.  I also hate you if you just call it a FET and don't mention if it's a PFET or NFET.  I've had to keep going back and forth between six different mosfet diagrams just to keep track of what's what.  I think I've got most of it memorized now, but my god.  It could have been so much easier to learn this if people just took the time to label all the parts.  And leaving the body diode out is just unforgivable.

Well, back to the drawing board.  I wasn't making much progress on getting this to work, but maybe now that I know the right polarity for the threshold I can figure something out. :/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf