Welcome to the North American Subaru Impreza Owners Club Friday July 1, 2016
Home Forums WikiNASIOC Products Store Modifications Upgrade Garage
NASIOC
Go Back   NASIOC > NASIOC General > Car Audio, Video & Security

Welcome to NASIOC - The world's largest online community for Subaru enthusiasts!
Welcome to the NASIOC.com Subaru forum.

You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, free of charge, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, so please join our community today!

If you have any problems with the registration process or your account login, please contact us.
* Registered users of the site do not see these ads. 
Closed Thread
 
Thread Tools Display Modes
Old 08-04-2013, 04:22 AM   #1
leftsquarebracket
Scooby Newbie
 
Member#: 359087
Join Date: Jun 2013
Chapter/Region: MAIC
Location: NC/MA
Vehicle:
2002 WRX S/W
WRB

Default MOD: '02 WRX, auxiliary input WITH iPod control

I made an interface that enables an audio input for the CN702 jack in the back of the Matsu****a/Panasonic headunits in the early '00 models.

Yes, it requires absolutely NO modification to the headunit itself.

There has been discussion over how to add a line-in to these Panasonic headunits now for more than a decade (1, 2, 3, 4, 5), and in many, many hours over a month throwing my google-fu at the problem, nobody had actually posted that they had done this. If they had, there weren't even dead URLs floating around elsewhere referring to them. There's one thread on the AVRFreaks forums that describes some of the protocol, and unless you register you can't see that you can download the bus logs. And even for those there's NO direction information. I annotated them here (Google Docs).

The other solutions were similar to the Jazzy Engineering one, CDs playing in the HU (silent or the audio switched) to work, and did only audio. No controls.

It took probably two weeks of late nights to figure out how the data got passed around. My testing rig consisted of an Arduino, a couple of breadboarded components for the data bus, and an ATX power supply driving both. This shows the Arduino actually successfully posing as a CD changer, the 44:55 time hardcoded:


I found a 15-foot cable that had the mating CN702 connector on one end off of eBay, intended for adding a (presumably) trunk-mounted Panasonic CD changer in a Mazda. All the pins were in the right spots! I lopped off the other end and put my own connector on.

Since the microcontroller and power supply are an integral part of this, I figured there was no point in not adding an iPod interface, too. With a basic 3.5mm jack and an iPod, I decided a relay to switch the audio signals was necessary as well. It got a little more packed than I expected, and if I did it again I'd definitely get a bigger box and/or whip up a PCB to cut down on wire count.





I currently have it set up to show a time stamp of A:0A to indicate that the 3.5mm aux jack is in use, as shown:



The price on the bill of materials below is kind of steep, but a lot of that is in the cable and parts that added extra features. To make a simple line-in, things are much simpler and more compact. This could also be built upon for any sort of audio input, like a carputer, Bluetooth audio, or probably even Zunes or Android devices.


What do you guys think?
* Registered users of the site do not see these ads.

Last edited by leftsquarebracket; 08-07-2013 at 12:37 AM.
leftsquarebracket is offline  
Sponsored Links
* Registered users of the site do not see these ads.
Old 08-04-2013, 04:23 AM   #2
leftsquarebracket
Scooby Newbie
 
Member#: 359087
Join Date: Jun 2013
Chapter/Region: MAIC
Location: NC/MA
Vehicle:
2002 WRX S/W
WRB

Default

The Technical Stuff

These Panasonic headunits use a modified version of Alpine's M-Bus. It's a bidirectional half-duplex bus, where each bit lasts 3ms and a 0 or 1 is determined by how long the bus is held low.

What's different?
- It operates at 5V instead of 12V. Good for microcontrollers!
- The HU and changer addresses are different
- The ping sequence is entirely different, and almost looks like more of a type enumeration.
- The playback control commands seem different. Play/pause, fast-forward, rewind, and resume normal play.

Other than those, the structure and CRCs are the same. Numbers are represented as binary coded decimal, so such that hex values like 0x68 represent decimal 68 instead of decimal 104.

Here's a detailed breakdown of what gets transferred on the bus. (Google Drive/Spreadsheets)

Here's the code on GitHub

Schematic


