Firmware and Data Update

A project log for SOL: Long-term solar intensity sensing

SOL is a project to develop a solar powered, connected solar intensity sensor (also known as a pyranometer)

Jake WachlinJake Wachlin 02/10/2019 at 21:040 Comments

Adaptive Timing

In a previous log, I had mentioned that SOL should be set up to adaptively change its sleep time based on the measured solar intensity. There are two main reasons for this. First, this will save a lot of battery during the night. Previously, it would read data at regular intervals (e.g. 60 seconds) all the time. During the night, the power is zero, so there is no need to sample. Secondly, it would allow the system to generate more accurate energy estimates during high-power scenarios. Coincidentally, since SOL is charged by the sun (theoretically at least), it can afford to use more energy during times when it charges faster.

I made a firmware update to test one concept for this adaptive timing. My original thought was to have the timing change according to some tunable filter driven by the peak power measurement. However, if we see the power is high, we ideally would instantly jump to short intervals. I created a very simple algorithm in which a minimum and maximum time interval are given. If the power is over some threshold, the interval jumps immediately to the minimum. If it drops below the threshold, the interval is slowly incremented to the maximum. Here, the minimum interval was 30 seconds, the maximum was 300 seconds, and the power threshold was 7 mW. This seems to work quite well. The below image shows the relative time of each datapoint for 3000 datapoints. The zig-zag is caused by the transitions between 30-300 second intervals over the course of about 4 days.


SOL has now been running for a week and has recorded and uploaded about 6000 datapoints. The single cell 14500 li-ion battery has dropped from 4.02V to 3.80V during that time. It does not appear to be charging, even though I changed the charging control resistor so that the desired charging current is 12mA. The peak current measured through those days was about 5.5mA, so it is expected that the battery has not charged. SOL is in a windowsill, but never in direct sunlight, so soon I will test if it charges in higher intensity light.

Looking at the energy that could be extracted based on the measured peak power from SOL's panel, we see that even in a windowsill, SOL can easily power itself. The battery is about 0.7 Wh, and over about three days, it could have ideally (with 100% charging efficiency) extracted about 0.3 Wh.

RTC Bug Fix

There was a bug with processing the time from the RTC which caused some readings to be corrupted. This has been fixed. The bitmask used when loading the hour value was wrong, so anything after 19:00 was incorrectly recorded.


Due to the above RTC bug, not all the data from the past week is valid. We will consider only the data after that was fixed.

First, consider a calculation of available solar intensity. The solar panel has an effective area of 44x63mm (listed as 50x70mm, but I'm ignoring the bezel), and I assume an efficiency of 10%. That is low for a modern panel, but this one is very cheap so likely not great. Here, SOL was inside, in a windowsill surrounded by tall buildings, so it isn't receiving direct sunlight. Therefore, the peak intensity is fairly low. For reference, peak direct sunlight is typically given as somewhere around 1300W/m^2.

SOL is not installed outside in a reasonable location as it should be, of course, so the following calculations are more academic than anything. Nonetheless, it is interesting to look at the kind of calculations that can be done with SOL's data.

First, consider the energy available to a larger, 33 m^2 (355 ft^2) system. We assume the system has an overall 25% efficiency. Over a little more than 3 days, the total energy was almost 10kWh.

Second, we can take the above and calculate the cost of the electricity generated. Assuming the US national average of $0.12/kWh, this is almost $1.20 worth of electricity.

Third, we can consider the net carbon effect. This is a much more difficult calculation to make. Each state has a different energy source breakdown, so the offset of someone switching to rooftop solar depends heavily on where their energy would otherwise come from. Further, lifecycle assessments are notoriously difficult to calculate. As an approximation and hopefully conservative estimate, we use the 2014 IPCC coal minimum of 720 lbs CO2/kWh and rooftop solar PV maximum of 60 lbs CO2/kWh. Overall, the possible savings are about 6500 lbs over 3 days. Note this is lifetime offset, not "incremental," so attempts to account for building a new coal plant. It is harder to make a conclusion at the personal level since a single person switching to rooftop coal does not stop a plant from being built, and disregards the issue of baseline power if a large percentage of the population attempted to use solar only.