SunRover Part 2 – Solar Power Controller/Power System

Rebuild of the SunRover Equipment Bay

Occasionally, there comes a time in a project when you realize what you have been doing will never work. I hit that point in SunRover when dealing with the DC motor noise issues. The equipment bay enclosure in Figure 3 is the first equipment bay. Figure 4 is the new second equipment bay I am building for SunRover. The first box was too small and did not have an adequate power and ground distribution system. This system was basically working with the first box (Figure 3), but I was still struggling with some motor noise issues that were affecting the equipment bay and interface boards.

Figure 3: First generation of the SunRover equipment bay.

Figure 4: Second generation of SunRover equipment bay.

I added additional decoupling capacitors around the motors and the affected boards, along with better chassis grounding, and the situation improved, but it still was not totally fixed. The symptoms were: You could turn the motors on, but when you stopped them, you locked the QPM boards that switched the motor LiPo batteries from stacked to unstacked modes. A reset of the boards would fix it most of the time, but once out of 3 times, you would have to cycle power, which is not a good operating mode. I decided to start all over with a new design.

What was happening? I think since the grounding system was inadequate, I was getting a spike into the QPM boards that would reset them and sometimes throw them into CMOS latch up mode [6], which requires a power cycle to clear. This problem led us to start thinking about ground loops. I did check the power lines with an oscilloscope and could see quite a bit of noise, but the spikes were harder to catch. I could have used my Salene logic analyzer [7] to get a better handle on it (16 channels of somewhat low fidelity analog signals can see a lot of noise all over the place), but I was sure of what the problem was.

When I rebuilt the equipment bay, I used a larger equipment bay box (Figure 4). The previous box was too small for the amount of equipment. I also constructed a solid grounding and power distribution system using thick wires, especially for the ground (Figure 5). The rebuilding of the equipment bay was less difficult than the original bay but still took a lot of time (Figures 6 and 7). However, I certainly spent less time on the rebuild than I would have spent trying to fix the original design.

Figure 5: Grounding and power system detail.

Figure 6: New equipment bay mounted on motor track platform.

Figure 7: Annotated SunRover new equipment bay.

After a bunch of tests, including turning the motors on and off many times, the new power and ground system definitely cleaned up the "turn off motor electrical noise." So, I was back in business. The QPM boards never latch up and continued working perfectly.

Rebuild of Motor 12V Motor Supply

After the rebuilding of the equipment bay, I removed the SunRover from the stacks of tuna cans holding it off the ground and ran it back and forth in a straight line (I hadn't written the navigation and turning software yet). The results were encouraging. The noise problems were gone. Things just kept working no matter what code I threw at it. At one point, I told it to run for a long period in a straight line and it kept going and ran into the lab bench. (Hazards of indoor driving.)

After fixing the bug (length of time error) that caused SunRover to run into the bench, I looked more closely and noticed two things. First, every once in a while, the TRex motor controller would reset and I would hear a little beep from the closed motor compartment, indicating when it was ready like it had just powered up. The second thing I noticed was the solar charging system didn't really seem to be charging the motor power system batteries. I put a volt meter on the motor battery supply and started running the motor back and forth at full tilt. When the motors started up, the motor power supply was dragged down from ~11.5V to ~6V! Every once in a while, the power supply would pull down so far that the TRex controller would reset. OK, that mystery was solved. It was not a noise issue, it was a power supply issue. The power supply couldn't deliver enough current (around ~3A at 12V to start up the motors, and then it would settle down to about 2A, which was fine).

Next, I looked at the second issue. Why was the SunAirPlus solar power system not charging the batteries when they were unstacked (i.e., all wired in parallel). After using my trusty voltmeter, I discovered the answer. A solar charger carefully monitors the voltage of the LiPo battery to determine how much current to send to the battery. Otherwise, you can overcharge the LiPo batteries, possibly causing a fire! The solar charger was thinking the batteries were full and at about ~4.12V. However, if you measured on the batteries themselves, you saw they were about 3.8V. That explained why I was not charging the batteries.

The diode I had added to prevent back flow current into the SunAirPlus charger and the drops across the QPM gates were adding up to about 0.4V total, and so the charger was refusing to charge the batteries. It was mainly the 0.3V drop across the back flow prevention diode that was the problem. I needed a diode to prevent the current from going back into the charger because of the stacking / unstacking system. Even getting a lower forward drop diode wouldn't fix the total problem. The voltage range from 3.9 to 4.1V is a very important range for a LiPo battery.

So what to do? Another redesign. I took out my carefully assembled battery unstacked/stacked QPM boards and replaced them with a DROK 3V to 34V adjustable voltage booster [8]. I wired the batteries in parallel. You must carefully charge them all up completely before making the connections to prevent substantial current flows between the batteries. (Do not connect batteries in parallel unless you have done this.)

Running the tests again on the motors showed the situation had improved, but was still not quite good enough. I calculated the following:

The 12V motors require almost 4A on startup of the motors in some cases. 2A in steady state.

The batteries have to supply at least 13A @ 3.7V. Say 14A with the inefficiencies of the power supply booster.

The 3 6600mAh batteries can each discharge a maximum of 13.2A, but it is recommended that you keep it less than 6A. A 6600mAh battery can keep up 6A for somewhat less than an hour.

The DROK booster can supply a maximum of 6A and has a maximum input current of 9A. Output current is good, but I need 13A@3.7V into the input to make my target current. With one DROK, I still wasn't making my current requirement. I added a second DROK in parallel, and now I could take a total of 18A into the power supply and supply a maximum of 12A on the output at 12V. Now the power supply could meet my requirements of the motors. Figure 8 shows the installed DROK units with the pretty blue LED voltage display (which can be shut off).

Figure 8: DROK power boosters installed in SunRover.

We are using the Quad Power Management board next to the DROK to switch the power to the motors on and off to save current and as an emergency cutoff if SunRover starts heading south.

I wired this all up very carefully, testing at each step, and started my test. Things were better, but I still reset the TRex motor controller about each tenth time. I measured all the currents, and I could see that I still wasn't making the 4A@12V motor requirement. Why? It had to be that I had connected all the batteries in the motor compartment to the DROK booster in the equipment bay with long thin wire JST extender cables.

A quick check on the Adafruit 6600mAh LiPo battery page [9] showed that the JST cables were rated at 2A, so they have substantial resistance above that amount of current. I redid the wiring so the batteries were combined in the motor compartment (see Figure 9) and then put a much thicker combined wire cable (the blue and black cable) from the batteries to the equipment bay. Much lower resistance.

Figure 9: Battery terminal connections and power cable.

One more time, I ran all the tests. The initial surge of the motors still pulls the voltage down to about 7V for 220ms, a comfortable margin for the TRex controller to continue to work. I connected up an ADS1015 ADC to the voltage going to the motors, and read it continuously with the Raspberry Pi2 (the Arduino Mega controls the motors).

Now the motors were working well. I'd still prefer less of a voltage drop, but I'll get back to work to improve upon that later.

One last comment: Be very careful when you are wiring up power supplies. A power supply can generate enough current to fry electronics or actually start a fire. You don't want your first test to be a "Flame On."