Bill Of Materials (more complete version here)
Special Purchases
  • 1x 15' Mazda CD changer cable - eBay ($35)
  • 1x Teensy 2.0 - PJRC ($16)
  • 1x adjustable voltage regulator board - Amazon ($6)
  • 1x DIN-7 male plug - DigiKey
  • 1x DIN-7 female socket - DigiKey
  • 1x 3.5mm headphone jack - DigiKey
  • 1x DPDT latching signal relay - DigiKey
  • 1x SPDT mom-off-mom toggle switch - DigiKey
  • 1x MiniDIN-8 female socket - DigiKey
  • 1x MiniDIN-8 male plug and cable assembly - DigiKey
Parts I already had
  • 1x iPod dock connector and housing, originally from Sparkfun
  • 2x Green 3mm LEDs and 220 ohm resistors
  • 1x 10 kohm resistor
  • 1x 4.7 kohm resistor
  • 1x N-channel MOSFET
  • 1x PNP transistor
  • Assorted wire, screw terminals, heat shrink, hot glue, etc.

Last edited by leftsquarebracket; 09-10-2013 at 01:34 AM. Reason: thought I put more complete info in before :/
leftsquarebracket is offline  
Old 09-09-2013, 06:58 PM   #3
compu829
Scooby Newbie
 
Member#: 250363
Join Date: Jun 2010
Default

good work! I was working on this off an on for my 99 Legacy. Any chance you could post the source code?

I noticed that this protocol appeared to match the Honda protocol. (I am guessing it is all modified Alpine M-Bus), except the Honda box runs at 12v.
compu829 is offline  
Old 09-09-2013, 11:01 PM   #4
SVXdc
Scooby Specialist
 
Member#: 25837
Join Date: Oct 2002
Chapter/Region: South East
Location: Atlanta, GA
Vehicle:
1996 SVX L AWD
Laguna Blue Pearl

Default

Great job!
SVXdc is offline  
Old 09-10-2013, 01:52 AM   #5
leftsquarebracket
Scooby Newbie
 
Member#: 359087
Join Date: Jun 2013
Chapter/Region: MAIC
Location: NC/MA
Vehicle:
2002 WRX S/W
WRB

Default

Quote:
Originally Posted by compu829 View Post
good work! I was working on this off an on for my 99 Legacy. Any chance you could post the source code?

I noticed that this protocol appeared to match the Honda protocol. (I am guessing it is all modified Alpine M-Bus), except the Honda box runs at 12v.
I thought I had edited my post to include that before. Anyways, here ya go! https://github.com/kjanesch/pseudochanger
Sorry that it's a bit messy. I seem to be demanding too much with my 64-bit math, so some stuff is hardcoded.

The handshaking seems to be the major difference, at least for these HUs. I didn't see anything else that worked quite the same.

Quote:
Originally Posted by SVXdc View Post
Great job!
Thanks!
leftsquarebracket is offline  
Old 10-26-2013, 02:20 PM   #6
hwwoo
Scooby Specialist
 
Member#: 234612
Join Date: Jan 2010
Chapter/Region: SCIC
Location: La Jolla, SD
Vehicle:
2005 WRX
PSM

Default

i've been looking for this, thank you. Jazzy's solution was clever but not attractive to me.
hwwoo is offline  
Old 10-28-2013, 02:26 PM   #7
leftsquarebracket
Scooby Newbie
 
Member#: 359087
Join Date: Jun 2013
Chapter/Region: MAIC
Location: NC/MA
Vehicle:
2002 WRX S/W
WRB

Default

Quote:
Originally Posted by hwwoo View Post
i've been looking for this, thank you. Jazzy's solution was clever but not attractive to me.
Glad it helps! Are you rolling your own?
leftsquarebracket is offline  
Old 10-28-2013, 05:01 PM   #8
indirection_
Scooby Newbie
 
Member#: 349415
Join Date: Mar 2013
Chapter/Region: NESIC
Location: Western MA
Vehicle:
2002 WRX
WRB

Default

Nice job! I have been looking for a solution like this!
indirection_ is offline  
Old 05-18-2015, 09:39 AM   #9
danube7
Scooby Newbie
 
Member#: 421490
Join Date: May 2015
Default

