Insolation is a big word meaning how much sunshine is there? That’s an interesting bit of information when one is trying to keep batteries charged with solar panels. It’s just a cross check to see if the charge amperage is consistent with the amount of sunshine each day.
The project consists of a photo cell and an Arduino-emulation device called a ESP32. The hardware looks like this. Very minimalist. The breadboard is just to hold the ESP32 in place. A USB cable brings in 5 volt power. The round disc is the photocell.
The ESP32 connects to the Internet over wifi and uploads data every 10 seconds using the protocol MQTT, “the standard for IoT messaging” . Data consist of the resistance of the photo cell. A server processes the data and provides a web page GUI. The server is called a broker and in this case the broker is provided free for personal use by Adafruit. The ESP32 is also a product of Adafruit. The ESP32 cost $20 at Microcenter.
Below is a screenshot of the GUI page, putting it all together.
Ideas for the next version: Mount the ESP32 inside a solar powered yard light and eliminate the USB cable. Disconnect the light and power the ESP32 instead.
For a closer look the link is here:
This solar powered led yard light was chosen at random and it was chosen for it’s reasonable price. When it arrived it looked like this:
Opening it up revealed a pleasant surprise which had not been mentioned in the sales description. It has an actual 18650 lifepo4 battery. Perfect. This battery should power a ESP32 for many hours. The ESP32 draws 100ma at 5 volts which is one half watt. The 18650 is rated at 4.4 watt-hours (4.4 watts for an hour). That would be 4.4/.5 or 8.8 hours. In reality that time would be extended by the ESP32 going into sleep mode when it’s not sending data. It would never need to send data constantly for 8.8 hours.
Unfortunately the controller board that comes with the unit will have to be discarded because it doesn’t have the features needed for the ESP32.
Will the ESP32 fit inside the waterproof cabinet? Looks like it will.
In fact, a LORA board will fit very nicely, too, and that can come in useful for the next project, building a LORA network.
Reading up on how to power a ESP32 from a solar yard light has revealed some challenges but also solutions. First, the cell voltage is 3.7 as can be seen in one the pictures above. The ESP32 needs either 5 volts or 3.3 volts, neither of which is close to 3.7 volts. What is needed is either a boost converter to get up to 5 volts or a buck converter to get down to 3.3 volts. The battery voltage of 3.7 is nominal. The voltage can vary from 4.7 to 3.2. When it’s 3.7 or above the buck converter works fine but when the voltage drops below 3.7 the buck converter shuts down. That rules out the 3.3 volt option. Looking at the 5 volt option, there is a possible solution. Connect a standard charge controller between the solar panel and the battery such as the TP4056 Charging Module 5V Micro USB 1A 18650 Lithium Battery Charging Board with Protection (5 pieces for $5.95 on Amazon) which looks like this. It’s output will vary with the voltage of the battery.
Boost converters exist ($7.29 for 5 pieces on Amazon) that will provide a constant output of 5 volts with an input as low as 1 volt or as high as 5 volts and look like this.
The concept is the charging module will regulate the solar input to keep the battery properly charged. As the battery charges and discharges the output voltage will vary. The boost converter will take that varying voltage as input and it will output a constant 5 volts.
Moving on to the next step, those parts will be ordered today. Total additional cost $2.86 per unit.