A while back, I tried to power my Christmas lights using solar power, but it didn’t work out as planned - there simply wasn’t enough daylight (and more importantly sunlight) to charge up the battery.
Undeterred, I decided to see if I could power my low-energy ePaper weather display using the not-so-strong Scottish winter sun. The weather display is super energy-efficient, thanks to the ESP32’s deep sleep mode. With a 1000mAh battery, it can last up to 2-3 months without recharging. My goal? Extend that battery life even more with some solar power - maybe even keep it running indefinitely…
If you prefer to watch a video, you can do so here.
The Challenge
The biggest issue with solar power up here in Scotland is the short days and weak sun. When I was playing with solar power before it was very rare to get more than the 4 volts that the TP4056 charging board needs to run. And to actually fully charge a lithium cell, we would need more than 4.2 volts.
Available Power
However, the ePaper weather display is amazingly power efficient. It spends almost all its time in deep sleep and the realy nice thing about ePaper displays is that they use zero power once the display has been set up. I measured the current draw of the weather display when it was in deep sleep and it was only 167uA. In theory the ESP32 can go down to 10uA so potentially there’s room for improvement here.
Power Usage
To get an idea of what I was dealing with I updated the code for the weather display so that it would send up the current battery level every time it woke up. This produced this slightly noisy graph. Looking at the slope the battery drains by about 2.2% every day.
Battery Drain
Playing with BQ25504 and BQ25570 Boards
To get the most from the solar cell, I decided to try a bit of energy scavenging. I tested two energy-harvesting boards from AliExpress, the BQ25504 and BQ25570, to see if they could help keep my battery happy.
BQ25504 and BQ25570
Initially I wanted to use the BQ25504 as it’s a bit simpler than the BQ25570 which includes a buck regulated output for powering the load. My initial experiments were pretty promising, even with the solar panel outputting quite a low voltage the board was able to charge up the built in capacitor to a much higher voltage. Unfortunately, it maxed out at 3.172 volts which is not enough to charge a lithium cell.
The maximum voltage is controlled by a couple of resistors on the board.
BQ25504 Schematic
And can be worked out using the formula:
Where VBIAS is typically 1.25 volts.
I could have changed the resistors on the board to get the correct output voltage - but honestly, life is a bit too short to be messing around with these tiny components.
BQ25504 Resistors
After looking at the BQ25570 board I found that it was already set up with the right voltage levels.
BQ@5570 Schematic
The BQ25570 board is a bit more complicated than the BQ25504, it includes a buck regulator that can be used to power the load - it’s quite nice as you can use the output of the VBAT_OK pin to enable and disable the buck regulator - so it will switch off the load if the battery voltage is too low. The buck regulator on my board was setup to output 2.5 volts. Initialy you might things this is too low to power an ESP32 which is typically run from 3.3 volts. But an ESP32 will actually run on anything between 2.3 and 3.6 volts.
Here’s my ESP32 dev board running the blink sketch off the buck regulator. It’s completely happy.
Blink Sketch
However, the buck regulator is limited to a maximum of 100mA. This is fine, unless you want to run WiFi, which is pretty important if you want to get a weather forecast. I checked how much current the ESP32 was drawing when it was refreshing the weather display and it has current spikes of 400-600mA.
Current Spikes
Fortunately, we can just ignore the buck regulator and directly connect the weather display to the battery without any issues.
To check that the BQ25570 does actually work, I measured the battery level and left it on the window sill for a few hours. We actually got a small amount of sunshine and managed to charge the battery from 3.85 volts to 3.88 volts - now that doesn’t sound like very much, but if you map it onto a lithium cell discharge curve, it’s actually around 4-5% of the battery capacity (this has to be taken with a bit of salt as the battery discharge curve is very approximate).
Battery Charging
Initial Results
I left this running for a week or so in the usual position for the weather display and got some pretty interesting results. I was initially pretty dissapointed, the battery was still draining over time. But, the drain was now only 1.4% per day. So despite the graph looking pretty bad - we did actually make some progress. The slope is now 1.4% per day, which is a lot better than the 2.2% per day we were seeing before.
Battery Drain With Energy Scavenging
Making an obvious change
One smart idea to save battery life would be to let the weather display take a long nap overnight when everyone’s snoozing. I tweaked the code to make it deep sleep for 6 hours after 11pm and left the experiment running for a few weeks while I was away on holiday. The results are more promising. We still see the battery draining, but it’s now only 0.9% per day.
Battery Drain With Overnight Sleep
The Verdict
With this new code in place, I think that the battery could last through the winter months through to spring when the days start to get much longer. And I think during the summer months, the battery could get recharged up to 100%. I believe my weather display might just keep running forever and never need charging again.
Results
The only issue now is that I need a new box to put it in - it’s a bit of a mess right now…
A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff.
Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...