Hi Leftsquarebracket, Are you still active here? I find myself in a dilema. My 2003 Outback legacy is getting old. My radio just started having display issues. But I'm told that as of 2015, there are no more Legacys with manual transmission! So I am keeping my car as long as I can, and I like the "little man" in my radio (Weather Band) so I am keeping that as long as I can. It doesn't give me many options to modernize, so your adapter is awesome. Have you been updating the hardware or code? I'd like to learn more about what it does and its limitations. Can you control an ipod (classic) with any of the head unit buttons?

Dan
danube7 is offline  
Old 05-20-2015, 09:48 AM   #10
leftsquarebracket
Scooby Newbie
 
Member#: 359087
Join Date: Jun 2013
Chapter/Region: MAIC
Location: NC/MA
Vehicle:
2002 WRX S/W
WRB

Default

Quote:
Originally Posted by danube7 View Post
Hi Leftsquarebracket, Are you still active here? I find myself in a dilema. My 2003 Outback legacy is getting old. My radio just started having display issues. But I'm told that as of 2015, there are no more Legacys with manual transmission! So I am keeping my car as long as I can, and I like the "little man" in my radio (Weather Band) so I am keeping that as long as I can. It doesn't give me many options to modernize, so your adapter is awesome. Have you been updating the hardware or code? I'd like to learn more about what it does and its limitations. Can you control an ipod (classic) with any of the head unit buttons?

Dan
Ah, Dan, I feel you on the manual transmissions, they're just so satisfying to drive. I'm not super active here, but I do get the email notifications. I am still working on this thing, albeit slowly.

The iPod interface took me like a year of not doing anything before going at it again, but I have finally gotten it working. The catch is that it's a totally different thing, since I'd pulled a couple parts out of that messy box with no regard for putting them back them back. But I did get most of the commands from the stereo buttons figured out and written down before installing everything.

The code has been pretty much unchanged, since I ignored the iPod stuff and some weird behavior with 64-bit integers. As a "dumb" single-input adapter, it's been going strong, I DD the car and it never really has problems. There was a grounding issue, but that just affected the audio, and it was pretty straightforward to fix.

I'm currently working on two boards, one version with 3.5mm and iPod interfaces, with all the parts on one board, and another that'll just be a connector with a 3.5mm stereo jack on it.

I've picked just about all the parts for both, and have most of the layouts done, but it gets put on the back burner pretty frequently. I have managed to get the BOM cost waaay down compared to this first version, though. I even (eventually) found the stereo-side connector.

I have plans to get some more work done on them this summer, and hopefully put together some working boards with working code.
leftsquarebracket is offline  
Old 05-21-2015, 12:54 PM   #11
danube7
Scooby Newbie
 
Member#: 421490
Join Date: May 2015
Default

