Digipot clean blend control advice

I've been messing around with the idea of using a digipot to control a JFET clean blend circuit. Im using a MCP41050 and an attiny13 to use to control the digipot.

Im using a pot to read 0-5v on pin 3 of the attiny to send the corresponding data through SPI.

The problem Im facing is that the resistance will never read full zero ohms, causing a little bit of the effect signal to bleed into the clean signal. like when the analog pot reads 0v, the resistance between pa0 and pw0 reads to about ~450ohm, and same on the other side when the analog pot reads full on 5v and when i read pb0 to pw0.

Im assuming that this is a limitation of the pot itself, probably some tolerance thing but I was wondering if there was anyway to mitigate this. I cant just put a pin onto ground because thatll mute the audio signals. When all audio signal lines are disconnected from the digipot, I get the same readings.

/*
ATTINY13/85
Converts analogread into data for digipot. 
To be used with MCP41xxx digipots.
Might need to change library from TinySPI (13) to tinySPI(85).
*/

                    /* ATTINY PINS */
/* RESET               1|O     |8      VCC 
   SL PIN 1 ON MCP41   2|      |7      CLOCK/ PIN2 ON MCP41
   10K POT WIPER       3|      |6      EMPTY 
   GND                 4|      |5      MOSI PIN3 ON MCP41 */


#include <TinySPI.h>

byte address = 0x11;
int i = 0;

//int potINPIN = A2;
#define potINPIN A2
analog_pin_t potPIN = A2;
int potRawValue;
int potOutValue;
const int CS = 3;



void setup()
{
  //Serial.begin(115200);
  pinMode (CS, OUTPUT);
//  pinMode (clockpin, OUTPUT);
//  pinMode (datapin, OUTPUT);
  SPI.begin ();
  // adjust high and low resistance of potentiometer
  // adjust Highest Resistance .
  digitalPotWrite(0x00);
  delay(1000);
  

}

void loop()
{
  potRawValue = analogRead(potINPIN);
  potOutValue = potRawValue >> 2;
  digitalPotWrite(potOutValue);
  delay(10); // this might be important to let the digipot respond.
  //Serial.print("pot val = ");
  //Serial.print(potRawValue);
  //Serial.print("   digipot value = ");
  //Serial.println(potOutValue);
}

int digitalPotWrite(int value)
{
  digitalWrite(CS, LOW);
  SPI.transfer(address);
  SPI.transfer(value);
  digitalWrite(CS, HIGH);
}

here is the code im using as well just to cover all bases. Im assuming its a hardware issue still though. Thank you for any input!

Why not run a calibration of the pot collecting max and min and then mapping the analog reading to the desired values?

I think that’s exact right. There is some resistance in the wiper lead, equivalent to a resistor attached to the wiper of a pot IRL.

So using the civility as a voltage divider will give neither full signal nor zero.

You can’t code around that. Perhaps there is an electronics solution, otherwise I think you looking at living with 99 % or whatever at the top and a noise gate type circuit to squelch the 1 % or whatever leakage at the bottom.

a7

you could try to use 100K instead of 50K to have greater attenuation of the other signal when at edges

i have not thought about that. Im looking at a tutorial right now to see if thatll do anything. the only thing i wonder about is if I'll need to do the calibration every time or if theres a way to store it. im guessing writing to eeprom?

if thats the case, i wont worry about it too much. if theres something i missed hopefully itll come up. Ive tried pulldown resistors and resistors in series with all the signals on the wipers but nothing really worked. ive tried 100ohm, 1k, 10k, 100k, 1M

if i come across a mcp41100 ill give it a shot maybe it just varies from pot to pot

I was just reading that data sheet and only now does it occur to me to ask what the are source and destination signals. Is one arm of the pot at ground?

Now I think it should work. Better anyway.

a7

unfortunately i dont think i can ground any pins on the digipot since they are all carrying signal and will just mute