I'm trying to setup a simple program (labview) to use a digital potentiometer as a variable resistor and then read the voltage. I have preciously used an SPI dpot with success however I am having issues when switching to an i2C controlled dpot.

Following the datasheet found here ( http://www.analog.com/media/en/technical-documentation/data-sheets/AD5241_5242.pdf ) I have made the following connections.

[1] A1 -> 5V
[2] W1 -> Analog Input
[3] B1 -> DGND
[4] Vdd -> 5V
[5] SHDN -> Vdd (5V)
[6] SCL -> I2C SCL
[7] SDA -> I2C SDA

[8] AD0 -> 0V analog output
[9] AD1 -> 0V analog output
[10] DGND -> DGND
[11] Vss -> DGND
[12-14] -> No connections

When I make these connections and run my program, I end up reading a constant voltage which does not change with variation of the 8bit input. Furthermore, I am experiencing some chip overheating if the program runs for too long which shouldn't be occurring.

There are several areas which I think the error may be arising from:

  1. Pinout connections outlined above are incorrect.
  2. The slave address is incorrect. I am unsure whether I should be sending analog or digital outputs to the AD pins to define the slave address. the datasheet states " Package pin programmable address bits. Must be matched with the logic states at Pin AD1 and Pin AD0." I hav e set both to a logic low (I think) and therefore assume that AD0 and AD1 are 00. So the slave address bit is 01011 then 00 whch is 255. I have also tried setting both to boolean false with a digital output but I experience the same problems.
  3. Incorrect soldering. The chip is a SOIC chip and I have hand soldered it onto an adaptor board (winslow w9502RC) so that I can sit it into my breadboard.

Does anyone have an idea what the problem/s might be?

  • 5
    \$\begingroup\$ You need to give us more information: schematic and scope traces of the I2C lines for a start. \$\endgroup\$ – Kevin White Sep 14 '15 at 3:29
  • \$\begingroup\$ Have you got pull ups on SCL and SDA? \$\endgroup\$ – Roger Rowland Sep 14 '15 at 4:06
  • \$\begingroup\$ @bsia5466, What do you mean "the slave address bit is 01011 then 00 whch is 255" ~ Are you sure using "01011000" for writing and 01011001 for reading ? \$\endgroup\$ – Oka Sep 14 '15 at 6:55
  • \$\begingroup\$ AD0 and AD1 should tie to DGND for logic '00' state. If they are not solidly tied to a valid logic state then you would see the results you report. \$\endgroup\$ – Peter Smith Sep 14 '15 at 6:59
  • \$\begingroup\$ I have 2k pullup resistors for the SCL and SCA terminals, I am using 01011000 for writing and I have tried tying the AD0 and AD1 pin to DGND with no solution. If you guys have any more suggestions please send them my way. \$\endgroup\$ – bsia5466 Sep 16 '15 at 5:04

I can give you a checklist based on what you are seeing. If the device is heating up, I am suspicious that a digital input is not being properly driven.

  1. The I2C interface should have pull-ups. There are tables available, but 22.k to 4.7k are common for short runs. This interface is open drain / open collector, so it has to be pulled up for the times when the interface is inactive.

  2. The address pins (AD0 and AD1) are digital inputs and should be tied to a valid digital level (either Vdd or Vss).

As the device defaults to mid-range at power-up, you can try and read the register back to confirm communication. You should be able to read the value of resistance with a multimeter (disconnected from the analog input - read from the wiper terminal to either the A or B terminal).

If that fails, you will need to grab oscilloscope traces of SDA and SCL and perhaps we will be able to help further.

I checked the pinout from the datasheet and I see no error (apart from the ambiguous 0V Analog output for AD0 and AD1).

You should also check to make sure that you are asserting the correct address for the device (see the datasheet) or it will not respond (not even with a NAK).


Based on your latest responses:

2k should not be too low. The formula is quite simple: R(min) >= (Vcc - Vo(low)) / Io(low)(max). In a 3.3V world, for this device and Vo(low) <= 0.4V, we have 2.9V / 3mA ~ 1k minimum pull-up on SDA. You should check the master for SCL characteristics.

As you have also connected the address pins to a solid ground, then communication protocol failure is the most likely culprit.

Make sure you are addressing the device correctly (reverse order address bits is a very common issue). There is a timing diagram in the datasheet that I know is accurate as I am using a close cousin of this device (AD5144) which works perfectly. I calculate the address for the device as 0x59 for read and 0x58 for write.

I suggest getting a scope on SDA and SCL, grabbing the screen during attempted communication and posting it.

Having tied everything correctly, is the device still getting hot? Which resistance variant are you using and what is the analogue input level? That information will be very helpful.


  • \$\begingroup\$ I am using 2k pullups, are these perhaps too low? \$\endgroup\$ – bsia5466 Sep 16 '15 at 5:04
  • \$\begingroup\$ I have also tied the AD0 and AD1 pins to DGND with no solution. If you have any other suggestions please let me know. \$\endgroup\$ – bsia5466 Sep 16 '15 at 5:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.