#383 Cheap and simple Solar Power for our small Projects (ESP32, ESP8266, Arduino)

Adding cheap and simple solar power to our small outdoor projects (e.g. ESP32, ESP8266, Arduino Pro Mini) removes the need to save energy or recharge batteries. Today we will enhance a simple 50 cents Li-Ion charger board to do exactly that.
I am a proud Patreon of @GreatScott!, @ElectroBOOM , @Electronoobs , @EEVblog , and others. No Docker, No Microsoft Teams, Zoom

TP4056 boards: or or
ESP32 WROOM : or or (antenna connector)
ESP32 PCB (different color) : or
Solar panel 6V :
Solar Panels 5 – 5.5V :
Voltage Regulator HT7333 :
Schottky Diodes (used 1N5819) :
FQP27P06 :
Explanation of Power Path:

The links above usually are affiliate links that support the channel (no additional cost for you).
Supporting Material and Blog Page:
My Patreon Page:
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission of your purchases to buy new stuff for the channel
My Amazon.com shop:
For Banggood
For AliExpress:
For Amazon.de:
For Amazon UK:
For ebay.com:

Please do not try to email me. This communication channel is reserved for my primary job
As an Amazon Associate, I earn from qualifying purchases


  1. Hello Andreas, I am a newbie and I learn a lot with your videos, thank you for that. I am interested in this solar power and I have already ordered the parts thanks to your list.
    I have 2 questions:
    1) what kind of capacitor farad/voltage do i need to connect to the pin board converter ?
    2) I don't see the TP4056. Do I have to order it separately ?
    Thanks again for these videos which must cost a lot of effort and energy:)

  2. Now that the cold weather is hear. What do you do about sensors outside in Cold weather? How do you protect/regulate 18650 or other batteries to keep them charging and discharging correctly?

  3. Hands off your knowledge 🙏 sir. Keep delevering , it really helps us.
    Lots of Love form "India"❤️

  4. Excellent as usual! Thank you! I tried to add the 3 components today to the 4056, yet I'm only seeing 3.5v or so on the output after the diode. I'm sure I've done something wrong. I only had a IRF9530 for the pfet on hand. Any ideas? Thank you!

  5. I am using a ESP32 & a AM2302 I want to put it outside under the deck, here in Nova Scotia it is possible to get down to -15 C. Is it safe to charge a lithium when it is that cold or should I use a 6V SLA instead? Thanks

  6. Hi! The tp4056 datasheet warns against charging with a load, because the external load confuses the cutoff voltage and the battery can become overcharged. Does the diode and mosfet setup you use solve that problem? Over voltage due to external load wasnt specifically addressed in the (amazing) video. As always, thank you!

  7. Great video. A lot of the concepts here around lipo batteries and charging were new to me so I had to go off and do a lot of research, but now I have some context I can appreciate the value you have provided

  8. So much bad information here. Have you measured peak values for current draw during TX/RX via WiFi transactions? Thats way abouve 1.66mAh, peaking even 200mAh or more

  9. I had a little problem with this:

    My Battery had about 4V.
    The Solar panel in the afternoon with nearly no sun, had a voltage under 3.6V (delivering less than 10mA).
    When ESP8266 is waking up from deep sleep with full wifi on, it sometimes got brownouts. This triggered the ESP to reboot. Sometimes it just sat there consuming constantly 30mA but did nothing. I had no idea what the problem could be. Pulled my hair out.

    Now, I added a 1000µF capacitor between the FET and my ESP. The ESP seems to run without problems, now.
    It looks like under certain circumstances, the ESP is draining much power (>100mA) while the FETs source-drain channel is not fully "open". This causes the ESP to crash.
    So adding a big cap provides the needed current when waking up from deep sleep.

    Maybe this will be helpful to someone else 🙂


  10. Hello, I have another small question : in this configuration the solar panel AND the battery cannot deliver energy for the electronic card at the same time (that is what I have observed, but tell me if I am wrong). Is there a way to have this feature ?

  11. I do keep seeing this 3.3v limit. Yet so many now have a 5 volt output, with a much input higher. I desperately want to run a SDS011 (I live in Cambodia). Will this design suit me? (sorry newb to the details)

  12. Great Video, Andreas! You inspired me to order a few TP4056 based chargers from Amazon. A quick cheat is to buy a solar powered outdoor security light for $10 on Amazon. There's plenty of room to stick a NodeMCU board into the weatherproof housing which has the solar panels, battery charger, and 18650 already installed. You can disable the PIR motion detector and LEDS, if desired. I used the ESP2866 to report to Home Assistant that the light had activated. 73s

  13. Is there any reason for not putting a booster between the panel and the TP4056, instead of or in addition to after the TP4056? i.e.: feed a constant 5V to the TP4056.

  14. Quick question: Is it necessary to remove R3 (or break the path) when adding the potentiometer? Thanks from Puerto Rico.

  15. Hello

    Andreas Spiess, First of all thank you for the video. it has identified the issue we after deep discharge of battery and start up on module. Can you please help on this issue in detail please. can you share the contact details

  16. On a TBeam v1.1 with integrated battery holder, i tought of inserting directly via USB. For this i choosed 2x5V Panels and a TP4056 charge controller. So the panels should load the already installed battery. Would be much easier than your setup in case of my TBeam board.

    Will you allow me a stupid question?
    Could I use a 5v solar panel, made to charge mobile phones, and attach them directly to usb?
    I tested with a LILYGO® TTGO LORA32 which has its own battery mount. But I don't understand why it works but it doesn't charge the battery … It only recharges with usb attached to the computer …

  18. so I have similar set up and I realised that voltage divider for ADC measuring battery voltage is another culprit: constant leak of the current through these 2 resistors. Issue is: you cannot go to high values with them because internal resistance of ESP is around 200kOhm so the resistance of the divider should be at minimum few times lower. If you make R1+R2 30kOhm then you have constant 4V/30k = 130uA lost 24/7 (irrespective if ESP is in deep sleep or not) – one can say nothing much but when we talk long lasting battery operation… 😉 Especially if this is to be without solar – only battery operated project. Yet measuring battery voltage is a must.

  19. Useful as always, dear Andreas! I have to create a system for ventilation of a greenhouse. And that will certainly help me! Thanks for your job!
    Best regards.

  20. possible to create a video how long can the solar powered last without sunlight and how fast can it charge up

  21. Thank you for this very instructive video, I am considering following it for my project.
    I have two additionnal questions :
    1. I am guessing that the determination of R3 depends on the solar panel output power : since we can rarely have 5-6 V, we prefer lowering the charge current, to have a wider use of the solar panel. Is this correct ?
    2. Is there any negative effect connecting a 5 V step-up converter before the chip ?

  22. Hi, excellent guideline… I have a 18650 2200mAh, can i use the TP4056? Should be safe to charge the battery via solar panel and provide energy to wemos mini when drains 500mAh every 10 minutes during wifi connection?

  23. Love this video series.. will build the recommendation board setup. I’m trying to find a board that uses less power with similar performance to the versalogic swordtail. 2w or less. Any recommendations

  24. Sir your channel is one of the best channels on YouTube, providing educative and valuable content, please keep up the good work, YOU ARE DOING A FAVOR TO HUMANITY.

  25. I studied this video, as well as the one you linked, and for my purpose I am not sure if this is what I want. What I need is that when dark power comes from the battery, but when daylight comes the battery is charged, but the load is removed from all power sources. What I see in the schematic you have, or the other video has, works great for any load that needs to be on continually such as a beacon, or esp32. If I have a load (say a light) that needs to go off at dawn (to allow the battery to charge up) then come back on at dusk from the battery how would I achieve that? Any idea what extra part I would need, or changing in this?

  26. I just discovered a board that allows simultaneous charging and discharging :

    "6Pcs 2A 5V Charge Discharge Integrated Module for Lithium Battery Charging Board" on eBay, but you can also find it on Amazon

    Not sure if it's like the TP4056 with the Schottky diode and P-MOSFET built in, but it looks interesting


    I have 1 question please.

    Can you review small band devices to connect batteries to which “”control by reducing power level that is sent to the device of choice ( esp32, raspberry PI4! Arduino uno v3, Arduino mega board…. Etc. I want to provide enough battery to run a very long time, but that requires reducing power before sending to device.

    Most Humble Appreciation! Your guidance is greatly appreciated!

  28. As I mentioned in previous comments, the combination of variable solar power and the typical power path circuit results in battery current flowing through the mosfet body diode under certain conditions, thus producing a 0.7V drop. I've posted my work on this to a Github repo:


    Included is a new design I've tested which features an opamp driving the mosfet gate. The opamp inputs are the drain and the source of the mosfet, so anytime the output voltage is lower than the battery voltage, the mosfet turns on. The result is that the output voltage is never lower than the battery voltage, and nothing flows through the body diode. Seems to work well, and doesn't oscillate. The opamp draws 1uA, and can mount on the TO-220 mosfet body and connects to its pins plus one ground line. Also, no need to change the programming resistor, so no pot! I hope this will be useful. Thanks very much for this idea, Andreas. Have a wonderful summer break.

  29. Hello, tell me if i'm wrong but the problem is that no panel voltage measurement is taken and operation is only based on the threshold voltage Vgs of a MOSFET, which voltage varies greatly as a function of the drain current. It is even a safe bet that depending on the copy of MOSFET used this voltage also varies. The second problem is that if the panel voltage is low, the current it will be able to deliver will also be low, unless you oversize it very widely. If the available current is low, while the ESP8266 is consuming current, the panel voltage will drop sharply, and the MOSFET will shut off, and the battery will take over. Then, if the panel voltage is insufficient for the TP4056, the charging current will be zero, so the voltage will go to its initial value and the MOSFET will switch again, and so on.

  30. Will it be efficient to use a buck converter instead of an LDO, so that the device can work even if the battery goes less than 3.3v?
    How about using 18650 batteries or 16430 batteries?

Leave a comment

Your email address will not be published.