Introducing Project RAUX Box

Kinja'd!!! "Future Heap Owner" (aperiodic)
03/23/2019 at 11:00 • Filed to: Project RAUX Box, stereo, Audio, Electronics

Kinja'd!!!4 Kinja'd!!! 13

My !!!error: Indecipherable SUB-paragraph formatting!!! has one huge flaw: it has no AUX port. The primary reason I bought it is for road trips, where having all of my music at my fingertips is essential. I’m gonna put in an AUX one way or the other, and I’ll be telling y’all about it in excruciating detail. Welcome to Project RAUX Box.

In this introductory post, I’ll be surveying all the methods of putting in an AUX that the enthusiast community has figured out, outlining my plan for the method I’ve chosen, and showing you the major components involved.

Background: AUX Retrofit Options

The root cause of this problem is that the 2004-2007 P1 Volvos used an unusual MOST fiber optics interlink, and do not even have a factory AUX option available. The cheapest compatible kit I could find online is !!!error: Indecipherable SUB-paragraph formatting!!! . Now, $80 for putting an AUX in my old Corolla was a little high, but worth it. But $300?! That’s good money I could put towards practical necessities, like a set of new tires, wheels that aren’t curb rashed, or gorgeous Nordic oak !!!error: Indecipherable SUB-paragraph formatting!!! and !!!error: Indecipherable SUB-paragraph formatting!!! trim. In my book, $300 is too much to pay for what should be more or less a minijack to RCA cable. At least, it’s too much without trying something else first. So I went digging.

I found !!!error: Indecipherable SUB-paragraph formatting!!! where some folks have been figuring out different ways to retrofit an AUX input to the stereos in P1 Volvos for over 8 years . After reading through the thread’s 824 posts a few times, I’ve pieced together an understanding of all the different ways this could be achieved. If you don’t have a desire to understand the intricacies of signal paths in a car stereo’s head unit, you should skip ahead to the section called “The Plan”. Otherwise, read on as I survey all the methods the SwedeSpeeders came up with.

Method #1: AM Signal Patch

I could solder in to the AM analog signal path, between where it comes into the board and the Digital Signal Processor (DSP) that’s the nerve center of the head unit.

Pro:

Easy to install (relative to all the other options, that is).

Cons:

AM signals are pretty crappy, so the audio processing the DSP does on it means I’d lose the high frequencies of the AUX signal.

Mono only, no stereo.

Conclusion: Both of these drawbacks are unacceptable to me. Next!

Method #2: FM Signal Injection

This method involves getting a chip to encode the stereo AUX signal into the same frequency-modulated broadcast format that the DSP receives from the FM antenna. This is a little better than using an FM modulator hooked up to the antenna, but there is still some signal processing the DSP does on the FM signal to smooth over the limited bandwidth.

Pros:

Better audio than AM.

It might be possible to encode track info into the FM signal and have it show up on the dash.

Cons:

Still not that close to CD-quality.

Requires sourcing a not terribly common audio chip to the stereo analog -> FM broadcast signal encoding.

Harder to install than an FM modulator without offering that much of an advantage, or possibly any advantage.

Conclusion: Doesn’t seem worth the effort. Next!

Method #3: Bypass the Head Unit

Another option is to bypass the head unit entirely by cutting the signal between the DSP and the amp — which has expanded from a two-channel signal into a four-channel signal by the time it comes out of the DSP — and putting in relays to switch between the stock head unit feed and the AUX signal. This would involve bridging out the two stereo AUX channels to cover the four channels going into the amp.

Pro:

Possibly better audio than using the radio signal paths, because there’s no AM or FM signal processing happening (but see below).

Simpler than any of the other options besides the AM patch.

Cons:

Whatever processing the DSP does to shape each single stereo channel over the two different audio feeds it sends to the amp for that channel is lost, so just duplicating one stereo channel over both of those won’t sound as good, and maybe would sound worse than the FM method.

High potential for weird analog interference or ground loop problems.

Because the head unit gets entirely bypassed, all stock volume controls in the car will stop functioning (particularly the steering wheel controls), and you lose the ability to adjust bass & treble response and balance & fade.

Conclusion: Unacceptable! Next!

