A CircuitPython driver for the AD5293 digital potentiometer.
The AD5293 Digital Potentiometer is an SPI, 10-bit, 100K-ohm device. The device operates with a digital logic power source of 2.7v to 5.5v and a dual analog power source of +/-9v to +/-16.5v. The potentiometer pins act similarly to a passive resistive potentiometer, but requires that voltages placed on any of the three pins not exceed the analog power supply voltage.
The CircuitPython driver supports a single SPI potentiometer device per instance. Connecting the SDO pin to the SPI host input pin is not required nor recommended since the SDO pin could interfere with other SPI-connected devices.
This driver does not work with daisy-chained devices.
The Cedar Grove AD5293 custom breakout board provides power and signal connections for SPI and the potentiometer chip. The AD5293 is also used in the AD9833-based Cedar Grove Precision VCO Eurorack module.
This driver depends on:
Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.
Make sure that you have circup
installed in your Python environment.
Install it with the following command if necessary:
pip3 install circup
With circup
installed and your CircuitPython device connected use the
following command to install:
circup install cedargrove_ad5293
Or the following command to update an existing version:
circup update
import board
import cedargrove_ad5293
ad5293 = cedargrove_ad5245.AD5293(spi=board.SPI(), select=board.D9)
ad5293.wiper = 1023
print("Wiper set to %d"%ad5293.wiper)
ad5293_simpletest.py
and other examples can be found in the examples
folder.
AD5293 CircuitPython Driver API Class Description
CedarGrove AD5293 Breakout OSH Park Project
CedarGrove AD5293 Breakout PCB Repository
For information on building library documentation, please check out this guide.
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.