I need to control a 10kOhm digital potentiometer in rheostat mode in 256 steps. I found an Arduino tutorial, which works with an MCP41010 (I added a viper resistance according to the datasheet). This works fine - I can send values from 0 to 255 to the CS pin an the resistance between output pin A and B changes from 0 to 10kOhm. The problem is, that my application requires 16V to go through this resistance, which the MCP41010 can't handle.
I tried to go with a MCP41HVX1 high voltage digital potentiometer (which I soldered on a TSSOP-to-DIP Breakout board) and assumed it would work the same way. Turns out it doesn't... My connections are:
Arduino nano -> MCP41HVX1
- 10 -> CS
- 11 -> SDI
- 13 -> SCK
- 5V -> VL
- GND -> DGND
With the MCP41010 I connect a 115Ohm viper resistor between output pin A and wiper terminal and measure resistance between output pin A and B (pink connectors). I noticed, that the MCP41HVX1 has a different description for the rheostat modus but I can't get that to work either.
This is my circuit that works with the MCP41010
And here is the respective code (which sets the MCP41010 to 255 i.e. 10kOhm)
#include <SPI.h>
byte address = 0x11;
int CS= 10;
void setup()
{
pinMode (CS, OUTPUT);
SPI.begin();
}
void loop()
{
digitalPotWrite(255, CS);
}
int digitalPotWrite(int value, char Port)
{
digitalWrite(Port, LOW);
SPI.transfer(address);
SPI.transfer(value);
digitalWrite(Port, HIGH);
}
Has anyone ever done this or has a clue what's going on?