Method #4: Utilize the Hidden AUX Pins

The DSP chip is a fairly common one that’s used in many different models across a few manufacturers, so it does have pins on the chip for a dedicated AUX input. It’s possible to solder in the AUX signal to those pins, and then program a microcontroller to grab master on the communication bus and tell the head unit to switch over to them. This was initially very promising to me, but after more reading & thinking I’ve soured on it.

The primary problem is that, because the head unit was designed without an AUX input in mind — there wasn’t even a factory AUX option — the AUX signal goes through the same audio processing path as whatever input the head unit was using before you tell it to switch to AUX. For example, if it’s in FM, and then you make it switch to AUX, all the FM signal processing in the DSP is still active. Nobody on the forum seemed to try using CD as the prior mode, so I don’t know if that’s even an option. It’s possible that using the CD mode before switching doesn’t work at all, because the CD player has a digital output signal. This means that I’d still be subject to some of the same sound quality issues as in options #1 and #2.

Pro:

Keeps all stock audio controls (including EQ and fade/balance) functional.

Con:

Long-term reports from people with this solut indicate that the strength of the FM/AM signal will affect the radio-compensation processing done by the DSP, so you get effectively get a random EQ on your AUX signal, and I’m not sure if it gets better or worse on an empty frequency.

Conclusion: If I was going to accept radio-ish quality and managing the radio frequency, I’d just get an FM modulator and save a lot of work. Butts!

None of These Options Satisfy Me

At this point I’m starting to get pessimistic. All of these solutions have major drawbacks that are making me lean towards just buying the dang GROM kit. And they were all figured out in the first two years of the thread (2008 to 2010), before there were even aftermarket solutions available. After a handful of people successfully implement option #4, there’s many years of talking about new aftermarket solutions and some futzing about with FM modulators. Then in 2016, a new guy called “wchpikus,” who clearly has embedded software experience, shows up. He resurrects the thread by going back to a technique that the people who developed the hidden AUX pin method dismissed six years prior as “ugly” and making it work.

Method #5: Pretend to Be the CD Player

The CD player sends a digital audio signal straight to the DSP, and the DSP doesn’t have to do any weird processing on it like with the radio signals. So this method encodes the AUX to the digital audio format the CD player uses (which is a very common one), and swaps the digitally-encoded AUX signal in to the head unit in place of the CD feed by way of some relays.

Now we’re talking! This is as close to CD-quality as you can get if you’re starting with an analog signal. It’s happening before the DSP, so all of the stock audio controls work (including EQ/fade/balance). An added bonus is that the digital encoding means I only have to worry about analog electrical interference in the cable itself and where it connects to the Audio to Digital Converter chip (ADC), which is great because I don’t actually understand how electricity behaves beyond I=RV.

There is a catch: the CD player mutes the DSP’s output by using a separate control channel. This happens whenever:

there’s no CD playing;

the CD is being inserted/removed;

between tracks with a gap;

and when the CD finishes and it loops back around to the start;

but I can burn a dummy CD with one long silent track, and only have the sound cut out for 5-10 seconds every hour. This is an acceptable downside given all the other upsides of this approach.

Even this catch is surmountable, because wchpikus and another guy managed to figure out the particular values in the I2C communication bus between the CD player and the DSP. This means I can program a microcontroller to play the part of the CD player that never sends a mute command when the AUX is being fed in.

In summary, this is the perfect solution: a wired AUX without any weird signal processing, that still preserves all the stock audio controls. In the final stage, it’s completely independent of the behavior of the stock audio inputs: the audio is unaffected by radio strength and not subject to random muting by the CD player. It also has the advantage that I can get 90% of the benefit by doing half (or less) of the work and burning a blank CD, at which point I can see whether I think doing the second round of work to prevent the few seconds of muting every hour or so is worth it.

The Plan

I haven’t done microcontroller programming and sniffing SPI & I2C communications in a few years now, but I’ve missed it and I’ve been looking for an excuse to get back in. This is it!

Because this sort of thing has been a hobby of mine for a while, I have most of the necessary pieces already.

The Parts

