Author Topic: Resistors for MOSFET in Weathershield  (Read 645 times)

brandock

  • Newbie
  • *
  • Posts: 12
Resistors for MOSFET in Weathershield
« on: August 01, 2018, 12:02:43 AM »
I'm interested in putting the MOSFET back on a Weathershield and I'm trying to piece together the values of the resistors to use here: VIN > R1 * R2 > A3, where * goes to the gate of the P-channel MOSFET.

Looking at this original post: https://lowpowerlab.com/2015/01/30/weathershield-is-here/

In the schematic it looks like it originally had R1=10k and R2=1.5k, but it shows 10k crossed out and replaced by 1k. Assuming VIN is at 5V, to me it looks like R1=10k would give an output of 0.652V coming out of the divider at * and going to the gate of the MOSFET gate. With R1=1k I calculate 3V going to the MOSFET gate.

Then when I look at the spec of the MOSFET, it looks like the gate-source threshold voltage is from -0.47 to -0.9 volts. So both the 10k and the 1k resistor would provide more than that difference. So, why the switch to the 1k? It seems like the 10k would provide more difference and draw less current. This is probably my lack of understanding of MOSFETs.

My questions are:
1) Why switch to 1k?
2) Why get rid of the MOSFET? Seems like a great way to save power.
3) I've been running the sketch that is setting A3 low when checking battery voltage, then sets it high again. But I have a 220ohm resistor where the MOSFET was. So I'm curious what is happening when A3 comes on and the battery readings start, and why I still seem to be getting accurate battery readings even though I'm feeding voltage from A3 into the measuring circuit, right? That is making my head hurt a bit.

Thanks anyone who can help.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6280
  • Country: us
    • LowPowerLab
Re: Resistors for MOSFET in Weathershield
« Reply #1 on: August 01, 2018, 03:36:26 PM »
Hi brandock,
What WeatherShield revision do you have?
If it's R2 then these details are no longer relevant for it.
The R2 has a permanent divider (Vcc -> 27ohm -> 1Meg + 2Meg -> GND). Turning A3 LOW/HIGH has no effect.
See schematic here: https://lowpowerlab.com/guide/weathershield/schematic-layout/

You could install a pFET in there if you really wanted to use a switched voltage divider.
To install that you will need to desolder the angled 27ohm resistor, solder a pFET in there, and add resistors that are missing for the pfet side (two 10k 0603 should do).
That will save you about 1.5uA (at 5V VIN) that drains through the permanent divider (the 2meg+1meg).
« Last Edit: August 01, 2018, 03:39:35 PM by Felix »

brandock

  • Newbie
  • *
  • Posts: 12
Re: Resistors for MOSFET in Weathershield
« Reply #2 on: August 01, 2018, 10:00:10 PM »
Thanks for responding, Felix. I do have the R2 and it does have the 27ohm resistor in place of the pFET as you said (not 220ohm as I said in my post.)

I got interested in this all when I read about the Weathershield+solar+supercapacitor project. I put one together and it works great!

Quote
You could install a pFET in there if you really wanted to use a switched voltage divider.
I really want to. Not because I desperately need to save 1.5uA, but because I desperately want to understand how this pFET switch works.

Here is what I'm stuck on right now, if you or anyone is willing to respond and help: is it possible to use the 5V supercapacitor on VIN AND use the pFET switch? Or any source over 3V3 for that matter? It looks to me like A3 would then be exposed to that VIN voltage in excess of 3V3. Not good, right?
« Last Edit: August 01, 2018, 10:03:51 PM by brandock »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6280
  • Country: us
    • LowPowerLab
Re: Resistors for MOSFET in Weathershield
« Reply #3 on: August 02, 2018, 02:37:00 PM »
The pFet is a switch, and Vgs has to be large enough (note the order, causing it to be an actual negative voltage WRT ground) in order for the switch to "open". It is a high impedance device at the gate and thus is voltage activated not current activated like a traditional PNP transistor. When the pFET switch is OFF, it acts as a very high impedance in your circuit (typically many Mega ohms), ie effectively an open circuit.

For your purposes, you will need to find a pFET with an "open" Vgs threshold that is larger than the difference from 5V (or your supercap largest expected voltage) to the 3.3V gate switching voltage (so it stay's closed when you apply the OFF voltage of 3.3V from A3). Otherwise if the OFF voltage was low enough below the Source voltage, the pFet would still be open or partially open.
In my own experiments the voltage from the solar cell through the schottky diode does not exceed 4.5V so I think any generic pFet should be OK.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6280
  • Country: us
    • LowPowerLab
Re: Resistors for MOSFET in Weathershield
« Reply #4 on: August 03, 2018, 01:38:39 PM »
Here's a little reference you might find useful:

« Last Edit: August 06, 2018, 02:17:59 PM by Felix »