Powering ESP32 with solar + LiFePO4

I am currently searching for the best way to power an ESP32 board with a solar cell and a LiFePO4 battery. Ideally the solution should work under low light (indoor) conditions, but that is not a must have.

LiFePO4s have several advantages compared to Li-Ions / Li-Pos. But there seem to be only very few solutions that interface them to ESP32 boards while also supporting small solar panels as their main power supply.

If I understand it correctly, the main differences to a LiPo+Solar optimized charger would be:

  1. The charger IC must target a charging voltage of 3.65 V instead of 4.2 V.

  2. The LiFePO4 battery could drive the ESP32 directly, without any intermediate power regulator. (I am actually not sure about this. I know it is possible, but it would lack any deep discharge protection, and it might also impede the charge-end detection of the charger IC.)

If any of you has any experience with ESP32 + LiFePO4 + Solar, I would be very happy to get your advice. Thanks!

Update:
I am aware of the videos of Andreas Spiess. They are nearly 3 years old and don’t answer my questions. I am looking for a good solution to do it all: Charging LiFePO4 with full battery protection, and solar cell interfacing, if possible with MPPT tracking. I actually do not mind, whether this comes as a separate module that can supply an ESP32 or integrated into an ESP32 board. I am definitely NOT looking for solutions without any overvoltage or deep discharge protection that will kill the battery sooner or later.

Whatever esp32 board is ok. Just power it from 3.3V pin.
You can keep it connected while charging at 3.65V, but make sure you don’t go over that

Thanks for your feedback, @Karosm, but I think you might be wrong with that.
As I already wrote in 2. a direct connection between ESP and LiFePO4 will lack any deep discharge protection of the battery and it will also cripple the ability of the charger logic to detect the end-of-charge situation (which is why power path was invented for Li-Ion battery chargers).

Ignoring these two details will kill the LiFePO4 battery over time. These details have historically also been ignored for Li-Ion batteries by many amateurs, which more than once led to burned down houses. It is actually a big advantage of LiFePO4s that they do not impose that risk.

That’s not Esp32 related at all.
You need charge controller and undervoltage protection circuit for your battery. Not just that, they have to be good match with your solar panel current and voltage, otherwise you get little out of your panel.
You wrote “low light conditions”. What does it mean in practice?

Andreas Spiess has some good videos on lifepo4, solar and battery powered esp32’s.

I would search his channel and watch a few if you haven’t already.

This is what I went with for a solar battery project.

1 Like

Thanks for your feedback, @Mahko_Mahko,
yes, I know the videos of Andreas Spiess. They are both nearly 3 years old.
The second one is about Li-Ion only. So is your link to ESPlanty.
Li-Ion is well understood and solutions are abundant.

But I am asking specifically about LiFePO4.
Your first video is closer to this topic. And Andreas mentions the TP5000 charger IC which is capable of charging LiFePO4. But he does not mention solar powering. The TP5000 doen’t seem capable of doing that. I am looking for a good solution to do it all: LiFePO4 with full battery protection, and solar cell interfacing, if possible with MPPT tracking.

I have updated my OP to hopefully make my request a bit clearer to understand.

Ok, there seems to be a solution based on CN3801 that has it all:

It has several interesting features like MPPT and even battery heating for cold outdoor situations.
A power path logic is not mentioned in the description, but a quick glance at the circuit diagram gives the impression that this is implemented too. I still have to double check that.

Ok, I wasn’t sure how fixed you were on a LiFePO4 solution.

I’m curious what is the main attraction(s) for LiFePO4 for you?

I was contemplating trying to hack some solar garden lights for a bit but didn’t progress it.

My main reason is definitely security and avoiding fire hazards.

2 Likes

