Now, What I did - because I'm an absolute lunatic was make a little arduino board which reads the wiper stalk position and controls a dual digital pot that sends a signal to both the BFM and the Dimmer Control Module.
The board is available here:
https://oshpark.com/shared_projects/pn7InHbk
Code here:
Code:
#include <SPI.h>
int thermistorPin = 0;
float Vcc = 5;
//float rConstant = 2000;
float thermistorSeriesResistor = 9960.0;
//float buffer = 0;
const int CS = 10;
const float StepResistance = .04033;
int previousStepValue = 0;
void setup() {
pinMode (CS, OUTPUT);
Serial.begin(9600);
SPI.begin();
Vcc = float(readVcc());
Vcc = Vcc / 1000;
}
float Resistance(int pin, float knownResistor)
{
int raw = 0;
float buffer = 0;
float Vout = 0;
float R2 = 0;
raw = analogRead(pin);
if (raw)
{
buffer = raw * Vcc;
Vout = (buffer) / 1023.0;
buffer = (Vcc / Vout) - 1;
R2 = thermistorSeriesResistor * buffer;
R2 = R2 / 1000;
}
return R2;
}
long readVcc() {
// Read 1.1V reference against AVcc
// set the reference to Vcc and the measurement to the internal 1.1V reference
#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
#elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
ADMUX = _BV(MUX5) | _BV(MUX0);
#elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
ADMUX = _BV(MUX3) | _BV(MUX2);
#else
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
#endif
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Start conversion
while (bit_is_set(ADCSRA,ADSC)); // measuring
uint8_t low = ADCL; // must read ADCL first - it then locks ADCH
uint8_t high = ADCH; // unlocks both
long result = (high<<8) | low;
result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000
return result; // Vcc in millivolts
}
void loop() {
float calculatedResistance = Resistance(thermistorPin, thermistorSeriesResistor);
//Serial.print("Resistance Reading: ");
//Serial.println(calculatedResistance);
int stepValue = 1;
// if the calculated resistance is > 9.5 then just set the resistance to 9.5 (upper limit - 236)
if (calculatedResistance >= 9.5)
{
stepValue = 255;
}
else if (calculatedResistance < 1)
{
stepValue = 23;
}
else
{
// calculate the STEP index is calculatedResistance / 39 which is the step resistance
stepValue = (calculatedResistance / StepResistance) - 1;
}
//Serial.print("What the MCP42010 wiper needs to be set to: ");
//Serial.println(stepValue);
// Don't bother writing to the chip unless the value is different than what was just calculated.
if (previousStepValue != stepValue)
{
previousStepValue = stepValue;
MCP42010Write(stepValue);
}
}
void MCP42010Write(byte value)
{
// Note that the integer vale passed to this subroutine
// is cast to a byte
digitalWrite(CS,LOW);
SPI.transfer(0x13);
//SPI.transfer(B00010001); // This tells the chip to set the pot
SPI.transfer(value); // This tells it the pot position
digitalWrite(CS,HIGH);
}