Experiments with Digital Potentiometers
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.