Hi leftsquarebracket (What's your name by the way?),

thanks for the reply. I only logged in here to get a message to you but that works. drdankoller - at - gmail - dot - com is my regular email.

Please keep me up to date on your newer model, especially the one with the stereo end connector. Do you have a part number for this connector so I can compare it? I would be willing to buy one of your boards to reduce your overall costs. I just can't start a new project from scratch these days. Too many others!

I would probably have to re-write parts of the code though. I have a different model radio. It's probably the P128 as shown here: http://www.buyautoparts.com/plabuyno...FY2QHwodJykAZQ
...but mine doesn't have the "Weather Band" written in red, nor the model number in the lower right. I am just guessing by looks. I'd love it for this radio to be able to browse directories! But I'll settle for just AUX Input. With luck, some of the code might be similar enough to work.

My 2003 Outback wagon is giving me a host of problems lately. Transmission bearings are grinding, I've got oil leaks from multiple gaskets, and I'm due for a clutch and timing belt change. AND my radio's display is on the fritz. But I'm keeping the car another 5 years till I can find a manual I enjoy driving.

Thanks,
Dan
danube7 is offline  
Old 05-21-2015, 03:45 PM   #12
leftsquarebracket
Scooby Newbie
 
Member#: 359087
Join Date: Jun 2013
Chapter/Region: MAIC
Location: NC/MA
Vehicle:
2002 WRX S/W
WRB

Default

Hey Dan, I'm Kevin.

If the forum setup works for you, keeping things here for future reference may be beneficial.

It does look like that stereo is the one that come with the '03s. If that is actually the one you have, the connector is totally different, unfortunately. That's got a DIN13 connector for the auxiliary input, but the one I'm working with is a TE 040 MLC II PLUG HSG ASSY 16P, or p/n 175966-2, and mates with the connector on the left in this image. The data bus wiring is also different, the DIN13 has separate data in and out, clock, and strobe lines. The one I'm working on is one wire.

There's a master thread on these stereos, which has a couple good links for yours. Apparently, any audio you pipe in to yours through that connector plays over everything else all the time, so with a pretty simple cable and a CD of silent audio, a basic input is easy.

Digging down a few layers, someone got a working interface for a Panasonic connector with a similar bus (pinout-wise) to yours, but used a DIN8 connector, here: http://q1.se/cdcemu/. The data format looks pretty close to what I've been working on.

You might be on the edge of your own rabbit hole here, Dan. Or, alternatively, there's compatible head units for your car that have the connector/interface I'm working on, minus the one for the subwoofer. The '00-'02 Outback had stereo P121, which is double-DIN with a six-disc changer and Weather Band receiver. Or there's some that skipped the cassette deck or CD player for cheaper on eBay. It sounds like you've got a lot going on already in need of a wrenching, though.
leftsquarebracket is offline  
Old 05-22-2015, 09:51 AM   #13
danube7
Scooby Newbie
 
Member#: 421490
Join Date: May 2015
Default

Hi Kevin (leftsquarebracket),

yes, it makes sense to keep the conversation here, esp. given that I might have to dissect my Subaru radio at least to fix the display.

Thanks for the master thread link. Yes, I think I found your link through that. However, near the top of the master thread is the ominous comment: "CAUTION: The pin-out of this round jack may be different on radios from different Subaru models/years." So, it appears I will have to do some deciphering of the interface to confirm what type of communications protocal it really uses. It's looking more and more like I am going to have to take the radio out to fix it soon, so I will probably stick a cable in the port and leave the other end out, somewhere I can reach it and probe the pins with a scope when I have more time. I'm also trolling e-bay to see if I can get a real CD changer for my car for ~~$25 or so (with cable). That will help a bit. And it'll be connected to try the silent CD option.

Dont' think I want to change the head unit. I've got the subwoofer system, and this stereo is miles above any other sound system I've ever had in a car. Nice and crisp and clean sounds - better than my hearing anyway, and still need to fix my transmission so I can hear it!

No more wrenching for me on my car. Just wretching as I pay the mechanics' bills. I've had no time to work on my cars myself, so things that make the car go, I let mechanics do. Things that make the car stop (i.e. brakes) I still do myself. And electronics. I don't trust our local mechanics to read the OBD codes and interpret them.

Thanks for the help.
Dan
danube7 is offline  
Old 06-01-2015, 04:06 PM   #14
danube7
Scooby Newbie
 
Member#: 421490
Join Date: May 2015
Default

Hi Kevin,
I mis-spoke. My radio is actually a model 122, but looks pretty much like the 128 I pointed out. Wonder what the differences are.

Anyway, I received a 13 pin DIN connector and a 10' DIN-DIN cable. I'm going to pull the radio to fix the display while I wait for transmission repairs but when I put it back in I'll add the cable to have a conveniently located port to play with, and see if I can add an AUX input as you are doing.

Dan
danube7 is offline  
Old 04-11-2016, 11:30 AM   #15
RichSilv
Scooby Newbie
 
Member#: 444543
Join Date: Apr 2016
Default Outback 2002

I have the P121 Head Unit and am hoping to add an Aux In port (only, no need for controls) to the radio...

How do we contact you to purchase your bits and pieces?
RichSilv is offline  
Old 04-11-2016, 01:04 PM   #16
Mulder
Trust no one
Moderator
 
Member#: 11170
Join Date: Oct 2001
Chapter/Region: Tri-State
Location: NYC
Vehicle:
02 WRX
15 WRX/05 GTO

Default

Sorry, thread hasn't been updated in almost a year and the OP hasn't logged in for 9 months.
Combine that with the fact that the discussion was already for some very old HU's, and this is pretty dead.
You can try sending him a PM and hope he gets the notification, but don't expect much.
Mulder is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -4. The time now is 03:46 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2016 Axivo Inc.
Copyright ©1999 - 2016, North American Subaru Impreza Owners Club, Inc.