Solar charging ESP-Now BATMAN prototype 5

 After generating some good data on power use of the ESP8285, I've finally got around to sticking an ESP32S2 into the same board using a hand-soldered adaptor based around a programming board. The board has LEDs on but I can probably account for this extra load. Mostly I want to know a rough equivalent power usage.

With a little tweaking of the code it runs fine, so I'll conduct a charge test over 24 hours and see what the graphs look like. If it's promising I may be migrating the project to an ESP32S2 because of the extra pin count and resources. Squeezing an SD card slot in along with the connections to the charge controller uses almost every usable pin the ESP8285 has.

Also, while I don't want to include a USB FTDI chip on the board, a spot for an OTG USB connector is another matter as by itself it uses no power. It would allow my board to also run CircuitPython, which is quite popular and were I to stick some on Tindie broaden interest I think. It's also a nice 'desk charging connector' and the 5V could go straight to the charge controller. The added component count would only be the socket itself and a resistor I think.


In winter, this is what you resort to.

I've been doing more work with the MCP73871 charge controller today, initially playing with my bench PSU and taking readings from the INA219s I've built into the board to simulate varying amounts of available supply from solar panels.

This didn't quite work as VPCC reduces the load on the supply but as the voltage from my bench PSU isn't actually sagging it keeps reducing the current until it hits zero because the voltage never recovers.

With very little daylight on an overcast winter day I resorted to an old school halogen spotlight playing directly on some solar panels to test how it really behaves.

Starting out with a fixed resistor network for VPCC I could see that it was doing some form of load regulation but not what difference it makes as it varies, so this got changed for an old guitar potentiometer I had kicking around.

It's very tricky to set by tweaking the pot. As you change the VPCC threshold for the voltage from the panel it does change the load on the cell slightly but beyond a very narrow range, it stops charging.

Grabbing the data once a second I put this into a spreadsheet and did a scatter of the power provided vs the voltage from the panels, which is moderated by the VPCC threshold.


I'm no scientist but this seems to make it reasonably clear the best power was extracted from the panels when at about 4.5-4.7v under load. This is completely at odds with my initial thinking to set the VPCC threshold at or slightly under the nominal voltage of the panels I'm using, which is 5.5v.

Below about 4.4v we start running into the problem of there being not enough headroom above the battery voltage to allow for charging and it stops dead. More headroom could be had from a higher voltage panel, but then you start approaching the 7v limit on supply for the MCP73871, the highest I'd like to go is 6v.

I also visualised how the power is used over a day of real usage. Even when there is not enough sun to power the board, the panels support the battery, reducing the amount of power taken from it. This is exactly the behaviour I wanted from the charge controller. Anything 'negative' is where panels are powering the ESP8285 and charging the battery. Which now I look at it, feels pretty good for a winter day. The big spikes are when the sun came out briefly and made for a bright afternoon. It's the great stretch of darkness in the evening that really sucks the life out of the battery.



The main outcome of all of this testing is it's shown me that VPCC has little beneficial effect with the panels I have and had I set it by instinct it would have severely compromised charging. Bypassing VPCC and allowing the MCP73871 to draw as much power as it wants lands them in the 4.5-4.7v range which is where they appear to be most efficient anyway.

The other outcome is I have ordered some larger (165x165) 6v panels as all this was making me come around to the idea I just need larger ones. This may help offset things further so the dark evening doesn't leave such a charge deficit overall.

Interestingly during this testing when charging from USB I'm seeing one bit of behaviour that doesn't match the data sheet.

In the datasheet it says..

The MCP73871 device USB-Port current regulation set input (PROG2) is a digital input selection. A logic Low selects a one unit load input current from the USB port (100 mA) while a logic high selects a five unit load input current from the USB port (500 mA).

In practice with PROG2 high I see it max out at 400mA. No matter, I won't often see this as an issue with the little solar panels I expect to use in normal conditions.

Solar charging ESP-Now BATMAN prototype 4

After the last test run, I decided I wanted to investigate the supply load tracking feature of the MCP73871 charge controller to see if it improves charging. With a small solar cell in winter, it will be very easy for the charging circuit load to drag down the voltage from the cell such that it ceases to be of use.

In order to see how well this works you also really need a good measure of the voltage and current at both the battery and the charging input. Which means adding the INA219 modules back again after I took them out.

Having considered reworking the previous board it's just too untidy and with the SD card reader attached the ESP8285 doesn't have enough pins to go around. Using socketed modules allowed me to just make a new carrier board and swap them over. I also made a big effort at tidier wiring, the last one was offensive.

The supply load tracking feature on the MCP73871 is called Voltage Proportional Charge Control (VPCC) and reduces load to the supply if the voltage drops below a threshold. VPCC needs a simple voltage divider that provides 1.23v (or more) at a pin while the supply is OK. If this voltage drops, it reduces current draw to bring it back up. On the new board I've fitted a small socket header so I can fit different values to the voltage divider.

We're also getting to the time of year where it might go below freezing and the thermal protection circuit needs testing. So I've added another header for the thermistor network, temporarily bypassed with a resistor while I fiddle with the VPCC in isolation. I'm going to move my test location to near an indoor window where there's more sun for more of the day and hang the solar cell out of the window. Once I've investigated the practical worth of VPCC I'll add the thermistor network and do some tests with heating and cooling it.