Instructions
Table Of Contents
- Introduction
- Parts
- Using Alligator Clips
- Solar Board Reference
- Project 1 – Sun Finder
- Project 2 – Garden Light
- Project 3 – Self Charging Cooling Fan
- The BBC micro:bit
- Getting Code to Run on the micro:bit
- Project 4 – Adding an Energy Meter
- Project 5 – Energy Logger
- Connecting Up
- Code for the Energy Logger (MakeCode)
- How it works
- Connecting to Your PC
- Pairing Your micro:bit With MakeCode
- Showing the Device Console Graph
- Capturing Data From a Charge and Discharge Cycle
- Downloading Data
- Getting Data into a Spreadsheet Program
- Analysing the Data
- Graphing the Data
- Results
- Understanding the Data
- Understanding Duty Cycle
- How the Solar Store Works
- Project 6 – Intelligent Cooling Fan
- Troubleshooting
- About the Author
- Learning
- Monk Makes Kits
Getting Data into a Spreadsheet Program
You can now open this file with either LibreOffice or Excel. Let's look at how to do
that in LibreOffice, which is a free program that can be downloaded from:
https://www.libreoffice.org/ (but the steps in Microsoft Excel will be similar).
Open LibreOffice and choose FILE then NEW/SPREADSHEET, then FILE followed
by OPEN from the menu. Find the downloaded microbit-data.txt file in your
downloads folder. You will be presented with an import dialog, and the data from
MakeCode is separated by tab characters, so tick the 'tab' checkbox then press the
OK button to import the file.
Analysing the Data
Now that the data file is inside a spreadsheet you can do all sorts of analysis and
graphing of it. The key parameters to calculate are the minimum and maximum
readings, as these represent the Bottom of Charge (BOC) and Top of Charge
(TOC) parameters of your system, which you will need later.
You can scroll up and down the data in your spreadsheet to find the maximum and
minimum readings. A quicker way might be to use the =MAX() and =MIN()
functions of the spreadsheet to calculate these numbers from the range of data in
column A for you, like this:
To calculate how long it takes to charge your system, look at the row number of the
last reading, then scroll back until the reading is back at its minimum value.
Because the program logs data once per second, taking away these two
spreadsheet row numbers tells you how many seconds it took to charge.
Finally, to calculate how long it takes to discharge your system, collect the row
number of the value that was at the lowest value (the end of the discharge cycle),
and scroll back until the value is at its highest again (the start of the discharge
cycle). Take away these two spreadsheet row numbers, and it will tell you how
many seconds it takes to discharge a fully charged system using the fan.
Page 26