Question about using and testing a digipot

Thread Starter

onlyonce18

Joined May 8, 2016
48
Hi all,

I'm trying to replace a physical potentiomenter (5K) with a digipot, using the MCP4011 controlled by a PLC. Before building the board I tested the digipot in serveral ways, with no success (have 5 of them and didn't get any result).

I'm attaching the circuit diagram I used. I measured the resistance between pins 3 and 4 (terminal A and Wiper of the digipot) and measured 2.60KOhm
.
Then followed the serial protocol to change the resistance value, pushing both buttons and releasing the CS first, then the U/D. Pushed the U/D button several times with no change on the resistance value.
Tried to opposite, pushing only CS, releasing it and the pushing several times the U/D and again no change. All push actions were long enough (more than half a second each pressing)

Then I tried different resistor values (lowest was 3KOhm, highest 600KOhm, resistors between 5V and the CS button) to see if I could "drive" the CS pin low, again no change.

Also tried connecting the CS to 0V, sometimes the resistance changes to 5KOhm (the max digipot value), sometimes it changes to 0 Ohms, sometimes a value inbetween, sometimes no changes at all, all without pulses on the U/D pin. It looks that the digipots are working but I have not found a way to control it using the U/D pin.

What am I doing wrong? Have found a few diagrams controlling the MCP4011 with a PIC microcontroller but the CS and U/D pins are connected directly to the PIC outputs, no resistors, no other components, and the PIC program is very simple, just driving the pins high or low.

Thank you all for your comments and help
 

Attachments

AlbertHall

Joined Jun 4, 2014
12,346
You need a resistor from U/D to 0V, say 10k. CS shouldn't need one but to be sure put same on CS pin.
It should work like - set U/D to the desired direction then pulsing CS will change the pot value one step for each pulse.
 

Thread Starter

onlyonce18

Joined May 8, 2016
48
Thank you both, Albert and Eric. All is working now, as you both mentioned it as the floating pin. If you live in the US, have a great thanks giving day.
 

drc_567

Joined Dec 29, 2008
1,156
Glad to see that your circuit is working. You might want to look at the increment/decrement sections of the data sheet. There is a simple initialization sequence for each mode. Prior to CS activation, the U/ D pin is selected appropriately.
... p. 30 ...
 
Last edited:
Top