Pfet help

Discussion in 'General Electronics Chat' started by s_mack, Jul 17, 2012.

  1. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    Sorry for the extremely short and non-descriptive title! I kept getting an error 500 server error and someone suggested I post a shorter title. Weird.

    Anyway, I'm kinda new to all this and I'm wondering if someone can look at my simple partial schematic and let me know if I have the right idea?

    I have two potential power sources. One is USB, marked Vbb on the schematic, and the other is battery (via a 5v regulator) marked Vaa.

    What I want is for both the micro and "other stuff" to be powered if Vaa is present and to have that power NOT go to Vbb. If Vaa is NOT present AND Vbb IS present, then I want only the micro to be powered and not the "other stuff" or Vaa.

    I think what I've drawn satisfies this but I also wonder if its the right way to do it. Is there something simpler/cheaper/better/whatever to look at instead?

    - Steven
     
  2. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Show us a "truth table", with Vaa and Vbb as variables, and with "micro" and "other stuff" as the two output functions.
     
    #12 likes this.
  3. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    Hmmm... OK, let's see if I can figure that out...

    Vaa Vbb Micro Other
    1 X 1 1
    W T F !


    Ok, tables in bbcode sucks... I'll figure something out and get back to you ;) Wife's calling me so probably a few hours. Don't wait up!

    Thanks.

    - Steven
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    You've got the right idea (sort of), but are overlooking the fact that there is, in general, a difference between saying Vaa is zero and saying Vaa is not present. If Vaa is zero, (and Vbb is present at some meaningful positive voltage), then Vaa will turn the transistor tied Vbb on. However, if Vaa is simply not present (i.e., floating), then all bets are off because you have a floating gate, which places the transistor in an indeterminant state.

    Also, the schematic implies that it is okay for the micro to be powered by roughly a diode drop less than whatever Vaa is. Is it also the case that it can be powered by a diode drop less than what Vbb is?

    Let's see if I can't capture the essence of what you are trying to do:

    1) You want the micro to be powered if either Vaa or Vbb is present.
    2) You want the other stuff to powered only be Vaa.
    3) You don't want Vaa and Vbb to drive each other.

    How about the attached.

    If you want Other Stuff to get the same voltage (to a close approximation) as the micro, then just but a diode in the path from Vaa to the Other Stuff.
     
    Last edited: Jul 18, 2012
  5. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    I don't see an "attached"... either you forgot to attach, or I don't know where to look!

    Your 1,2,3 list is right!

    Vaa regulated 5v and Vbb is USB ~5v. All components are suitable for at least 3.3 to 5.5 range supply.

    To resolve the floating issue... can I put in a pull-down resistor to ground when the power source isn't present? Perhaps that's on your attachement.
     
  6. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
  7. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    I'm not sure if it makes much practical difference, but this would be more correct to what I'm going for:
    Put another way: If Vaa is there, I want Vbb to butt out completely. If Vaa is not there, I want Vbb to power only the micro.
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    I don't know why the file attachment didn't work. I know it uploaded successfully the first time. But it appears to be there now.
     
  9. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    Ahh, but then what happens with the micro when both Vaa and Vbb are supplied? Is it OK to just get the power from two sources at the same time????
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    In all likelihood, yes, there will be no problem as long as they share a common reference node ('ground'). There are some situations in which you want separate supplies, if possible, and others in which you want the same supplies, if possible, but these situation typically are dealing with noise issues in fairly sensitive circuits.
     
  11. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    Its all common ground. It is potentially a "sensitive circuit" in that this involves radio transmission... however, when the USB is connected, the radio is not transmitting so I guess its not an issue anyway.

    Your circuit is simpler, but is there any reason I shouldn't use p-fets as I originally planned?
     
  12. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    The PFET between Vaa and the micro is always off (Vgs=0). When Vaa is present and Vbb is off, the drain-to-substrate junction is forward biased, so it will have a forward drop of about 0.6V. A simple diode in that location would do the same thing.
     
  13. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    I'm a bit concerned about forward biasing the substrate diodes in one or more of the possible combinations. With a PFET, if either the source or drain voltage is more than a diode drop above the substrate voltage, then it will forward conduct. Thus you normally tied the substrate to whichever terminal will always be at the higher voltage (which is typically the source) or directly to the highest suitable supply voltage. In a three terminal device you are stuck with it tied to the source. But this means that if your drain is every more than about 0.7V above the source voltage, that you will get current flow (regardless of gate voltage).

    One of your PFETs will only function in this mode. At first I assumed this to be a diode-connected FET (with the drain tied directly to the gate, a FET acts like a diode), but now I see that it is the source that is tied to the gate. Hence the channel is always off, but the drain-substrate junction will act as a diode with the resulting current coming out the source pin. FETs are generally not intended to operate this way, so you need to check the specs pretty closely if this is what you want.

    I think the other PFET is going to cause you problems when Vaa is on and Vbb is low for this same reason. Vaa will be suppling power to micro but the PFET will act as a drain-substrate (and then source) forward biased diode.
     
  14. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    Thanks! I'm a learnin' :)
     
  15. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Good catch. I failed to notice that that FET has the same problem as the other one.
     
  16. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    I frequently tell people that engineering is both an art and a science. The 'art' is learning from your own mistakes and the 'science' is learning from the mistakes of others. Practice the science as much as possible, because while practicing the art is a very effective means of learning, it also tends to be pretty spendy.
     
  17. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    indeed :) Thanks
     
Loading...