⚡ Frank Villaro-Dixon's website

A ☀️ pyranometer to measure solar irradiance

Connecting a (good) Kipp&Zonen pyranometer to a Raspberry Pi using a simple ADC board

finished

A pyranometer

My home has a crappy roof. It’s badly insulated and overheats easily in the summer. The goal is to insulate it, but due to a multitude of concurrent projects we won’t be able to do it right now.

I had the idea of spraying my tiles with a mixture of lime diluted in water, thus creating a really cheap, ecological, and rather reflective (or rather high albedo) coating on the roof tiles. However, how could I ensure that this works? Maybe I would have the placebo perception that it does, whereas it does nothing in reality.

To measure the effect of the white tiles, I should add temperature sensors inside the home, but we’ll also need to compare them to the sun irradiance.

Thankfully, on the first company I created, we had a pyranometer that we used for energy efficiency benchmarks. A pyranometer is a device that measures the solar irradiance. There are different types (thermopile, photovoltaic, ..), but they all basically map the solar irradiance ($W/m^2$) to a voltage output ($V$).

I have the chance of having a thermopile pyranometer. More specifically, a Kipp&Zonen CM10. It was calibrated by the University of Geneva so I know it measures what it should measure. The output voltage of such pyranometers is rather small.

The calibration constant of mine is $4.94 ±0.02 mV/kW/m^2$. That means that when the sun is shining full brightness, it will output around $\approx 5mV$. This is small! As I’d like to have a resolution of around $10 W/m^2$ I will need to be able to measure a voltage resolution of $50 \mu V$.

Raspberry pi to the rescure

I love Raspberry Pis. They are were rather cheap, and their GPIO allows them quick interfacing with other ICs.

I chose the MCP3421, a 18-bit ADC that talks I2C. It as a programmable gain amplifier of up to x8, allowing to boost the input signal from the max $5 mV$ to $40 mV$.

The voltage reference is $2.048V$, so 18 bits of resolution gives us steps of $\frac{2.048V}{2^{18}} = 7.8125 \mu V$. That means that, noise aside, the internal resolution is $\approx 7.8 \mu V$, which translates to an input resolution of $\frac{7.8 \mu V}{8} \approx 1 \mu V$. Given the voltage output of the pyranometer, $ 1 \mu V$ equals around $0.2\frac{W}{m^{2}}$.

The MCP3421 was then soldered to a (fugly) board made at home:

MCP3421 board

Some python code later (visible here) and the Pi started sending data to the OpenTSDB instance:

Solar irradiance graph

Interestingly, we can use the pyranometer to check that the production of the solar panels is correct by graphing the irradiance and the power production of the solar panels:

Irradiance vs Solar power