Until I can switch out the battery charger on my solar setup, I have to deal with the strange grounding problems it produces for measuring current. Since I was able to measure all three currents with a computer isolated from the charger, it is clear isolation is the key. There is a way I can do this with my existing setup. It requires an isolated power supply, and optical isolators for digital signals. The power supply doesn't need to be big—just needs to drive three A/D converters. And I only need two digital signals for the I2C bus. These signals can run at over 400 kHz, so my optoisolator needs to be fast. Luckily, they make such devices—and make them in through-hole packages. I found a cheap isolated power supply, and some 2 channel, 10 MHz optoisolators. In a couple weeks, I should be able to test them out.
I tried an experiment with some digital potentiometers that unfortunately ended in failure. I have a buck converter with two potentiometers: one for setting output voltage, and the other for setting a current limit. I removed one of the potentiometers and wired in a digital potentiometer. In theory I should be able to control the voltage from an Arduino. The digital pot takes a simple command from an SPI bus to select resistance, and each device consists of two potentiometers.
Initially things seemed to be going well. The digital pot was easy to wire in, and easy to control with the SPI bus. But I was never able to set the buck converter to anything higher than 6.5 VDC no matter how much/little resistance I set. I could go from 0 to 6.5, but everything stopped after this point.
I tried several things, none of which had an effect. The following day at work I asked an electrical engineer what might be the problem. They pointed out something I had overlooked. Digital potentiometers have some kind of analog switch internally in order to switch resistance. Those switches have a maximum voltage—VCC plus a little extra. Over this voltage, they would not work correctly and the resistance skewed. A quick look at the data sheet and this was clearly my issue. At 5 volts, this device could not handle the input voltages. My converter could have voltages up to 20 volts. They do make a digital pot that can use voltages in this range. Should I continue this route, I may have to pick one up.