SunRover Part 2 – Solar Power Controller/Power System

SunAirPlus System

We are using three SunAirPlus boards designed by SwitchDoc Labs. Each power subsystem has its own SunAirPlus board.

SunAirPlus is a solar power controller/sun tracker/power supply system developed by SwitchDoc Labs to power Arduino and Raspberry Pi-based systems. The board has a solar panel charge control system, a voltage booster, two A/D systems, and a GPIO-interface circuitry system for voltage-level shifting and for powering servo motors, as well as aiding in stepper motor control. SunAirPlus contains an ADS1015 A/D converter, INA3221 voltage and current sensing circuitry, and an optional stepper motor controller built right into the SunAirPlus board. SunAirPlus was the subject of a recent article in Raspberry Pi Geek magazine [11].

When I design a system like SunRover, I like to collect lots of data. SunAirPlus allows me to monitor the battery, solar panels, and power into the computers (load) in a real time basis and allows the Arduino Power Management system to make decisions based on what is going to with all three of the power subsystems. For example, the Arduino can allocate solar panels (through the solar panel multiplexer) to the power subsystem that needs the charge the most.

Listing 1 is a reading from the SunRover Arduino power management system showing the state of all three power subsystems. SunRover is currently plugged in to a power supply for development, but when in full sun, the numbers look similar. SAP0 is the motor power subsystem, SAP1 is the Raspberry Pi2 power subsystem, and SAP2 is the Arduino power management power subsystem. The Raspberry Pi2 and Arduino batteries are pretty much fully charged. Figure 11 shows the three systems wired into SunRover. The solar panels are wired in the big terminal strip at the lower right of the figure.

Listing 1

Arduino Power System

01 --------SAP0--------
02 LIPO_Battery Bus Voltage:  4.21 V
03 LIPO_Battery Load Voltage: 4.19 V
04 LIPO_Battery Current:      -187.60 mA
06 Solar Cell Bus Voltage:   5.65 V
07 Solar Cell Load Voltage:  5.63 V
08 Solar Cell Current:       188.80 mA
10 Output Bus Bus Voltage:   4.98 V
11 Output Bus Load Voltage:  4.98 V
12 Output Bus Current:       1.60 mA
14 --------
15 --------SAP1--------
16 LIPO_Battery Bus Voltage:  4.19 V
17 LIPO_Battery Load Voltage: 4.19 V
18 LIPO_Battery Current:      -0.80 mA
20 Solar Cell Bus Voltage:   5.54 V
21 Solar Cell Load Voltage:  5.50 V
22 Solar Cell Current:       428.80 mA
24 Output Bus Bus Voltage:   4.90 V
25 Output Bus Load Voltage:  4.94 V
26 Output Bus Current:       340.40 mA
28 --------
29 --------SAP2--------
30 LIPO_Battery Bus Voltage:  4.18 V
31 LIPO_Battery Load Voltage: 4.18 V
32 LIPO_Battery Current:      -0.40 mA
34 Solar Cell Bus Voltage:   5.62 V
35 Solar Cell Load Voltage:  5.60 V
36 Solar Cell Current:       161.60 mA
38 Output Bus Bus Voltage:   4.96 V
39 Output Bus Load Voltage:  4.97 V
40 Output Bus Current:       129.20 mA
42 --------
43 Compass heading=Max=288.20
44 Min=26.45
45 287.80
46 inside temp (F):74.84
47 outside temp (F):73.40
48 inside humidity %:31.20
49 outside humidity %:35.20
Figure 11: SunRover SunAirPlus charging controllers and data collectors.

Solar Panel Multiplexer

One of the most innovative parts of the SunRover design is the solar power multiplexer. A block diagram is shown in Figure 12. SunRover has six 3.5W/6V solar panels. These are on a "wing" across the top of SunRover. Figure 13 shows SunRover with the solar panel wings added. (See Figures 14 and 15 for front and back views of the panels.) Each of these six solar panels (five actually; one is hardwired) can be switched by a Quad Power Management board and connected in different ways to provide more power to the subsystem (Motors, Arduino, or Raspberry Pi), depending on which component needs power at the time and the Sun.

Figure 12: Solar power multiplexer block diagram.
Figure 13: SunRover with solar wings.
Figure 14: Front of the SunRover's solar panel wings.
Figure 15: Back of solar panel wings.

The multiplexer switches each of five panels between any of the three power subsystems. The sixth panel is not connected to the multiplexer but is, instead, wired directly to the Arduino for brownout management. If the Arduino Power Management system runs out of power and shuts down, the one panel hardwired to the Arduino SAP2 allows the Arduino to recover from a brownout.

The panels can be switched dynamically through the I2C bus from the Arduino power management subsystem. The multiplexer uses three Quad Power Management boards designed by SwitchDoc Labs [2].

The software to control the multiplexer was fairly short but quite complicated. We had to control the boards, and we had to figure out if the requested configuration was legitimate given the panel and power configuration. Now the call is quite simple:

setSolarMux(1, 2, 3); // 1 \
  for motor, 2 for pi, 3 for arduino

The settings can be changed by the Raspberry Pi2 or the Arduino. Listing 2 is the Serial output from the Arduino as it receives a SETSOLARMUX command from the Raspberry Pi2 over the serial link between the two computers.

Listing 2

Serial Output from Arduino

sudo apt-get install kdenlive
01 ----------------
02 FreeMemory=1688
03 ----------------
04 Serial2.available:16
05 commandState=0
06 BUFFER Read- char=FFFFFFFE | ?
07 BUFFER Read- char=FFFFFFFE | ?
08 BUFFER Read- char=53 | S
09 BUFFER Read- char=45 | E
10 BUFFER Read- char=54 | T
11 BUFFER Read- char=53 | S
12 BUFFER Read- char=4F | O
13 BUFFER Read- char=4C | L
14 BUFFER Read- char=41 | A
15 BUFFER Read- char=52 | R
16 BUFFER Read- char=4D | M
17 BUFFER Read- char=55 | U
18 BUFFER Read- char=58 | X
19 BUFFER Read- char=0 |
20 BUFFER Read- char=33 | 3
21 BUFFER Read- char=FFFFFFEE | ?
23 Command Received From Pi2:SETSOLARMUX
24 0:01:13 1 1 1970
25 Compass heading=340.93
26 QPM GPIO Readback
27 QPM0=11
28 QPM1=5
29 QPM2=7
30 QPM3=0
31 QPM4=3
32 --------
33 displayMode=4
34 returnString=4,1,1
36 displayMode=4
37 SETSOLARMUX Command=4,1,1
38 setSolarMux: motor, pi, arduino = 4, 1, 1
39 Panel configuration accepted
40 setting Power Channel= QPM, Channel Number, State: 2, 1, 1
41 setting Power Channel= QPM, Channel Number, State: 2, 2, 1
42 setting Power Channel= QPM, Channel Number, State: 2, 3, 1
43 setting Power Channel= QPM, Channel Number, State: 3, 0, 1
44 setting Power Channel= QPM, Channel Number, State: 4, 2, 1
45 QPM GPIO Readback
46 QPM0=11
47 QPM1=5
48 QPM2=14
49 QPM3=1
50 QPM4=4

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content