Measuring the Solar Panel Voltage and Current

To measure the solar panel voltage and current follow these steps:

1-  Create a program with  two  Analog Read Pin blocks, P1 and P2,  and upload it to the micro:bit. This puts P1 and P2 in analog input mode.

2-  Connect  jumpers from the Solar Current Monitor  and Solar Voltage Monitor on the Solar Battery to the P1 and P2 inputs on the micro:bit.

3- Create a program that will loop on analog read P1 and P2 and printout the results. The readings will be between 0 and 1024.

4- The solar voltage will be  equal  to    (( 3.19V ÷ 1024) x 2.4 x reading) . For example a 3.7V solar voltage will give a reading of 495 on P2.

5- the current will be    (  ( 3.19V ÷ 1024) x 2.4 x (P2reading –  P1reading)  ).  One bit reading is approximately 7.5mA. Because of the precision of the micro:bit A/D, readings below 30mA or 4 bits are not significant.

6- The solar panel voltage is  ( 3.19V ÷ 1024) x 2.4 x P2reading.

7- The solar panel voltage is modulated by the battery charger U1 and may fluctuate depending on the charger state.

8- To measure the unloaded solar panel voltage re-program micro:bit  pin P1 as a digital output and write a zero to it. Connect it to the charger on-off. The solar panel voltage is available on the micro:bit  P2  programmed as an analog input in step 1.