Emulating a manual pot with a Raspberry PI 3B


I have a high power dc motor controller with a manual 100Kohm pot speed control.
I want to control this by emulating the pot using your Adafruit ADC/DAC product (ADA4648) and I2C on a Raspberry PI 3B. It appears the pot voltage is 0-5v.

Q: The Adafruit ADC/DAC has 2 VCC terminals - does this mean that I can use the PI’s 3.3v on the logic side and 5v on the DAC side?

Any advice on the correct way to connect this to the motor controller and potentiometer port would be welcome as well.

Hi Roland,

The STEMMA and STEMMA QT devices that Adafruit make all include logic level shifting circuits (if required) so they can be operated by either 5V devices or 3.3V devices safely.

Looking into the datasheet for the PCF8591 IC used in that module it seems the DAC and ADC parameters are tied to the operating voltage the chip is running at.

If you connect this module to a Pi, the upper and lower limits of the DAC and ADC will be 3.3V so you might need to either add a scaling circuit or find a different DAC.

I’ve had a super quick look through our range and we do have one 100k digital potentiometer module, I’m yet to check it’s totally compatible with your application.

1 Like

Hi Trent
Thanks for that.
Dual Digital pot 100K - I have tried to use one of these but have run into problems.
Placing a multimeter over the PW0 and PB0 terminals - the only way I can get it to correctly wipe the full 100K range is by connecting the VCC to the PAO terminal as per DFRobot’s tutorial. This again brings the 3.3V PI’s circuit into play on the non-logic side which concerns me.
I am a bit of a novice here.

1 Like

Hi Roland,

It does seem most of these basic breakout boards are implemented on the assumption that they will work at either 3.3V or 5V but whatever voltage is on the power supply is what you get on the logic side. I haven’t been able to find a single product alternative that gets around this.
I’m no analog electronics whiz but it may take some external circuitry to scale one of these modules to suit your needs.


Hi Trent
Thanks for your time on this.
I have revisited the DFRobot digipot and experimented with dual voltage (not something I would normally do).
With the PI connected to the GND SPI pins (not VCC) - I tried connecting an external 5v supply to VCC and GND and then the VCC to PA0 and GND to PB0 as per DFRobot tutorial.
I then put a multimeter between the wiper and both BA0 and PB0 and ran code to wipe the range.
It appeared to work perfectly both in linear resistance and 0-5.1v voltage potential.
I re-checked the voltage and current on the motor controller’s potentiometer while running the motor manually and confirmed 0-5v and 0.05 mA - complying with the data sheet.
I then removed the external 5v supply and the manual potentiometer and connected the motor controller’s potentiometer Hv, Lv and Wiper terminals to PA0, PW0 and PB0 respectively.
Tried running the motor but could not get a linear response with the motor starting after ~60% of the range.
Re-connected and tested the digipot with the 5v external supply and multimeter again and all good so not damaged.
Back to square one.