New to posting to the forum here, hi all, I'm Jay. So I bought an 88 325is last year that is all stock except for the head unit. I like the convenience of Bluetooth as much as the next guy, but it's flashy and kind of distracting, and really, I just need a project on a car that I otherwise want to keep stock.
So a few months ago I thought, wouldn't it be cool if one of the factory radios could have been designed with today's guts: looked the same, interfaced basically the same, but had Bluetooth input, preamp outputs, better EQ control, etc. I started looking around online and couldn't find anyone that's done such a thing, so that's usually when I decide it's time to do it :D This thread is to document the project. Warning: it gets nerdy and electronics-y, its E30 audio on the micro scale, and may not be of interest to everyone, but why not document?
First question: Which radio do I start with? This one was obvious. For the right look and cool 80s gadgetry, the slider radio wins in my book:
So the project basically boils down to reverse engineering the user interface of the factory unit, then using a new, programmable computer to control the user interface and drive a new audio system that includes BT input. The trick is that I only want to add functionality, I want it to behave as if it had BT input and better audio control from the factory, but have that coexist with the existing AM/FM/WB radio. Given that, I came up with this flow chart showing what hardware must be added and roughly how signal will need to flow:
The idea is I'll insert myself between the original microcontroller (MCU) and the front panel, so that I now have ultimate control over the front panel, but have the ability to act in a passthrough mode to preserve existing functionality. My plan is to add BT as just another 'band' in the list you scroll through with the band button, triggering who is driving the front panel depending on the input source. IR slider and EQ controls will always be handled by me now, with replicated but extended controls like a 'SUB' level and 5-band EQ or so.
I'm going to use a Raspberry Pi and an Arduino in conjunction, mainly because the Arduino is easy to program to do hardware-y things like take a voltage sample of a volume pot or control LEDs, whereas the Pi is a stout-enough mini-computer that runs Linux and therefore has Bluetooth and audio support. They'll communicate via serial port and the Pi will output to a USB sound card ultimately leading to a 4 channel amp. Also not drawn will be a sub channel output.
On to the reverse engineering! I bought a nice CM5908 unit on ebay and tore in. I found that the display is mounted on its own circuit board that plugs into the motherboard, then all the front panel connection comes through a flat flex cable:
Cassette deck removed and front panel unplugged, display also removed:
My initial idea was to run ribbon cables out of the unit and house all my new guts outside the unit so that I kept every bit of original function. Somewhere early, I realized that that was going to be very difficult, and would be fixed by removing the cassette deck.. Doing so clears up enough room to put everything except the sound card in the original case, just running a USB cable out for that. That's the plan for now.
First thing I tackled was hack the display. I needed to find a good place to break the connection between the original MCU and the display, inserting myself in the middle. Really the only place to do this is in the connection of the display's circuit board (PCB) to the motherboard. Here was my solution there:
As it was, display is face down, white connector on the end plugs into the motherboard:
After that, I was able to use the ancient data sheet for the Sanyo chip that drives the display along with the Arduino to successfully control it and write something brand new to its screen. First success!
Hacking the main connector for the front panel was next. I made some breakout boards so I could wire out the pins to a breadboard in order to figure out what pins were doing what.
Here I think I just found the LED control pins using the logic analyzer on the Mac.
Turns out a single chip controls the slider LED bar and the LEDs for buttons 1-6 via some serial SPI data just like the display.
I struggled for awhile at this point figuring out how the button presses were being read until I learned about multiplexed button arrays. Who knew? I still need to implement that but at least know the path forward now.
Last on the front connector: the slider. I had no idea what to expect with this one as far as what and how that data was signaled to the MCU. Got out the oscilloscope and ended up finding a pin that has 4 little pulses being sent about every 20ms. Depending on where you put your finger on the slider, your attenuate one of the 4 sensors voltages.
I had to learn about some analog circuitry to help me sample the peaks accurately, but I finally got that going last weekend. I also found where I can grab the regulated voltage from the volume pot for sampling.
That's basically up to where I am today. All reverse-engineering is done, now I just need to make it all fit together and work :) First thing is to design and print a PCB that will mount in the enclosure on the old cassette mounting bosses and hold the Arduino and Raspberry Pi, analog circuitry, and all the routing wires. Then it essentially becomes a software project.
More updates to come! Input welcome.
So a few months ago I thought, wouldn't it be cool if one of the factory radios could have been designed with today's guts: looked the same, interfaced basically the same, but had Bluetooth input, preamp outputs, better EQ control, etc. I started looking around online and couldn't find anyone that's done such a thing, so that's usually when I decide it's time to do it :D This thread is to document the project. Warning: it gets nerdy and electronics-y, its E30 audio on the micro scale, and may not be of interest to everyone, but why not document?
First question: Which radio do I start with? This one was obvious. For the right look and cool 80s gadgetry, the slider radio wins in my book:
So the project basically boils down to reverse engineering the user interface of the factory unit, then using a new, programmable computer to control the user interface and drive a new audio system that includes BT input. The trick is that I only want to add functionality, I want it to behave as if it had BT input and better audio control from the factory, but have that coexist with the existing AM/FM/WB radio. Given that, I came up with this flow chart showing what hardware must be added and roughly how signal will need to flow:
The idea is I'll insert myself between the original microcontroller (MCU) and the front panel, so that I now have ultimate control over the front panel, but have the ability to act in a passthrough mode to preserve existing functionality. My plan is to add BT as just another 'band' in the list you scroll through with the band button, triggering who is driving the front panel depending on the input source. IR slider and EQ controls will always be handled by me now, with replicated but extended controls like a 'SUB' level and 5-band EQ or so.
I'm going to use a Raspberry Pi and an Arduino in conjunction, mainly because the Arduino is easy to program to do hardware-y things like take a voltage sample of a volume pot or control LEDs, whereas the Pi is a stout-enough mini-computer that runs Linux and therefore has Bluetooth and audio support. They'll communicate via serial port and the Pi will output to a USB sound card ultimately leading to a 4 channel amp. Also not drawn will be a sub channel output.
On to the reverse engineering! I bought a nice CM5908 unit on ebay and tore in. I found that the display is mounted on its own circuit board that plugs into the motherboard, then all the front panel connection comes through a flat flex cable:
Cassette deck removed and front panel unplugged, display also removed:
My initial idea was to run ribbon cables out of the unit and house all my new guts outside the unit so that I kept every bit of original function. Somewhere early, I realized that that was going to be very difficult, and would be fixed by removing the cassette deck.. Doing so clears up enough room to put everything except the sound card in the original case, just running a USB cable out for that. That's the plan for now.
First thing I tackled was hack the display. I needed to find a good place to break the connection between the original MCU and the display, inserting myself in the middle. Really the only place to do this is in the connection of the display's circuit board (PCB) to the motherboard. Here was my solution there:
As it was, display is face down, white connector on the end plugs into the motherboard:
After that, I was able to use the ancient data sheet for the Sanyo chip that drives the display along with the Arduino to successfully control it and write something brand new to its screen. First success!
Hacking the main connector for the front panel was next. I made some breakout boards so I could wire out the pins to a breadboard in order to figure out what pins were doing what.
Here I think I just found the LED control pins using the logic analyzer on the Mac.
Turns out a single chip controls the slider LED bar and the LEDs for buttons 1-6 via some serial SPI data just like the display.
I struggled for awhile at this point figuring out how the button presses were being read until I learned about multiplexed button arrays. Who knew? I still need to implement that but at least know the path forward now.
Last on the front connector: the slider. I had no idea what to expect with this one as far as what and how that data was signaled to the MCU. Got out the oscilloscope and ended up finding a pin that has 4 little pulses being sent about every 20ms. Depending on where you put your finger on the slider, your attenuate one of the 4 sensors voltages.
I had to learn about some analog circuitry to help me sample the peaks accurately, but I finally got that going last weekend. I also found where I can grab the regulated voltage from the volume pot for sampling.
That's basically up to where I am today. All reverse-engineering is done, now I just need to make it all fit together and work :) First thing is to design and print a PCB that will mount in the enclosure on the old cassette mounting bosses and hold the Arduino and Raspberry Pi, analog circuitry, and all the routing wires. Then it essentially becomes a software project.
More updates to come! Input welcome.
Comment