Measuring the Solar Eclipse – A Raspberry Pi Project

Measuring the Solar Eclipse – A Raspberry Pi Project

On August 21, 2017 we had a total solar eclipse in the United States.   In eastern Washington State, where SwitchDoc Labs is

Actual Image from Pinhole Camera

located, we had a 92% coverage of the sun.   Of course, we immediately felt that we had to measure it when it happened, so a new solar power project for the Raspberry Pi was born.

The Event

An eclipse of the Sun happens when the New Moon moves between the Sun and Earth, blocking out the Sun’s rays and casting a shadow on parts of Earth.

The Moon’s shadow is not big enough to engulf the entire planet, so the shadow is always limited to a certain area (see map illustrations below). This area changes during the course of the eclipse because the Moon and Earth are in constant motion: Earth continuously rotates around its axis while it orbits the Sun, and the Moon orbits Earth. This is why solar eclipses seem to travel from one place to another.

At SwitchDoc Labs, we were close to the total eclipse, but not quite on the line.  This resulted in a 92% coverage of the sun by the moon.   Clearly, this was an event that we could easily see and measure.   The eclipse started at 9:13am Pacific Time, peaked at 10:27am and was complete at 11:46am.   Luckily, the skies at SwitchDoc Labs were clear and the latest weather front had cleared the skies of smoke from the forest fires to the West and East.

We decided to measure the solar panel voltage, solar panel current and the outside temperature variation.

The Hardware

As shown in the block diagram below, we used  a Raspberry Pi 3, a SwitchDoc Labs SunControl solar power charger, data Solar Eclipsecollector and charger and a SwitchDoc Labs AM2315 temperature and humidity sensor.   Note the 10 Ohm resistor load.  We used this to make sure that the LiPo battery was discharged enough to let the solar panel supply the full available current.   When a battery is charged, SunControl reduces the current taken from the solar panel and the solar panel voltage increases.   We wanted the solar panel to be running flat out in order together the maximum variation due to the solar eclipse.

Using Grove Connectors, we put together the hardware in just minutes.

 

The Software

The Raspberry Pi DataLogger consists of a Raspberry Pi 3 running the SwitchDoc Labs DataLogging Python Software,  MySQL, MatPlotLib and an Apache Webserver.   Installing all this software is described in this tutorial.

We used MatPlotLib in Python  for the graph generation from the MySQL database.   Here is a graph building tutorial with MatPlotLib.

 

The Results

On all three of the graphs below, the dashed black lines show the start time and the end time of the eclipse.

The Solar Panel Current Plot

Of all three of these graphs, this one shows the most dramatic variation due to the eclipse.   Basically, the solar panel current plunged from 325mA to about 25mA,  or a 92% reduction, directly in line with expectations.

 

The Temperature Eclipse Plot

The temperature dropped from about 30 degrees C (86 F) to about 22 degrees C (71F) or a variation of  of about 15 degrees F.   Why so much?   The AM2315 was right behind the solar panel and was picking up heat from the panel and from the air temperature.   Outdoor air thermometers registered a dip from 2 to 11 degrees F.

 

The Solar Panel Voltage

This was by far the most boring graph.  Since there was still 8% of the sun showing, the solar panel only showed a very small drop in voltage.   If we had been in totality, then it would have dropped to almost zero along with the current.

1 Comment

Comments are closed.