Aaron K limitedslip.net

AudiO

Update: It is in a box - no longer have the Audi. If I get something new for the Subaru, it'll be based around a cell phone instead.

So I had been thinking of building a mp3 audio player for my car for some time now, but never could quite convince myself it would be worth it, primarily due to the lack of a usable interface in a car.

Well, once I bought the A4, I found out the stock stereo system has support for an external changer, and that with a bit of work, I could make the mp3 player operate like and emulate a normal cd changer. Then, the primary interface would be the stereo itself. Perfect - this was all I needed to get started.

Requirements

Before I built anything, I knew there was a few requirements I wanted to meet, after reading about numerous other mp3 player and in-car computer projects. These are:

  • It had to be small. I did not want a ATX sized case taking up room in the trunk area.
  • Along the lines of the first one: No big power inverters. No point in going from 12V DC to 120V AC back to 12V DC. So this ruled out any off the shelf computer power supplies.
  • Back to the user interface: I didn't want to install any keyboard (wireless or not), LCD monitor, mouse, etc. In short, it had to some extent feel like part of the car.
  • It should be relatively cheap, preferably under $200-$300 (max).
  • Use off the shelf components where applicable. Many of my projects end up creating sub-projects, and nothing gets finished. So, use what is already built as much as possible.

System Board


Before this project even got started I had identified what main board I wanted to use. I was just looking for an excuse to buy one.

This is an Intel XScale based board out of a Linksys product. Basically, it has these peripherals/specs out of the box:

  • 8MB Flash
  • 32MB SDRAM
  • 2 USB 2.0 Ports
  • 1 Network port
  • Running at 133Mhz

With a slight bit of modification, it now has:

  • 3 additional USB 2.0 ports (the extra wires running off the top)
  • 1 Bidirection serial port (used for console access)
  • 1 Receive only serial port (currently unused)
  • Running at 266Mhz

As you can see in the second and third pictures, I brought the extra ports out on a header.

The board was never powered up with the Linksys firmware; it was out of the box, and reflashed with a Linux 2.6 kernel. :)

Stereo Interfacing

Mostly for my own reference, the pinout of this cable is as follows. The pin number corresponds to the multipin connector, the wire color to the wire inside the mp3 player case. CDC refers to the CD Changer.

  1. CDC Data In (Green/Black)
  2. CDC Data Out (Green)
  3. CDC Clock (Blue)
  4. CAN High (White)
  5. CAN Low (White/Black)
  6. Battery (Orange)
  7. Battery (Red)
  8. Switched Battery (Red/Black)
  9. Ground (Black)

The multiple battery lines (pin 6 and 7) were originally put place in case I want to pull more power than a single 22 guage wire in the cable reasonable hold (0.92A max). Of course, there is only one ground wire, so that makes it a bit pointless (oops). This is a non-issue because the project is currently fused at 1A.

The CAN bus lines are currently unused, but provide connection to the Audi Infotainment CAN bus.

Changer Emulation

To emulate a Audi changer, which uses the same protocol as the panasonic changers, I'm using the firmware the guys at http://www.k9spud.com/vwcdpic/ developed, with a number of modifications of my own:

  • Accept serial commands to change the display (time, track, cd #). The stock firmware is primarily intended for simple audio input enabling, not a full mp3 player capable of managing the display on its own. This way, for example, when a track changes on the mp3 player, the display is immediately updated. There was no support for this feature.
  • Various button remappings for Symphony II stereos.
  • Remove all bit banging serial routines. The microcontroller I am using has a full serial UART, so this isn't necessary.

Once I finalize the changes to the firmware, I'll post them here (project is under GPL).

See the Developers Area on the VWCDPIC site for more information about their project.

Peripherals

This board pretty much only has USB, so anything I attached to it (other than the serial console port) had to be USB. The two peripherals it was missing: audio output, and mass storage (for the mp3s). Actually, there is one other not mentioned, a simple USB to serial adapter that is used to connect the changer emulator.

For audio output, I'm using a Turtle Beach Audio Advantage micro device. This works well with the stock linux kernel, since it correctly supports the USB audio device specification. I'm getting a slight bit of distortion on some select frequencies, which I haven't tried to track down yet. Other than that, it has worked well.

For storage, I've enclosed a 30GB 2.5" IDE drive in a USB2 enclosure, made by coolmax. This was picked up from a local Fry's. The drive was loaned to me by a friend (thanks Lorin!) since my 10GB one started getting IO errors on it, and wouldn't hold all my music. The 5V line to this device is connected straight to the power supply, instead of the USB port, so I don't have to worry about it drawing more than the 500mA maximum on the USB port.

Case Construction

Originally, I intended to just buy a case and put everything it in, but I was unable to find one that fit the specific size requirements I had. There is a shelf in the glove box that is the perfect location for this computer, so the case was designed to fit there. Its approximate size is 7" x 5" x 1.5".

The cost of the acrylic pieces, purchased at Tap Plastics, was $9, and the aluminum top and bottom panels were $12, cut to size at Metal Supermarkets (both local stores). Miscellaneous screws, standoffs, and other hardware brought the case price to around $30.

AudiO case
The case is constructed of 1/8" aluminum and acrylic. As shown here, the sides are acrylic, and are glued together.
The case is constructed of 1/8" aluminum and acrylic. As shown here, the sides are acrylic, and are glued together.
To affix the top and bottom aluminum panels, small drilled and tapped acrylic cubes are glued in the corners.
To affix the top and bottom aluminum panels, small drilled and tapped acrylic cubes are glued in the corners.
The one of the aluminum panels screwed in. Note the countersuck screws!
The one of the aluminum panels screwed in. Note the countersuck screws!
The bottom aluminum panel, with standoffs mounted, and the external hard disk USB port.
The bottom aluminum panel, with standoffs mounted, and the external hard disk USB port.
The bottom aluminum panel, mounted in case, with all the external connections installed.
The bottom aluminum panel, mounted in case, with all the external connections installed.
   


Completed

Comments (1) Trackbacks (0)
  1. Nice proyect !!, i´m trying to make one iPod-Cd emulator with Pic 12f but the web of vw cdpic is no more available, i´m looking the v3 source codes for iPod control, if you have asm files saved for vwcd pic i will be grateful if you can send me!.

    Regards,


Leave a comment

No trackbacks yet.