How to get steering wheel audio controls in a TJ

Ya I am finding some of my button presses get lost ONLY when the engine is running. It looks like the analog to digital converter is all over the place due to the noisy power. I put in a voltage regulator and some capacitors but haven't had a change to test it out yet. I'll need to update my schematic and parts list.

That's interesting although not unexpected from running the Arduino off the direct +12V line.

Do you have schematic and code for the new implementation? I see at a minimum you are now using the reference voltage at the same voltage as the Vdd of the digital pot as well as the Vin on the Ardiuno. I assume you are running it all at 5v through the voltage regulator?
 
Here is the updated schematic. I am using a LM2937ET-5.0 - not the 3.3V that is shown in the diagram.

Screen Shot 2020-06-15 at 11.52.24 AM.png
 
Last edited:
Good deal. The arduino's built in regulator should have been able to handle cleaning up the supply power though, however if it was over 12V (charging from the alternator) - maybe it had issues?

Also - I'm not sure the Arduino will run with 5V to the Vin line - Vin normally requires 7-12V. You can power it with 5V through the USB or the 5V pin 12. The 5V line will bypass the board's internal voltage regulator.

The problem with running it on 5V is that when plugging in with USB and the unit is powered through the 5V line - the two voltages can be vary slightly and cause issues. Maybe add a switch or jumper to the 5v line powering the ardiuno so you can disconnect board power from the 5v Regulator when trying to debug?
 
Any update on what happened with this? More interesting in adapting it for winch control or something like that since I don't have cruise control or a stereo that accepts external controls, but it sounded like you had some improvements to be made on the button press detection that sound nice.
 
I actually ran into a problem with this and haven't committed any time to it. It works great when the Jeep is in the garage and not running. But when it is, there seems to be too much fluctuation in the voltage that the Arduino "read analog voltage" is all over the place. Some of the button resistances are so close together that with the fluctuations I wasn't able to tell it apart. (eg. Right Audio Up 1.21kΩ & Cruise Cancel 1.25kΩ).

I learned tons and keep meaning to try it again with a PIC microcontroller that has a built in ADC.
 
  • Like
Reactions: Amorget
So I had some time on my hands so decided to geek out a little on this. I wrote a little script that iterates through all resistor values 1Ω-20kΩ for both the shift resistor and the voltage divider resistor and then using ohms law calculates the voltage drop and output the minimum variance between all button presses.

With my original values (5.6Ω & 10kΩ resistors) the difference between left centre button press and left up button press was 0.019V which may have been too slight for the Arduino to reliably detect.

My script is calculating 909Ω & 653Ω as the best combination which will have a variance of 0.14V. That's 7x better and maybe something the Arduino or PIC can work with.
 
Just to clarify for myself, the script calculated that you want a 909 ohm resistor between the audio controls and the cruise control line, then a 653 ohm resistor at R8?
 
No other way around, 909 ohm at R8 and 653 ohm between the audio controls and the cruise control line. The values don't need to be exact but the closest you can get to these values should spread it out the best.

Here's the output of the script.

Resistance = resistor of the button
Resistance Combined = total resistance when button pressed considering the 20.5k ohm in parallel and the 653 ohm in series (for audio control buttons only)
Voltage = what the voltage should be coming into the Arduino ADC pin assuming a 5v circuit
ADC Value = the integer value between 0 & 1023 the Arduino should return for the button press

1642204041288.png
 
DUDE! This is awesome. You should put this up on GitHub and share with the world. Maybe some other Jeep nerd will come along and help ya add some additional functionality through a pull-request... :)
 
Ya good idea. I have a private GitHub repo but wasn’t going to make it public until I had something working. I have it working with a breadboard PIC now so should have something to update in a few weeks. I also bought an oscilliscope with the aim to decode the serial IR protocol for my Clarion headunit so I don't need the PAC.

IMG_4440.jpeg
 
  • Like
Reactions: Amorget
I have made some good progress over the last few weeks. I was able to decode my Clarion protocol and get it programmed directly into the PIC chip. So i no longer need the PAC box. I used an 8pin PIC16F15324 so the end board will be pretty small. I also did away with Eagle and am teaching myself Kicad.

It all seems to be working when in the garage but I need to get it installed properly in the Jeep and road test it. If that works, i'll open up GitHub and finalize the PCB design.

Some pics of my progress.

Screen Shot 2022-02-16 at 8.20.49 PM.png


IMG_4503.jpeg


Screen Shot 2022-02-16 at 8.14.08 PM.png
 
Thanks. This was all about finding a project to learn how to do PCB design and embedded programming. I'll probably never use the audio buttons but at least I know i can! Next up i want to build a free GPS tracker using LORA or APRS (ie. amateur radio).
 
I am using a company called oshpark. I am sure there are cheaper suppliers in China but this is all new to me and they had the best website to order from.

View attachment 169010

Somewhat unrelated question - -where did you get this Steering wheel? It doesn't look like something that comes stock with a WJ but looks super nice.