I have a 6 V solar panel and a bunch of TP4056 modules with the battery protection circuits lying around and I thought I'd use them to make a solar powered BLE circuit with the nRF52840 dongle for some future projects as also have a couple of those lying around.

The project was inspired by a solar charging circuit from one of Andreas Speiss's videos (https://www.youtube.com/watch?v=37kGva3NW8w) where he added a "power path" so that the load (in my case the nRF52840) runs directly on solar when there is sunlight instead of discharging the battery. However, I don't quite understand how the circuit works and I was hoping that someone here could provide an explanation.

Andreass Speis TP4056 Circuit

If I have understood correctly P-channel MOSFET will only conduct when the voltage difference between the gate and the source is negative. So when there is full sun the solar panel will output 6 V and the source voltage will then be 6 V minus the drop across the Schottky diode. Vgate - Vsource will be positive and the P-channel FET will act as an open circuit.

However, I don't understand how the circuit works when there is no sun, i.e. Vgate = 0 V. Won't the source voltage also be 0 in that case, i.e. Vgate - Vsource = 0 V and still act as an open circuit? The source voltage would have to be 2 V in order to reach the gate threshold voltage. Will Vsource be the same as the battery voltage? If yes, can someone explain why? I am probably missing something fundamental here so please bear with me.

There is also a second issue that I would like to get some advice on. The nRF52840 has an internal regulator that has a minimum input voltage of 2.5 V and max 5.5 V. Now the 6 V solar panel will actually output ~6.25-6.3 V in full sun (based on measurements) so I was wondering what the best way to limit the voltage to max 5.5 V, while still being able to power the nRF52840 with solar down to 2.5 V.

I came a cross this What is the best way to limit voltage of a solar panel? question, which initially suggests using a shunt voltage clamp. Going through the comments it would seem that a LDO wont have to dissipate as much energy as the shunt voltage clamp. So do you think its better to go with a LDO with a minimum input voltage of 2.5 V, max 6.5 V and a 5 V output voltage e.g. the MAX8867 (https://eu.mouser.com/datasheet/2/256/MAX8868-1389206.pdf)

I made a quick schematic in Kicad, but the circuit/component to limit the voltage to 5.5 V or below is missing as you can see.

Solar Powered BLE

  • \$\begingroup\$ Have you considered a different regulator which can accept your full input voltage as-is? \$\endgroup\$
    – winny
    Jun 17, 2021 at 22:11
  • \$\begingroup\$ @winny: Do you mean choosing another LDO than the MAX8867 or the regulator on the nRF52840 side? If its the latter, then that's not possible as the regulator is inside nRF52840 chip, its not a component on the dongle PCB. \$\endgroup\$ Jun 18, 2021 at 6:41
  • \$\begingroup\$ Your goal is to charge your li-ion cell from your 6 Vpeak solar cell, yes? \$\endgroup\$
    – winny
    Jun 18, 2021 at 8:48
  • \$\begingroup\$ Yes, charge the li-ion battery and at the same time powering the nRF52840 with the solar panel when sun is available. \$\endgroup\$ Jun 18, 2021 at 11:14
  • \$\begingroup\$ Crude but working would be to just put a few diodes in series to limit the max voltage to what you can tolerate but a better solution is to get a regulator which can accept the full input voltage and a separate one (if needed) from your battery to you nRF52840. Wait, scratch that. I was under impression that the TP4056 was the limiting factor but you have 8 V as max input. Why not just run your nRF52840 straight off the battery and let the TP4056 do its job? \$\endgroup\$
    – winny
    Jun 18, 2021 at 11:16

1 Answer 1


When there is no sun the gate of the FET will be at zero volts allowing power from the battery to drive the load. When there is sun the gate will be at the same voltage as the source disabling the battery connection, the diode will provide the power to the load.

The source will initially be at the battery voltage minus the voltage drop across the body-diode (~0.7V) so it will be ~3-4V depending upon the state of charge of the battery. With the gate biased like this the FET will be conducting and bring the source and load voltage to within a few millivolts of the battery voltage and supply the load from the battery.

A relatively high value resistor across the solar panel may be necessary to ensure the gate is at zero volts with no sun and get clean switching.

All discrete MOSFETs have an internal diode between drain and source because of the way they are constructed you must not forget about it when analyzing circuits using MOSFETs. Also, MOSFETs will conduct in the reverse direction with the drain positive relative to the source (in the case of P-channel devices) although the voltage will never get more than a volt or so even at high currents due to the body-diode. The gate still needs to be negative to the source for conduction to occur even if the drain is positive.

These characteristics are often exploited in battery switching and circuits such as this.

  • \$\begingroup\$ Thanks for the explanation Kevin. Regarding the resistor across the solar panel terminals, did you have any ball park numbers for the resistor value, are you thinking something in the 1Mohm range? \$\endgroup\$ Jun 18, 2021 at 8:34
  • \$\begingroup\$ @Norwegian_Spock - the resistor needs to be low enough to ensure that the gate voltage gets close to ground when there is no sun even though there might be some leakage from the diode and the TP4056, but high enough so it doesn't waste a significant amount of power. I would think something around 10kOhm. The exact value won't be critical. \$\endgroup\$ Jun 18, 2021 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.