Go Down

Topic: Help with DigiPot (Read 92 times) previous topic - next topic


Hi all,

I'm following the digiPot example (https://www.arduino.cc/en/Tutorial/DigitalPotControl) but I can't seem to get it to work.

I've setup the circuit exactly as specified using an Arduino Uno and AD5206, but the LEDs don't light up...

In order to troubleshoot, I tried the following:

1) Simplified circuit to only have 1 LED, which is connected to Channel 0 on the digiPot --> No difference.

2) Simplified the code as follows (again, no difference):

Code: [Select]
#include <SPI.h>

// set pin 10 as the slave select for the digital pot:
const int slaveSelectPin = 10;

void setup() {
  // set the slaveSelectPin as an output:
  pinMode(slaveSelectPin, OUTPUT);
  // initialize SPI:

void loop() {
  digitalPotWrite(0, 10);
  digitalPotWrite(0, 100);
  digitalPotWrite(0, 200);


void digitalPotWrite(int address, int value) {
  // take the SS pin low to select the chip:
  digitalWrite(slaveSelectPin, LOW);
  //  send in the address and value via SPI:
  // take the SS pin high to de-select the chip:
  digitalWrite(slaveSelectPin, HIGH);

3) Tried all the above using an Arduino Nano Every instead, but again no improvement.

4) Measured resistance of the digiPot between A1 and B1 (with the circuit powered on), and it reads >1Mohm. Similarly, A1 to W1 also reads >1Mohm. This digiPot is supposed to be 10kohm...

Based on #4, I'm guessing that somehow the digiPot isn't powering on? I checked voltage at Vdd and it's 5V (also tried 3.3V, but no dice). Grounds are properly connected too.

I'm really clueless... Any help would be greatly appreciated.


Reverse the LEDS. Maybe you have them inserted backwards. This is assuming your connections are all correct.

Go Up