Welcome to the North American Subaru Impreza Owners Club Wednesday August 27, 2014
Home Forums WikiNASIOC Products Store Modifications Upgrade Garage
NASIOC
Here you can view your subscribed threads, work with private messages and edit your profile and preferences Home Registration is free! Visit the NASIOC Store NASIOC Rules Search Find other members Frequently Asked Questions Calendar Archive NASIOC Upgrade Garage Logout
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.
Reply
 
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   Reply With Quote
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   Reply With Quote
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   Reply With Quote
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   Reply With Quote
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   Reply With Quote
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   Reply With Quote
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   Reply With Quote
Old 10-28-2013, 05:01 PM   #8
indirection_
Scooby Newbie
 
Member#: 349415
Join Date: Mar 2013
Chapter/Region: NESIC
Location: Amherst, MA
Vehicle:
2002 WRX
WRB

Default

Nice job! I have been looking for a solution like this!
indirection_ is offline   Reply With Quote
Reply

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 07:35 AM.


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