P Channel Mosfet

Discussion in 'General Electronics Chat' started by djm2, Dec 28, 2015.

  1. djm2

    Thread Starter New Member

    Dec 28, 2015
    2
    0
    Hi there

    I have not used a P channel MOSFET before so I may have a mis-understanding here.

    I have a PIC connected to a P Channel Mosfet - logic level - NDP6020P. I am using the PIC to turn the power on and off to a load - 5v @ about 300mA.

    I have attached a screenshot of the circuit I am using. The green block represents my load. My PIC output is turning on and off every few seconds and the source pin goes to 4.7v when the PIC output is high and 5v when the output is low. I cannot figure out why the MOSFET will not turn my load off. I have checked the values of the resistors and everything is good. Can anyone point out where I have gone (badly) wrong?


    David
     
  2. dl324

    Distinguished Member

    Mar 30, 2015
    3,234
    619
    Welcome to AAC! And thanks for attaching a schematic.

    You have the MOSFET source and drain terminals reversed.
     
  3. crutschow

    Expert

    Mar 14, 2008
    12,986
    3,224
    As dl324 noted, you have the P-MOSFET source and drain terminals reversed, so the substrate diode is conducting the current even when the MOSFET is off.
    For a high-side switch using a P-MOSFET as you have, the source must be connected to the plus voltage supply.
    Then, when you apply a logic low to the gate (0V), the Vgs voltage (gate negative with respect to the source) turns on the MOSFET.
    Note that a logic high (5V) turns the transistor off and a logic low (0V) turns the transistor on.
     
  4. djm2

    Thread Starter New Member

    Dec 28, 2015
    2
    0
    A quick switch of the pins and yes you are correct!

    Thanks!
     
  5. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    My memory device is, "P=pinch". With a p-channel mosfet, positive voltages pinch off the flow of current.
    Logical thinking reminds you that with an n-channel mosfet, negative voltages will pinch off the current flow.
     
  6. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Maybe you should change to using the N mosfet or adding a npn bjt to drive the P mosfet, if the PIC output a low level to drive the P mosfet then it could be bad thing when the PIC in the initial status may output a low level signal and it will drive the mosfet to turn the load on.

    Normally using the output port of uC to output a high level to drive the NPN bjt or N mosfet is better for the initial status of uC.
     
  7. benta

    Member

    Dec 7, 2015
    101
    24
    Huh?

    Where did you get this baloney from?

    The OP is doing it completely correct.
    All microcontrollers I know are either three-state or pull-up output when booting. There is no way OP can run into trouble here.

    The only thing to look out for is to set the output port pin _level_ register, before setting the output port _direction_ register, when booting.

    Many people make the mistake of setting direction before level.

    Benta.
     
  8. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    Be polite.
    I don't know whether ScottWang is right or wrong, but he's working through a translator program from Taiwan.
    You have to allow for the language differences and whatever quality of translator program he's using.
     
    Sinus23, cmartinez and JohnInTX like this.
  9. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    I already saw that Scott´s english wasn´t perfect and it didn´t bother me , but really is it apropriate for a moderator of an english speaking forum to be communicating through a translator if that really is the case?
    Not that it matters in this case, I think both Scott´s and benta´s replies were absolutely clear about the matter in question. However benta could be more polite about stating his opinion.

    Nevertheless to the point, most modern micros startup with pins in high impedance state, so one really needs to set the desired fail-safe level with a pullup or pulldown resistor every time, and no one can say if an N channel or P channel is better regarding the reset state of a uC.
     
  10. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Do you like other members say that to you?

    Shortcut maybe easy to get to the present target, but it is not the best way for a long term study, and could be bring bad behavior to the future.

    Can you find the word "booting" with pic or uC from google, and what does that means?

    That is the basic conception for uC.

    Have you ever searched how many examples used the way as TS and how many examples did as I suggested, why ?
     
  11. dl324

    Distinguished Member

    Mar 30, 2015
    3,234
    619
    That's some pretty harsh language coming from a new member on a public forum.

    Dialog sometimes gets heated, but ripping into a moderator with less than a dozen posts under your belt??
     
    JohnInTX likes this.
  12. dl324

    Distinguished Member

    Mar 30, 2015
    3,234
    619
    I don't think that has anything to do with his ability to be a Moderator.
     
  13. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    I'm using google to search and google online translator all the time, but I didn't use it to writing a sentence in Chinese and translating to English, I was used translator to checked the spelling for all article, I just hope there is no any wrong spelling, and sometimes I will copy the English articles or posted from forums to translate to Chinese.

    Although the google online translator really helpful, but its ability is not that good to translate from Chinese to English or English to Chinese perfectly, but it is improving, if I write down the all article in Chinese and using translator to translate to English, I think it will be as an entertainment like guessing the puzzle, I also used some other online translator to help me.
     
  14. DickCappels

    Moderator

    Aug 21, 2008
    2,647
    632
    Moderator note: Please try to stick to the main topic of this thread, and help the threadstarter.
     
  15. benta

    Member

    Dec 7, 2015
    101
    24
    I apologise for using the word "baloney", it was apparently received differently and harsher than I thought.

    Concerning the rest of my post, I stand by it. Your "Google Translate" Moderator came in with at suggestion that was nonsense from a technical perspective, language problems notwithstanding.
    Apart from that, I'll withdraw from here, as this seems to be a forum for students that have only just learned what a transistor is.

    Cheers and Goodbye,

    Benta.
     
    Last edited: Dec 29, 2015
  16. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,555
    2,513
    You would've been in for a surprise, if you would've stuck around a bit longer...

    EDIT: Where's the "Dislike" button when I need one?
     
  17. benta

    Member

    Dec 7, 2015
    101
    24
    One last word before I disappear: "booting" is the standard term used for a microcontroller/microprocessor powering up, resetting and initialising before entering operation.
    That this is unknown sort of brings things into perspective...

    Benta.
     
  18. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Hello,

    The "booting" can also been seen as "powering-up" or "initializing".

    Bertus
     
    cmartinez likes this.
  19. cmartinez

    AAC Fanatic!

    Jan 17, 2007
    3,555
    2,513
    Just like when a circuit's startup voltage is ramping up... when you're referring to "bootstraping" a mosfet
     
  20. JohnInTX

    Moderator

    Jun 26, 2012
    2,340
    1,022
    It's not unknown here but you've mischaracterized it. The term as applied to computing goes back to way before microprocessors and was used in early computers (with no permanent storage) to describe the process of loading a small program, frequently manually using console switches, that was just smart enough to read enough of the OS (sometimes from an intermediate medium like paper tape) so that it could take over and read the rest of itself into memory to start operation. The process was reminiscent of the colloquial 'Pulling oneself up by one's bootstraps'. As computing hardware evolved, boot loaders began be incorporated in various ways using non-volatile memory (BIOS reads the boot sector etc). It was still called 'booting up' and over time, the term has evolved and many apply it to any system startup.

    I hope you elect to stick around. You seem to have knowledge that would augment the wide array of skills on daily display here on AAC. Just realize that you wouldn't be the only one..

    Apologies to the TS for off-topic.
     
    Last edited: Dec 29, 2015
    cmartinez likes this.
Loading...