LowPowerLab Forum

Hardware support => Low Power Techniques => Topic started by: gregcope on May 07, 2017, 05:40:31 PM

Title: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 07, 2017, 05:40:31 PM
Hi.

I am trying to create a highside power switch for a GPS so that I can power it up when needed.  I also want to power its internal backup circuit, which means I cannot use a N-Channel Mosfet on the lowside/grd (as I need to connect GRD all the time).  I want to switch the GPS on for several seconds to get a fix then off.  Switching speed is not relevant.

Moteino Mega
NDP 6020P P-Channel Mosfet
Gate To pin 12 + 1K pull-up Resistor to 3.3V pin
Drain To GPS VIN
Source (Moteino 3.3V pin)
GRD GPS -> GRD Moteino

This is on a perfboard - hence the through hole.  Moteino and GPS are on headers.

When no GPS is connected Mosfet works fine. 3.28V to GPS VIN when pin is LOW. 0V when Pin is HIGH.

When GPS is inserted into headers I lose Serial Output from the Moteino, and only see 1.2V from the Mosfet / on the GPS VIN pin.

If I connect the GPS direct to 3.3, GRD and Pins 12/13, GPS works fine.

Oddly.  If I do a continuity check between drain and source, the GPS fires up, and serial works.

Thoughts?  Its as if the mosfet cannot quite power up the GPS.

I want to use the same High Side Switch design with a GSM module.  Hence want something that works.  On the GSM I will be switching a LIPO on / off, so slight higher volts at 4.1 or 5V if charger is on.

