Project picture

Project picture

Tuesday, January 20, 2009

The Programming - improvements

I used my project for some months now, and everything works very stable!

However, there are a few minor bug with the track-strings (TRACK/ARTIST/ALBUM):
  • The strings don't always refresh, but pressing play/pause solves this problem.
  • Showing some special characters is not handled. The iPod sends al characters as unicode. They need to be converted.
Though, I made some improvements to the LCD/FFT-part:
  • Now I use the ATMega644P. This one hase more RAM; I can use 10 bits A/D-samples now.
  • The output scale of the spectrum is now logarithmic. The spectrum looks better now.
The project source code is updated, and the location of the code is still the same. If you click the links in the previous posts, the code will be up-to-date.

Saturday, September 6, 2008

The programming

The project uses 2 microcontrollers from Atmel. In the main project, we use an ATMega162; in the LCD/FFT project, we use an ATMega32.

All the code is written in AVR Studio with AVR-GCC. The microcontrollers are programmed with an Atmel STK500.

The source code can be downloaded at the following location:

The electronics

In my project, there are several parts that were implemented. Hereby, I summarize some things:
  • Automatic detection by the Ford head unit
  • Control of the iPod through iPod Advanced Remote commands. These commands are triggered by the commands of the head unit:
    • automatic power on/power off
    • automatic play/pause when selecting the CD-changer-input
    • automatic play/pause on mute from the car kit
    • skip next track and previous track
    • FF and REV
    • buttons '1' to '6': toggle play/pause, toggle shuffle, skip 3 albums fwd and rev, skip 1 album fwd and rev
    • display an own logo
  • Automatic charge of the iPod
  • Balanced audio input to eliminate noise
  • Graphical external display:
    • Show track info: title, artist and album
    • Show position in playlist
    • Show elapsed/remaining/total time
    • Show shuffle status
    • Show play status
    • Show spectrum analyzer

I made 3 PCB's:

  • Power supply with delayed power-off
  • Main PCB:
    • Interface for the ACP-port
    • Interface for the iPod-port
    • Unbalanced-to-balanced audio driver
  • Display PCB:
    • A/D conversion with FFT
    • Display driver
The main project - schematics (zipped EAGLE-project):

The main project - PCB (PDF):

The FFT/display-project - schematics (zipped EAGLE-project):

The FFT/display-project - PCB (PDF):


Assembly in the car

Now that the connectors have been soldered, everything can be assembled in the car.

I mounted an iPod-dock in the cigarette tray. Because I use a dock, I can plug my iPod-dock-connector and a 3.5mm audio jack at the rear of the dock.

Afterwards, I mounted an graphical LCD in the car, and I put back the radio on its place.

All the cables are coming together in the locker, where the project housing can be mounted. The cables from left to right are: LCD-connector (DB25), audio (cinch), USB for iPod power, communication with iPod (DB9), communication with head unit (DB9). More info on the connectors can be found in this document.

Connection of the iPod

To make the connection to the iPod, I ordered a dock-connector at The layout of the iPod-connector could be found at, but this site is now suspended. You can browse the internet, an certainly you will find info on the pin numbering.

In my case, I soldered 3 cables to the connector: one for the iPod-communication, one for the power and one for the audio.

You can find info on the connections to be made in this file.

Here is a picture of the iPod-connector:

Connection of the head unit

Because I didn't find a connector to connect with the head unit, I decided to open my radio, and solder some wires. Now I'm using a female DB15-connector at the side of the car radio. This also allows me to use the power lines from my head unit.

You can find info on the connections to be made in this file.

Below are some pictures of the head unit: