Continuing on from yesterdays post about my car stereo, I explain how I came up with this crazy idea.
The first thing I found when starting on the idea of building a car stereo from my Arduino, was that the Arduino doesn’t handle audio well. That concerned me for a while. The majority of topics I found concerning the Arduino and audio in projects was about a wired connection from the Arduino to an iPod or iPhone, and using the Arduino to control those devices. I want the control, but I don’t want a wired connection. They also want to connect the Arduino to an existing audio system. Again, not what I wanted. I want to replace my stereo. I was not off to a good start.
So, I went a different route. There had to be something I could use to connect to my phone via Bluetooth. So I started searching for Bluetooth Arduino solutions. I found plenty of different Bluetooth chips that would connect to the Arduino, but all of them were only data connections. None supported the A2DP profile required to play music over Bluetooth, nor the HFP/HSP profile for answering calls over Bluetooth. Again, not the greatest start.
For a while I lost interest. I’m inherently lazy, and this was hard. My brief searches had resulted in no answers. I couldn’t be bothered to spend more time looking into something that required more than ten minutes of my time. You know, because I’m so short on free time. Right. I have more difficulty deciding what I’m going to do with my time than trying to fit something in. I have nothing but free time. Anyway, I was perusing YouTube one day and found a video of someone hard wiring a Nexus 7 into the dash of their car. And they retained steering wheel controls, as well as modifying the buttons on the dash to control the device. This was cool. I could do this.
So I started looking into it. I could pick up an older Nexus 7 for around $100 on Kijiji, and that would be good. I didn’t need the latest one, all the device would be doing would be playing music and using Google maps. He soldered the buttons from the dash onto the ribbon cable for the control buttons on the N7, and I could do that… if I had buttons on my dash, which I don’t. Oh well, we’ll figure that out later. I even measured the exact dimensions of the visible part of the screen without the bezel to find out if it would fit in the stereo hole of my car’s bezel. Almost, I would have to shave a millimeter from the top and bottom. Fine, good, I can handle that. What about the steering wheel controls? Oh crap.
The device that he used to interface with his steering wheel controls works with resistive buttons. They basically work like this:
- Press button
- Button connects to either ground or voltage
- In the line between the button and the stereo, there is a resistor
- Value of the resistor changes the current going to the stereo
- Stereo gets the signal, analyzes the current, decides what to do from there
This, of course, doesn’t work on the Chrysler LX’s. They work over CAN-BUS. Sort of. I’ve since found that the buttons are resistive in the Chrysler’s steering wheel, but they don’t go directly to the stereo, they go to a CAN-BUS interface that then get’s sent to the radio. In my case, to a device that converts them back into a resistive signal. My current stereo then reads these signals and does what is appropriate to button press.
I could of course just connect the steering wheel control interface into the device, and have that control it, but that was a lot of hardware behind my dash. I wasn’t too keen on that. Then I remembered about the lack of fading control. I would need someway to interface with the CAN-BUS network so I could control the amp. I found hardware to do that, and software that would work as well. Hey, we have a plan. I could also use that to interface with the steering wheel controls. Awesome.
Except you can’t use an Android tablet as a Bluetooth headset. And I couldn’t find anyone with a solution to that. Back to needing a Bluetooth chip. Well, what about just getting a cheap in car Bluetooth adapter and wiring that into the tablet as well? That could work. But now we’re back into a load of hardware behind the dash. And I would most likely have to learn how to program in Java to make the tablet respond to the hands-free adapter, and to make it send out the right signals over the CAN-BUS adapter.
After that I saw some completed videos, and the gesture controls people were using on the tablets, and I remembered that this was a touch screen device. This is not the solution that I want for my car. Back to searching through Arduino solutions. I continued to find Bluetooth chips and Arduino shields that added Bluetooth data connectivity, but no audio. Then I found this.
The RN-52 chip by Roving Networks seems to have everything I could want. A2DP, HFP/HSP, data, audio out, audio in, this is perfect. I can interface this with my Arduino to get data from the phone, control the music playback, and answer phone calls. Awesome. Now, can I use the Arduino to accept CAN-BUS signals to use my steering wheel controls? Yup.
At least, I think. As it turns out, all of the CAN-BUS signals coming from your engine and transmission are standardized. By law, they have to work with the OBD-II connector under your steering wheel. Everything else is up to the manufacturer. Chrysler does not provide the codes that it uses for the stereo or anything else. So, in order to get this to work, I will have to connect to the CAN-BUS, and sniff out the packets used for the steering wheel buttons, the amplifier control, and the artist/track for the small LCD under the speedometer, then learn how to program the shield to send this information.
Well, I have ordered the RN-52 and a couple other sundries, as I will first need to get that working before I do anything else. And if I decide that this won’t work, I can always use the chip to build some speakers for my bed. And oddly enough, as I was writing this, I received confirmation that the chip had shipped. Rock on.
More to come as I get parts and get things working.