AD5254 100K Resistance help

Hi there,

I purchased a 4 channel digital pot from ncd that is 100k value, and I used this script linked below and the max resistance I can get out of the pot is 5K based on the script, I need to be able to go up to 60k, and I have tried researching the chip for the registers but I cannot find anything on changing the resistance values.

I can go from 5K down to .09K which is fine for my other applications, but I need to go up right now for my current application.

Any help would be appreciated where I am going wrong or missing something.

This is the pot I purchased.

can you share a close up picture of the POT IC on the board ?


Hi there,

Here is the closeup of the IC. I made sure it was the 100K version of the chip when I ordered it. I do have a few other devices on here as you can see on the second photo, and I made sure to have the pull up resistor on the first board on.

Please let me know if you need anything else.

Any solution for this? @Anil_Bhaskar

Basically from what I see is when I write 0x80 it gives a resistance of 5K, 0x40 gives a resistance of 2.5K. Going higher than 0x80 does not increase the resistance from my tests.

Hi Nick,
It is a 100K pot ( the 100 marking on the IC).

I dont have one of these to test. I will see if i can get one for testing early next week.

meanwhile Try this lib


Hi, thanks for the reply.

The script comes back with a syntax error.

Traceback (most recent call last):
File “/home/pi/Desktop/”, line 88
print “Resistance at WB: %.2f K”%(res[‘b’])
SyntaxError: invalid syntax

I am using Thonny on the raspberry.

I changed some parameters around and got it to work, but the resistance values from what I see are not right. I will check later today when I am there to measure the resistance and see if does what I want it to do. Please do let me know if there is something on the script that I need to fix to make it work.


@Anil_Bhaskar I just tried it on the Arduino with the i2c and it shorted the chip when I ran the arduino script from github. When you get the piece this week please test it on raspberry, because that is my main application. Its not changing anything on the pot with the script you linked. Thankfully I bought 2 of the same pot to use.

I should receive one tomorrow for testing.

i will recommend this

  1. no code running in pi
  2. disconnect AD5254
  3. connect AD5254

measure resistance across A and W. it should be 50K

I tested with arduino and my test code looks like this

// AD5254 I2C address is 0x2C(44)
#define Addr 0x2C

void setup()
// Initialise I2C communication as Master
// Initialise serial communication, set baud rate = 9600

// Start I2C transmission
// Send instruction for POT channel-0
// Input resistance value, 0x80(128)
// Stop I2C transmission
void loop()
for(int i = 0; i <256; i++)
// Start I2C transmission
// Select data register
// Stop I2C transmission
Serial.print(“Resistance Channel-0 : “);
Serial.println(” K”);