View All Posts
read
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi

Discover an e-paper weather display experiment that uses solar energy and storage to achieve low-power functionality in the Scottish winter sun. The innovative project utilizes the ESP32's deep sleep mode and e-paper display to create an energy-efficient weather display device.

Related Content
Transcript

[0:00] Can we scavenge enough power from the Scottish winter sun to run our low power electronics forever?
[0:06] A few videos back I tried to get my Christmas lights to work off solar power, but the results
[0:10] were not impressive.
[0:11] But I haven’t given up, I’m determined to make solar power work.
[0:16] The problem is, the sun is weak and the days are very short.
[0:20] Even on a bright day, with the small solar panels that I am using, we rarely generate
[0:24] enough voltage to charge a lithium cell.
[0:26] However, even when there is very little light, we do still get some power from the panels.
[0:32] What if we could harvest all that wasted power and store it in the battery?
[0:36] We might be able to keep a low power electronic device running indefinitely.
[0:41] It’s alive, it’s alive, it’s alive!
[0:46] I made this really nice e-paper weather display a while back.
[0:49] It’s super energy efficient.
[0:51] It uses the ESP32’s deep sleep mode to great effect.
[0:55] It only wakes up every 30 minutes to fetch a new forecast and update the display.
[1:00] And as soon as it’s done, it goes back into deep sleep.
[1:03] Now an ESP32 in deep sleep mode can use as little as 10 microamps.
[1:08] That’s pretty amazing.
[1:09] The e-paper display is also fantastic.
[1:12] Once you’ve displayed the image, you can turn it off and the image persists.
[1:16] It uses no power at all.
[1:19] With my current 10,000mAh battery, my weather display lasts for 2-3 months before it needs
[1:24] to be recharged.
[1:26] So I’ve slightly modified the code for the e-paper display so it measures the battery
[1:31] voltage and sends it to a server.
[1:33] We should get a reading of the battery level every 30 minutes.
[1:37] I’ve left this running for just under a fortnight.
[1:39] The results are quite noisy, but we can see a trend of the battery slowly draining over
[1:44] time.
[1:45] Now it does drain very slowly, so this feels like a great system to experiment with a bit
[1:50] of energy harvesting.
[1:52] Can’t we scavenge enough power from the solar cell to keep its battery topped up?
[1:56] I’ve found two potential boards on Aliexpress that seem to be perfect for the job.
[2:00] We’ve got the BQ25504 and the BQ25570.
[2:07] Both these devices operate in a very similar way.
[2:10] The main difference being the BQ25570 includes a buck-regulated output that can be used to
[2:15] power a load.
[2:17] When the device first starts up, it needs around 600mV on the input, and it uses this
[2:22] to charge up the capacitor on the V-store to 1.8V.
[2:26] Once it reaches this value, it can extract power from the input voltages down to as low
[2:30] as 130mV, and it can boost this up to charge the battery, not bad at all.
[2:37] The BQ25504 board is the simplest, so we’ll look at that first.
[2:42] I’ve wired up one of my solar panels to the input, and if we measure the voltage on the
[2:46] V-store output, we can see that it’s charging up.
[2:49] Our input from the solar cell is only around 300mV, but we’re able to charge up the V-store
[2:54] to a much higher voltage.
[2:56] The voltage on the solar cell is quite low because it’s under-load.
[2:59] If we measure the open circuit voltage, it’s much higher.
[3:03] Eventually our V-store voltage reaches 3.172V, and that same value is available on the V-bat
[3:10] output.
[3:11] We would normally use this to charge our battery.
[3:13] Unfortunately, it’s a bit too low for the lithium cell that I want to use.
[3:17] We’d need something closer to 4.2V.
[3:20] The AliExpress listing provides a schematic for the board, so we don’t need to do too
[3:24] much reverse engineering.
[3:26] I’ve transferred the values from their low resolution image onto the nice clean schematic
[3:31] from the datasheet.
[3:32] We’re interested in the value of the V-bat OV pin.
[3:36] This sets the maximum value for the battery and storage before charging cuts off.
[3:41] The equation to calculate this is here.
[3:44] On the board, we have an ROV2 of 3.6M, and an ROV1 of 5.9M.
[3:52] The V-bias for the BQ2504 is typically 1.25V.
[3:58] Plugging these values into the equation, we get 3.02V, close enough to our measured value
[4:04] given the various tolerances involved.
[4:07] Now we could change one of the resistors to a 3M resistor.
[4:11] That would give us a V-bat OV of 4.125V, which is pretty close to the ideal 4.2V that we’d
[4:18] want.
[4:19] But I don’t really fancy changing these tiny resistors unless I really have to.
[4:22] Let’s see if the BQ250 board is more suited to our needs.
[4:28] I spent a bit of time reverse engineering the board and created this nice schematic.
[4:33] It did take me quite a while.
[4:35] Of course, as soon as I’d finished my reverse engineering, I found a website where someone
[4:39] had already done it.
[4:40] It’s full of really interesting information and goes into detail on how the IC works.
[4:46] Using the equations from the datasheet and the resistor values we’ve reverse engineered,
[4:50] we can see that charging will cut off at 4.07V and the battery OK signal would turn off if
[4:56] the battery voltage is less than 2.8V.
[4:59] Our board should be good for charging lithium cells, especially as my cell has protection
[5:03] built into it.
[5:05] The BQ25570 provides a buck-regulated output that you can run your load from.
[5:11] With the resistors on the board I have, this will output just over 2.5V.
[5:16] It’s pretty nice, as you can use the output of the battery OK signal to enable and disable
[5:20] the buck regulator.
[5:22] If the battery is too low, then the output will turn off.
[5:26] Now you may be thinking that 2.5V would be way too low to run in the USB 32.
[5:31] Isn’t it a 3.3V device?
[5:34] Well actually, the USB 32 can run on anything from 2.2V up to 3.6V.
[5:40] I’ve got one of my USB 32 dev boards connected up to the buck output, running the basic blink
[5:44] sketch and it works quite happily.
[5:47] Now unfortunately, the output of the buck regulator is limited to a maximum of 100mA.
[5:53] That’s fine when the USB 32 isn’t doing very much, but as soon as you want to use
[5:57] Wi-Fi or Bluetooth, the current requirement shoots up.
[6:01] To see just how much the weather display needs when it’s updating, I’ve placed a shunt
[6:05] resistor in line with the power from the USB supply.
[6:09] I’ve put 3 5.6 ohm resistors in parallel, which gives us around 1.9 ohms.
[6:14] We can measure the voltage across this using my oscilloscope and work out how much current
[6:19] is flowing.
[6:20] I’ve captured a few screenshots from the print screen functionality of the scope.
[6:24] We can see that we’re typically only measuring around 100mV, which is equivalent to about
[6:29] 50mA, well within the 100mA maximum.
[6:33] But we have spikes of up to 600-800mV, which is around 300-400mA.
[6:40] So that won’t work at all.
[6:41] Now we could try adding a large value low ESR capacitor to the supply to handle these
[6:46] current spikes, but it may not give us a very stable system.
[6:50] Fortunately we don’t need to use the output from the buck regulator, and if we don’t
[6:55] enable it, it won’t use any power.
[6:57] We can just connect our load directly to the battery, and this will easily be able to
[7:02] power the ESP32 with the current that it needs.
[7:05] So the BQ25570 board is perfect for our needs, no hacking around with the resistors required
[7:11] at all.
[7:12] I’ve wired it all up to the e-paper display and put it back into its usual place.
[7:17] It’s not very pretty, but we’ll build a nice box for it if it actually works.
[7:21] I’ve left it running for a week or so, and we’ve got some interesting results.
[7:25] Just before I show you, it’s time to talk about PCBWay.
[7:29] I know you’re probably sick of me telling you about them, but they are really good,
[7:33] and they’ve supplied me with a lot of great PCBs over the last few years.
[7:36] Click on the link in the description to see what they offer.
[7:39] So drumroll please, the results are in.
[7:46] Our battery is still going down, but it is getting charged up during the day.
[7:51] You can see the days when we had a nice bright sunny day, and the days when it was grey and
[7:55] miserable.
[7:56] But, during the night, our battery is going down, and unfortunately, we’re not able to
[8:01] get enough charge during the day to make up for it.
[8:04] However, if we do compare the slopes of the trend lines before and after adding the energy
[8:08] harvesting, things are slightly more promising.
[8:11] We can see that we’ve definitely had a big impact on the battery drain.
[8:15] We might be able to get the battery to last 1.5 to 2 times the length of time it does
[8:19] currently.
[8:20] This may be enough to get us through the long winter months when the days are short, into
[8:25] summer when the days are really long, and that may be enough to charge the battery back
[8:29] up for the overnight drain.
[8:31] It may even be enough to charge the battery back up so it lasts through the next winter
[8:35] back into the following summer.
[8:37] Now, there is a question that I’m sure a few of you are asking.
[8:41] Why are we updating the weather display at night time when everyone is asleep?
[8:45] If we put the weather display into deep sleep overnight, we may be able to keep the battery
[8:49] topped up during the day, even in winter.
[8:52] I’ve modified the code slightly so that if the time is after 11pm, we deep sleep for
[8:57] 6 hours.
[8:58] This should save a lot of battery power, but we’ll need to leave it for a while to see
[9:03] what happens.
[9:04] Fortunately, I’m off on holiday for a few weeks, so fingers crossed that everything
[9:07] keeps working while I’m away.
[9:09] On that note of everything working, I thought it would be worth actually checking it is
[9:14] working before I head off.
[9:16] So I’ve measured the battery voltage and I’m going to leave it on the windowsill to
[9:19] see if we do get some charge.
[9:21] The day did not start off looking good.
[9:23] Where the hell is the sun?
[9:25] But later on, things cleared up.
[9:27] We have some sunshine.
[9:29] Look at my little gadget go crazy.
[9:35] After a few hours of reasonable weather, we’ve managed to charge the battery up from 3.85
[9:40] volts to 3.88 volts.
[9:42] That may not seem much, but if we map it onto the charge curve of a lithium cell, it’s
[9:47] about 4-5%.
[9:49] What about the deep sleep current of the e-paper display?
[9:52] Is it really low power?
[9:54] I can monitor the current draw as the weather is refreshed.
[9:57] We get a similar chart to what we saw in the oscilloscope, but once the e-paper is in deep
[10:01] sleep mode, we can’t measure anything, it’s too low.
[10:04] So what I’ve done is put a 1K shunt resistor in series with the power supply.
[10:09] While the display is refreshing, I’m short circuiting this resistor with a jumper wire.
[10:13] Once we’ve gone into deep sleep, we can remove the jumper wire and measure the voltage drop.
[10:18] We get 167 millivolts, which is equivalent to 167 microamps.
[10:23] It’s not the 10-20 microamps that we could get from a tiny pico board, but it’s pretty
[10:27] low.
[10:28] Well, I’ve been away for a few weeks and we’ve got some results.
[10:31] The weather in Edinburgh while I’ve been away has been pretty atrocious, but we have
[10:35] managed to get some sunny days and the days are starting to get longer.
[10:39] Our battery is still going down, but with the changes to our code, we’re now only losing
[10:43] about 0.9% per day.
[10:46] On the sunny days, we do actually seem to be getting some charge into the battery.
[10:49] I’m going to monitor the situation over the next few months, but for now, I’m going to
[10:54] call this a success.
[10:55] We can salvage power and I think our weather display may run indefinitely from now on.
[11:01] What I need now is a new box for it.


HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening

> Image

atomic14

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...

View All Posts