That looks like the ideal solution.
Sadly out of stock.and it doesn`t seem like he is providing the gerber files

With the CN3801 now discovered, a Google search for “CN3801 ESP32” gives more options.

There are no Ali Express PCBs yet, but there is at least one other solution that is actually based on the LiFePO4wered/Solar1 mentioned above. Its features are reduced to the essential ones, like over charge and deep discharge protection, and MPPT. KiCAD and Gerber are available. But no circuit diagram to do a quick check, so I will try to open it in KiCAD when I’m at home.

And here is another one on PCBway that can be ordered directly. Circuit diagram is available but hard to read. Also contains the basic features and a power path but NO power path. Attention: Attaching a load without a power path may cripple the overvoltage protection of the charger IC and may kill the battery! The PCB also has a 5V step-up converter which I try to avoid for my projects, but it can be switched off with a slide switch:

Update:
Just discovered the same PCB again at OSHWlab, but with a readable circuit diagram. I also updated my description above now that I could better read the diagram. I do NOT recommend this solution because of the missing power path.

Sadly, that chip was available already 7 years ago when I was looking for MPPT for lifepo4, but couldn’t find modules.

Wow! That really is a long time and it completely destroys any hope that cheap charger components for LiFePO4 could become available any time soon.

I just found that Patrick Van Oosterwijck (the creator of the LiFePO4wered/Solar1 that I have linked above) is working on a new project, called LiFePO4wered/Solar4. It is completely based on a low-cost microcontroller instead of a dedicated charger chip. But it is still in its early stages and Patrick did not post any updates for nearly a year now. :frowning_face:

Here are his first posting on LiFePO4wered/Solar4…
https://silicognition.com/Electronics/PuyaCharge/
…and his currently last posting on that project:
https://silicognition.com/Electronics/PuyaCharge/lifepo4wered-solar4-prototype-first-charge/

let’s hope not. Things are moving slowly. Even lifepo4 cells have been available for decades, but hobbyists are still pulling their hair out of the head trying to power their 3v3 MCUs and sensors with lipo batteries and buck/boost converters or linear voltage regulators ending up consuming often more for voltage conversion than the actual draw of that device.

Cheapest solar solution I found available is separate 1s lifepo4 BMS module and adjustable MPPT charger module, around $5 in AE. But it’s not for tiny 5V panels.

Could you share some links for these modules?

https://it.aliexpress.com/item/1005005996657046.html?spm=a2g0o.detail.pcDetailTopMoreOtherSeller.2.12c7OZuOOZuOYT&gps-id=pcDetailTopMoreOtherSeller&scm=1007.40050.354490.0&scm_id=1007.40050.354490.0&scm-url=1007.40050.354490.0&pvid=3bdee182-3797-4508-987e-4bc5b877fdbb&_t=gps-id:pcDetailTopMoreOtherSeller,scm-url:1007.40050.354490.0,pvid:3bdee182-3797-4508-987e-4bc5b877fdbb,tpp_buckets:668%232846%238107%231934&pdp_npi=4%40dis!EUR!2.27!2.23!!!2.38!2.34!%402103892f17199367295205886ec0de!12000035229759985!rec!IT!103797544!&utparam-url=scene%3ApcDetailTopMoreOtherSeller|query_from%3A

https://it.aliexpress.com/item/1005006005030172.html?spm=a2g0o.productlist.main.5.60811ShC1ShCcL&algo_pvid=4f65a678-966d-41fd-8322-8f246e714647&algo_exp_id=4f65a678-966d-41fd-8322-8f246e714647-2&pdp_npi=4%40dis!EUR!3.95!1.18!!!30.26!9.08!%402103890117199195781814958ea082!12000035337992448!sea!IT!103797544!&curPageLogUid=8k9aEtmmvQ7a&utparam-url=scene%3Asearch|query_from%3A

1 Like

too bad none of these block charging on low temps

Did you land somewhere with this yet @Jpsy ?

TBH I landed in frustration land and put my project on ice. But I am still open for any good news and suggestions.

1 Like

There’s probably thousands of varieties available all over the internet so, it seems odd it became an insurmountable task to find a little solar panel and charge controller.

Whats even more perplexing is why so many people stress out over how to build battery powered devices and find a good sleep/wake balance only to end up with a device that is unavailable/unusable more than it is awake and usable plus, its severely limited by the available watts/day and your signing up for battery monitoring/maintenance for the life of the project and all those limitations and negative attributes are somehow better than buying some 1/2" pvc conduit and running some new power that has 0 limitations, 0 maintenance, and 100% reliability… I dont get it. Standing in line for 6 hours at the license branch sounds like it would be more fun than doing that.