A tiny Arduino clone will serve as the brains. Much less powerful than your average coffee maker these days, but it’s amazing what you can do with a 16 MHz chip when your code controls literally everything it’s doing (no OS on it) and there’s no slow parts (even memory access only takes a handful of clock cycles!). It’ll be more than sufficient for this.

Kinja'd!!!

The Analog to Digital Converter (ADC) is the only thing I didn’t have already. That will be handled by this pre-assembled board I bought from a guy in Portland who designs and sells all sorts of hobby electronics stuff:

Kinja'd!!!

I even have a bunch of relays lying around, too. They’re not the best kind for this application, and they’re much beefier than they need to be, but for prototyping, they’ll do just fine while I wait for more suitable ones to be shipped from China.

Kinja'd!!!

Then there’s, you know, a bunch of random things like proto boards, wires, resistors, capacitors, diodes, light-emitting diodes, etc. Boring stuff.

The Steps

First I need to figure out how to get the toolchain set up to program my Arduino clone. It’s been a while since I did this on my Linux laptop, but I’d like to use that instead of my work Mac laptop. Hopefully this won’t take too long but, you know, Linux.

Then I’ll program the Arduino to configure the audio encoder chip properly. It uses the common I2C/TWI protocol for control communications, but it’s capable of many different analog to digital or digital to analog conversions, as well as rudimentary signal processing, so I need to spend some quality time with the datasheet to figure out how to set it up to do nothing but convert the analog input to 16-bit right-justified I2S.

Once the audio chip seems to be set up, I’ll assemble a big proto board with the Arduino, the audio chip, three relays, and something to provide power.

The final step will be taking out the integrated CD player / head unit / amp, rerouting the three wires that carry the CD’s digital audio signal into the proto board, soldering the three wires of my board’s output into the head unit, and plugging the head unit back in. Then I turn it all on. If I’m lucky, I’ll be done heahahahaha, who am I kidding, even if I’m lucky there will be troubleshooting (hopefully not too much).

My deadline for this is the Spring Oppo Cruise in a bit over a month. It might be an optimistic schedule, especially considering that I’m trying to adopt a dog right now too, but I’ve done more complicated electronics projects than this before and I have plenty of free time at the moment. You’ll be sure to hear about it one way or the other. Wish me luck!


DISCUSSION (13)


Kinja'd!!! facw > Future Heap Owner
03/23/2019 at 11:10

Kinja'd!!!0

Good luck!


Kinja'd!!! Future Heap Owner > facw
03/23/2019 at 11:16

Kinja'd!!!0

Thanks!


Kinja'd!!! FSI > Future Heap Owner
03/23/2019 at 11:35

Kinja'd!!!0

Phew, that sounds quite like an ambitious plan so good luck. I recently installed a bluetooth streaming module that tricks the radio into thinking the cd changer is connected. All it took was 35 bucks and about the same amount of time (could’ve been much faster though) and boom, my in car audio game was finally in the 21st century.

Was your Volvo model ever offered with a factory cd changer? If so maybe there's a simple solution as mine.


Kinja'd!!! JawzX2, Boost Addict. 1.6t, 2.7tt, 4.2t > Future Heap Owner
03/23/2019 at 11:37

Kinja'd!!!1

Awesome! This is the sort of fun project I can really get behind :) I’ve been spending a lot of time with arduino nanos these days, making data-base reporting livestock scales, chicken coop automation systems, RFID-controlled remote database access grain supplementatio n systems (work in progress), and automated yarn skein winders... (who ever says farming is a low-tech endeavor hasn’t seen modern farms!) I love this data injection hack! I would have thought it’d be easier/cheaper from a hardware standpoint to do a bluetooth to PCM conversion... I bet theres even already code out there to inject CD text data into the stream from the bluetooth data... But if you want to have an analog input jack, I guess you cant do that. Are you planning to use solid state relays in your signal swapper, or just sone nice little mechanical units? 


Kinja'd!!! Future Heap Owner > FSI
03/23/2019 at 11:43

Kinja'd!!!0

A factory 6-CD changer was an option . Apparently that makes it even more complicated. The first aftermarket products that were offered for this only supported the single-cd stereo, not the one with the changer. The CD player is directly integrated with the head unit, so there’s not an easy way to intercept the signal like in your car. As far as I know, this method I’m doing (which will involve splicing a ribbon cable) is  the only way of doing that.