I am copying this design (Felix's);  https://lowpowerlab.com/2015/01/30/weathershield-is-here/
Nick Gammon has a similar example here; https://www.gammon.com.au/forum/?id=12737&reply=1#reply1

Ops.  Just noticed both examples have a resistor in series with the Pin / Gate (gate resistor?).  Can I use a 1K here? (or 560R, 100R as I have these in the parts bin).
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: TomWS on May 07, 2017, 06:10:34 PM
If I connect the GPS direct to 3.3, GRD and Pins 12/13, GPS works fine.
I don't understand what you mean by "and Pins 12/13" above.  What relevance are these if you're powering the GPS directly from 3.3V?
Quote
Ops.  Just noticed both examples have a resistor in series with the Pin / Gate (gate resistor?).  Can I use a 1K here? (or 560R, 100R as I have these in the parts bin).
You don't need a resistor in series with the gate for this application unless you were controlling the rise/fall time of the drain.

Tom
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 08, 2017, 02:17:21 AM
Pins 12/13 on the Mega are Serial, which goto the the GPS RX/TX.

My point in that sentence, is off board, the hardware works.

Rise / fall time not relevant.  Reading around after I posted - I thought a gate resistor was there to limit current draw.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: TomWS on May 08, 2017, 07:46:10 AM
Pins 12/13 on the Mega are Serial, which goto the the GPS RX/TX.
If that's true then why:
Quote
Gate To pin 12 + 1K pull-up Resistor to 3.3V pin
this would mean that you're modulating the gate with one of those signals rather than having a separate, solid on, power control GPIO pin.
Quote
Rise / fall time not relevant.  Reading around after I posted - I thought a gate resistor was there to limit current draw.
A gate resistor WOULD be to limit current into the Gate node, but that is typically only useful if you also have a capacitor from gate to drain.  The rc time constant of the resistor/capacitor combination would control rise and fall times.
Tom
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 08, 2017, 07:47:36 AM
Unless someone can spot an issue with the hardware design I am going to make another to rule out odd connections and the mosfet.

Thanks
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 08, 2017, 07:49:55 AM
Sorry Tom.  Typo on my part, 10/11 are serial.  12 is to the gate.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: TomWS on May 08, 2017, 01:21:42 PM
This FET should do what you want.  Given its size, it should be easy to measure voltage G-S and D-S when it's on.  According to your description you should have 3.3V Vgs, and <0.2V Vds.

Tom
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 08, 2017, 03:06:19 PM
If I have this right

G-S is -3.13V
D-S is 0V

With a 100R (to replicate 30mA load) resistor in place of the GPS Serial / mosfet works...

Would imply something wrong with the GPS.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 08, 2017, 03:08:57 PM
Here is a picture of the board with 100R resistor in place of the GPS VIN/GRD (in headers)
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 08, 2017, 03:09:23 PM
And now with the GPS in.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 08, 2017, 03:19:28 PM
Swapped out another GPS and identical issues ...
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 08, 2017, 03:51:25 PM
I think those measurements may have been with a resistor in.


Will repeat with a gps in.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: TomWS on May 09, 2017, 09:40:13 AM
Greg,
looking at your photos of your board, I realized that you're using Adafruit's GPS Breakout module.  This module has an onboard voltage regulator so that you can run the GPS from 5V Vin.  Now the VR has a very low dropout voltage (0.310V) but the GPS Module itself is rated to run from 3.0V to 4.3V. 

Consequently, directly wiring Vin to 3.3V MAY allow the GPS module to operate, but you're out of spec with this condition and, adding the additional voltage drop of the FET, however small, may be the killer.

The 3.13V that you measured with a 100ohm load resistor is too low to operate the GPS module from Vin pin. 

ISTM you have a couple of choices:
   1. the easiest change is to wire the FET output directly to the 3.3V pin of the module.  The VR in this case is a MIC5225 which actually specs this condition (implying that its an acceptable configuration) with a reverse polarity current of approximately 7.5uA with a reverse voltage or 3.3V at worst case temperature (see page 5 of https://cdn-shop.adafruit.com/datasheets/mic5225.pdf).  Your GPS should certainly run under this condition.
  2. Modify your FET circuit to feed between 3.7V to 12V the Vin input.  I'm sure you have the power supply source to do this, but you'll need an additional FET (N Channel) to control the Load Switch FET's gate with the N Channel's gate driven (with reverse logic) by the Mega.  Of course, then you're back to the problem of finding a through hole version of the N Channel FET...

Tom
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 09, 2017, 12:51:30 PM
Thanks for checking Tom much appreciated.   Your comments seem spot on.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 09, 2017, 01:52:32 PM
Another idea.

Power directly from a pin?  With battery backup the acquisition phase should be a few seconds at most @28mA and then drop to 20mA tracking.

I plan to add an active antenna.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: TomWS on May 09, 2017, 02:09:12 PM
Another idea.

Power directly from a pin?  With battery backup the acquisition phase should be a few seconds at most @28mA and then drop to 20mA tracking.

I plan to add an active antenna.
I didn't check what the low power options were on this device, so I couldn't comment if you were using conventional batteries, but, if I recall correctly, you have marine SLA batteries being recharged by solar power, so, in this case, leaving the GPS on would be a nit...

Tom
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 09, 2017, 02:18:34 PM
Correct on the battery.  Solar pannels have died and need replacing, so low consumption is still key.  The battery is left unattended for long periods.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 09, 2017, 02:19:50 PM
Antenna looks like it will consume 8ma;

http://php2.twinner.com.tw/files/onshine/ANT555-2006-NEW.pdf

I looked at the enable pin for the module, but this seems to only cut consumption to 400uA due to a 10k pull resistor on the board;

https://forums.adafruit.com/viewtopic.php?f=22&t=41452
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 09, 2017, 02:45:32 PM
TomS looking at your idea, soldering the Mosfet Drain to the 3.3V line should be easy.

I see two places to do this; See picture with Red arrows.

Would appreciate a hint/nudge as this is me guessing on Eagle.

Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: TomWS on May 09, 2017, 03:17:48 PM
TomS looking at your idea, soldering the Mosfet Drain to the 3.3V line should be easy.

I see two places to do this; See picture with Red arrows.

Would appreciate a hint/nudge as this is me guessing on Eagle.
LOL!  Just tie it to the 3.3V pin on the header...
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 09, 2017, 03:38:17 PM
Yes LOL I worked that out too ...

Oddness mind.

From the mosfet Drain to GRD I get 3.29v

Mosfet drain to the 3.3V pin I get only get 1.1V again.

Measuring the GPS draw is 28mA when searching for a fix.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 09, 2017, 04:00:05 PM
Going a bit potty.

Made a breadboard version to rule out the Mosfet...

And it works (red LED).... GRH.

But only if I Mosfet Drain connected to 3.3V header as you suggest Tom.  Which does have the advantage of not using another regulator!

Conclusion - the mosfet on my veraboard, or the veraboard circuit is duff.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 09, 2017, 04:05:08 PM
And this version had the battery backup powered and works like a champ - 3 secs for a warm fix.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: perky on May 11, 2017, 06:32:40 PM
Although a pin may be specified to drive 20mA,  this is to logic levels - you shouldn't generally use a pin to power anything that takes more than a few mA and also requires voltage close to Vcc, the MCU won't be able to supply it.
Mark.
Title: Re: NDP 6020P P-Channel Mosfet Oddness
Post by: gregcope on May 12, 2017, 03:05:22 AM
Thanks Perky.   Good to know.