P channel MOSFET to disconnect a load

I am using Adafruit’s solar battery charger and it does charge a Li-Ion battery from a solar panel as it should. It also powers an LED driver from the battery at night. The thing is that the LED driver is always powered and I want the LED to be powered only when it is dark.

From what I read so far, it seemed to me that a P channel MOSFET should serve my purpose - when the gate is high (solar panel in daylight), the P channel MOSFET disconnects the load, when the gate is low (solar panel covered/at night), it connects the load.

This is not working, see attached schematic and circuit, so what must I change and why?

Thanks in advance!

Schematic.jpg

Circuit.jpg

One simple observation is that the FET will turn partially but not fully on as the voltage from the solar panel gradually lowers and will consequently overheat.

Thanks, the MOSFET and the spares I tried did not heat up (ambient temperature is 28°C in the shade here). When I take the MOSFET and test it as shown here #132: How to test MOSFETs with a DMM - a few methods... - YouTube and elsewhere, it works fine.

Lagom:
This is not working,

  • Not working how? LED stays on? LED never turns on? PMOS burns out? What?
  • Is the battery still being charged?
  • Is the proper voltage still present on the Charger's Load/JST output?
  • What are the voltage extremes on the MOSFET Gate?

And, Paul__B is correct, there is definitely an issue with the MOSFET transistor potentially being biased into it's active region by mid-level exposure on the Solar Panel. You need something to force a rapid transition to the extreme states [i.e. some thing to make it have a "snap action" from ON to OFF to ON] -- some sort of Schmidt trigger circuit, for example, or a window comparator with a flip-flop [like used in a 555 timer -- in fact, a 556 dual timer might work as a poor man's gate driver. Just tie the Trigger and Threshold pins together on one of the timers, and via a voltage divider, connect that to the Solar Panel output [do the math to convert the 7.7V down to the 4V from the Battery Manager, and power the 556 from that 4V supply, then feed the Output of the fist timer to the second timer's Trigger and Threshold pins. Then use the output of the second timer to drive the p-ch MOSFET. BTW: the second timer acts as an inverter.

Thanks,

  1. what is not working is that the P channel MOSFET is not closing the load circuit when it is dark, when the PV solar panel voltage falls towards 0V

  2. the battery is charging in any case, in the MOSFET-less original set-up as per Adafruit and also in my MOSFET circuit as shown above

  3. in the MOSFET circuit, I measure the voltage at LOAD (6.49V) to be just a bit below the voltage the PV solar panel delivers 6.78V, just like when the load is physically removed

  4. in full sunlight, gate to source is -0.18V and when in a dark hallway gat to source is -2.4V

Before learning all about comparators, timers, etc. (I’d love to do that also) I would first like to find out how to use a P channel MOSFET as a switch to disconnect a load depending on gate voltage. Maybe the MOSFET that was recommended to me is not suitable for the voltages involved here? I also discovered the schematic attached, which looks to work really well, but that is using a transistor to drive an N channel MOSFET’s gate, and the voltages involved are all different.

dark hallway gate to source is -2.4V

Well, there you go. Look at the transfer characteristics on the datasheet and you’ll set the device is in its linear region. Poor device choice. Simplest solution would be to use a more appropriate mosfet, like the NDP6020P. There are of course dozens of other p channel devices that would work just as well.

You still need a Schmitt trigger in front of the gate to avoid the lack of a sharp/snap transition in the gate signal, two 74AHC14’s in series would do the trick. You can get single non-inverting Schmitt triggers these days but they’ll all be surface mount packages. You can still get the AHC14 in DIP.

Alright, thanks! I ordered another MOSFET and hope I get it this or next week. I looked at that IC you mentioned, looks rather daunting, with 14 contacts, and you suggest I need two of them? How would I have to wire these two in between the PV solar panel jack and the MOSFET's gate?

Meanwhile, I observed something interesting (for me as a layman anyway). Since bright afternoon sun, I left the set-up alone until returning when natural darkness had already sat in. Measuring the voltages, I can now compare these two real-day sets:

Mid afternoon (LED is off)

6.78V PV solar panel plug
6.68V PV solar panel DC jack mount
4.19V BATT
6.49V LOAD (same reading as in original Adafruit configuration with no load connected)
0.02V LED driver
0.00V LED
-0.18V Gate-Source

Very late evening (LED slowly pulses (driver has low voltage feature in firmware I cannot disable))

0.08V PV solar panel plug
0.14V PV solar panel DC jack mount
4.19V BATT (LED pulsing slowly has not yet depleted battery measurably)
4.18V LOAD
4.10V LED driver
2.41V LED (a bit under-volted, hence the pulsing by way of the driver's firmware)
-3.9V Gate-Source

So, even so the P channel MOSFET is not the right type, at least it seems to "sort of" work. In daylight, the load is disconnected. At night, the load is connected. Just not fully/properly.

Does the LED light properly with the p-MOS jumpered out [i.e. the Source-Drain path shorted to effectively remove it from the circuit?

'Cuz, based on these readings -- especially the "Load 4.18V" and the "LED Driver 4.10V" suggests the MOSFET is in Saturation, and it's the LED driver that's at fault. BUT, if those voltage readings were taken when the LED was in it's Dark phase [i.e. in the "OFF" portion of the "Slowly Pulsing" duty cycle], then little or no current is flowing through the MOSFET, so no conclusion can be made in terms of channel state. And,, if truly these measurements were made when the LED was dark, it would be of value to know what these voltages are when the LED is glowing.

Thanks, yeah, the LED and driver work S-D.

For two days/nights since the OP it went ok (in principle terms) - at around 23:00 (sun down) the LED came on and at around 04:00 (sun rises) the LED went off and during the day the battery was fully charged. What is not quite right is the following (as far as I understand):

  • Wrong type of P channel MOSFET (an NDP6020P is on its way)
  • Resistor values from 1k to 10k between G-S do not pull the MOSFET up, I might as well leave the recommended resistor out, which seems odd to me at least (shouldn't one use a pull-up resistor G-S?)

With the Nanjg AK-47 7135*3 1050mA LED driver, I get Load 4.18V and LED Driver 4.10V.

I will get a non-pulsing LED driver version and then use the NDP6020P once it arrives and then see what happens...

If you don’t mind two more questions:

  1. Why (with the existing “sort of working” P channel MOSFET) does - when the PV solar panel is suddenly illuminated - the LED go out near instantly, while - when the PV solar panel is suddenly blacked out - the LED comes on very gradually? Is this a “typical MOSFET thing”, or because the current one is the wrong kind?

  2. Why does, when I insert a 1k or 10k resistor between gate and source (pull-up resistor), the voltage not goe to full in broad daylight? I have meanwhile read that one should use a pull-up resistor between gate and source in my kind of high-side set-up. What am I not understanding there?

Much appreciated!

Lagom:
If you don't mind two more questions:

  1. Why (with the existing "sort of working" P channel MOSFET) does - when the PV solar panel is suddenly illuminated - the LED go out near instantly, while - when the PV solar panel is suddenly blacked out - the LED comes on very gradually? Is this a "typical MOSFET thing", or because the current one is the wrong kind?

  2. Why does, when I insert a 1k or 10k resistor between gate and source (pull-up resistor), the voltage not goe to full in broad daylight? I have meanwhile read that one should use a pull-up resistor between gate and source in my kind of high-side set-up. What am I not understanding there?

Sounds like we need some good photos of your set up. Something odd going on, 'cuz, based on what you've offered so far, seems like none of strangeness should be happening.

A photo is attached to the OP - please disregard the numbers in the photo, what I measured can be found in the later post P channel MOSFET to disconnect a load - #7 by Lagom - General Electronics - Arduino Forum

All right, the NDP6020P arrived.

I put that one into the circuit instead and now it works as intended. Only in late evening, the LED comes on and goes off already in the very early morning. The P-channel MOSFET does not heat up detectably at all.

I may now up the charger from 500mA to 1A charging as per Adafruit's instructions and use a 10,000mAh Li-Poly battery for full lumen output over 7 hours.