Kinja'd!!! TheRealBicycleBuck > Future Heap Owner
03/23/2019 at 11:46

Kinja'd!!!1

Interesting read. I always thought it would be fun to get deeper into electronics, but I never set up a good work bench or bought anything beyond the basics. I have a Raspberry Pi, but all of my Pi  projects have been software-based. I’m looking forward to living vicariously through your project!


Kinja'd!!! Future Heap Owner > JawzX2, Boost Addict. 1.6t, 2.7tt, 4.2t
03/23/2019 at 11:53

Kinja'd!!!1

I’ve long heard about how technical farms have been getting in the last few decades. You should post about some off those! I’d like to hear more about the RFID grain system (radio of all kinds is still a black art to me).

The guy on SwedeSpeed ended up going Bluetooth, because like most people he prefers that and you’re correct that there are lots of boards out there for Bluetooth -> I2S. But this AUX is primarily for my iPod, because being flash-modded to 256 GB of storage (right now) it’s the only way I can have all of my 140 GB of music without having to worry about cell reception.

I dunno on the relays. Solid state would be better, because space is a bit of a concern (I would like to mount the hardware  inconspicuously inside the dash somewhere), and I need to relay 5 wires total. But price is also a factor. Though probably the solid state ones are pretty cheap too. I’ll probably order them early next week (from eBay).


Kinja'd!!! FSI > Future Heap Owner
03/23/2019 at 11:56

Kinja'd!!!0

That would make it really complicated, true. Good luck with your plan, I really hope it will work out for you;)


Kinja'd!!! Future Heap Owner > TheRealBicycleBuck
03/23/2019 at 11:58

Kinja'd!!!0

If you wanna get back in, a good starter project is to get an Arduino, some relays, and either some light or distance sensors or a Bluetooth/ WiFi board, and then think of something around your house that you’d like to be able to turn on & off on a schedule, in response to light/movement, or   from your phone or computer.

But if you ain’t got the time for that, I can promise lots of detail on my progress with this project.


Kinja'd!!! Future Heap Owner > FSI
03/23/2019 at 11:58

Kinja'd!!!1

Thanks, me too!


Kinja'd!!! JawzX2, Boost Addict. 1.6t, 2.7tt, 4.2t > Future Heap Owner
03/23/2019 at 12:33

Kinja'd!!!0

Well, if you were asking me, and you are, I would tell you that the RFID part is the easy bit, as it’s all handled by commodity hardware that’s already set up with minimized/simplified interfaces and tuning systems. The real hard part is getting the RFID ear tags. I still haven’t been able to source sheep-size tags in the USA, only cattle-size, and the ones from Australia and New Zealand end up being prohibitively expensive with shipping and duty :p The simple bit is getting the reader to ping the tag and return it’s serial, that’s the basic functionality of the system and easy as turning the power on. The real- real tricky part is querying the database, returning the response, and then executing delivery... I am, if I’m generous, a mediocre coder, and realistically pretty poor. I’m still waffleing on going with the robust, flexible, adressi ble hardware of an Arduino/Atmel microcontroller system or picking up a Raspberr y/Orange Pi, and learning the subtleties of tieing the GPIO/AD C hardware into a bash script (which I’m much better at than “real”coding) for ease of external interface... It just feels like I shouldn’t have to fall back on shell utilities for things as simple as some POST & GET urls... I mean Lin ux-Raspb ian is so bloated ;) The CPU has to have like, MEGABYTES of RAM!


Kinja'd!!! TheRealBicycleBuck > Future Heap Owner
03/23/2019 at 15:38

Kinja'd!!!0

I’m not sure what my next project will be, but that’s a good idea. 


Kinja'd!!! Future Heap Owner > JawzX2, Boost Addict. 1.6t, 2.7tt, 4.2t
03/23/2019 at 18:58

Kinja'd!!!0

Hahaha, I know what you mean about how a Pi can feel like such overkill. But it’s still fairly low-power, and it’ll be a lot easier to throw something together on the Pi. I haven’t done any GPIO pin stuff on the Pi myself, but my understanding is that it’s pretty easy to do, at least from Python (which is a super easy language to pick up, esp if you know bash already).