SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By JayinMI
#181770
OK, I originally used an Arduino Uno R3 along with an I2C relay board to filter signals coming from the steering wheel controls in my car. It "reassigns" 3 of the functions to control a signal processor, and passes the remainder on to the factory radio to work as normal. The steering wheel controls are set up on a resistance ladder: (Ignore the Pin 9 reference, PWM didn't work)

Image

So, I used an I2C relay board, matching resistors (referenced to ground) and had it all working.
The prototype is functional, just UGLY and taking up a lot of space. When you press a button on the steering wheel, the Arduino reads it on Analog Pin 3. Compares the value with different values (via a series of If...then statements) and triggers the relay board to complete the circuit between ground and the appropriate resistance.

Now, I want to make it smaller. MUCH smaller. I picked up a Sparkfun Pro Micro 5V, and an MCP4275 breakout board (that I've had for a while) and was wondering if I could replace the relay board/external resistor ladder with the DAC.

If so, would I need to invert the output? So, if the button being pressed read, for instance, 600. Would I convert this from a 10 bit scale to a 12 bit scale (0-1023 to 0-4095) then subtract that from 4095 to so that it passes "more ground" than voltage?

Pin 3 = 600
multiply by 4 = 2400
4095-2400=1695

or could I just send the expected voltage value into the radio? Since the factory HU supplies the 5v through the 4.7k ohm resistor inside the HU, I assume I'd need to invert.

Thanks!

Jay