Electronic – Using a P-channel mosfet instead of a PNP

mosfetpnpusb

With the LPC1343 microcontroller (Cortex M3), there is a USB_CONNECT line which goes low when the micro is ready to connect to the computer via USB. This "soft connect" feature is implemented on the LPC Baseboard with a PNP transistor circuit. Would I be able to use a p-channel mosfet instead? I have already built the p-channel mosfet equivalent, and it works, but wondering about its reliability and whether it is "good practice".

Possible issues that (I think) may arise could be due to the fact that mosfets are voltage controlled devices, and on power up of the device, the gate voltage may not rise as fast as the voltage supply (3V3) (although they are tied via a 33k resistor in my implementation), and the mosfet would erroneously "conduct".

Note: My p-channel mosfet circuit just consists of replacing Q1 with a p-channel, R69 remaining the same, eliminating R68, and changing R66 to a 33K (no particular choice, had one on hand)alt text

Best Answer

if the line is high when it is non-active(instead of floating) you should be able to remove the pullup and leave the 3k and have it work without modification.

When the P Channel has it's gate high it should be in cutoff, as you would want. When the gate goes low you can expect it to saturate, allowing full conduction through the mosfet like a short. MOSFETs are slower, you want to make sure you have one that has a switching frequency that is relatively close to the rate they suggest, but you should have no issues with this, the USB control will not be toggled at an extremely high rate(>10MHz).

The 3k resistor you have in series you can leave to avoid you pulling too much current when changing states, but it will probably work better if you reduce that a significant amount.

You want to make sure that the change in Voltage your output pin must drive divided by your resistance is less than the maximum current you pin can drive. This will protect your circuit without slowing the drive time of the MOSFET. The MOSFET is effectively a capacitance, so you can think of the capacitance with the resistance causing a delay to your signal (4 tau or 5 tau, depending on philosophy).