Sunlight is a powerful, renewable energy source! Just as scientists and engineers use data to understand and improve solar power systems, you can too.

In this project, you’ll use the data logger to track your solar panel’s performance over time and in response to different variables. Monitoring our panel’s performance will help us optimize power production for a more sustainable future.

Forward Education's Solar Panel attached to the Energy Sensor and breakout board.

Prepare

You’ll need the following items to complete this project:

Build

First, let’s set up your solar panel and energy meter.

After you build, think about how to position your solar panel so it can get consistent light for data collection during your experiments.

Code

Explore the code below to get started with your solar data logger:

  • Connect your project to the computer and download the starter code to make it work!
  • Review the code comments on each block to learn about how your solar data logger works, then try testing it in real life.

Improve

How would you modify the sample code provided, or create your own code that includes the following features?

Try:

  • Logging another type of data in a second column (e.g. ‘current’ data)
  • Logging data more or less frequently

Experiment

Log data for 5-10 minutes under different light conditions (e.g., lamp, direct sunlight, partial shadow, moving a light source further away, etc.). After logging, check out your results.

  1. Connect your micro:bit to your computer via USB. Open the micro:bit drive (it often appears like a USB stick).
  2. Click the MY_DATA file to open the data in your web browser.
  3. View your data as a table, or
  4. Preview as a graph!
  5. Download a CSV file of your data to use it in other programs like Microsoft Excel or Google Sheets!
MY_DATA File – Steps 1 and 2
MY_DATA File – Steps 3 and 4
MY_DATA File – Steps 4 and 5
previous arrow
next arrow

Analyze your data. What trends do you observe? How did your experimental changes impact the data?

Feeling Stuck? Explore the Knowledge Base for common questions and troubleshooting tips.