Ok, really stupid question here, and please forgive me this is my first BMW and I'm still learning all the arduino stuff Where does this all plug into, the trunk, the head unit, both? I've never done this before, but it sounds like fun to learn Can it all just be plugged into the CD changer wiring in the trunk, or will I need to wire some sort of extension in from the trunk to the head unit? Thanks, and I'm looking forward to the updated schematic and parts list . If it helps, I have an 02 m3 convertible.
BTW, I saw a few bluetooth 4.0 shields for arduino that will connect to apple stuff and communicate the song **** and allow control over bluetooth… Looks like an interesting future mod for those that use the iPhone 5, as the new lightning connector apple hardware has lost the iPod functionality that you are taking advantage of. It looks as though the 30 pin adapter will still allow audio out though, but we won't get all the fun stuff.
Thanks again for sharing everything. The more I lear about these cars, the more in awe I am of the engineering!
ive been having some unrelated aftermarket amp issues so i was out taking readings this weekend and the remote wire for the factory amp ( black and white wire on the gray half of the plug i believe, cross ref bav auto amp/sub install to be sure) and with the radio on it sends a signal just shy of 12.v with the radio off its about .02v. so with the dc converter in place and the setup only using 5v max wouldn't using the remote wire as your power source work with your 2nd to latest circuit design with no further modifications and solve the problem of battery drain?
The audio connections need to plug into the head unit. The Power, ground and I/K bus can be connected to wherever they can be found. But BMW prewired nearly all cars for a CD changer. Which runs the audio wires from the head unit to the trunk and has Ground, +12, ibus there too. It is on the left side of the trunk just behind the trim panel. I just use those wires so that everything can just be left in the trunk.
You are welcome. This is the kind of stuff I do for fun.
If you could find a switched power source, that can support a 1A draw, and want to tap into it sure. But I'd still use one of my later schematic designs (not yet posted) that does the ibus tx inversion in software. With that said I LOVE my turn on and off circuit. Well except for the additional soldering required. It turns power on soon as the kbus becomes active and then stays powered up until the Arduino turns the circuit off. I think it is quite cleaver.
Update:
With the additional circuit I think the battery drain problem is licked and the ipod is still charging. Perhaps the hardware design phase is done? I think so. I'll clean up the schematic some more and post it soon.
Driving an E46 to work is making debugging much easier and faster. Yesterday I found the cause of the mysterious dropping. The Arduino and ibus got out of sync due to the Arduino transmitting the same time as another device. Not a big problem but it took the Arduino too long to resync and by then the head unit thought it had disappeared and switched to Radio (the head unit is quite impatient and will not wait long). With a small change to the program, the drive home yesterday and drive in today there was not one drop at all. I looked at the log from the drive home and there is still a few collisions with another message but the Arduino recovered quickly. I will look at tweaking the code to implement better collision dectection but currently it appears to not drop anymore.
Thaniel
your switch sounds even better than using the remote wire, i like the idea of the audrino being ready to communicate for the first few min of the radio/car being off as ive noticed the head unit still does stuff sometime even when im not listening to anything. looking forward to building this my self also!
Update.
Tonight went out and listened to the CD changers messages. Nothing majorly different but I'll adjust a few messages to better match what it's doing.
Attached is my current schmatic. Feel free to review and critique. Essentially everything on the left side is the turn on, turn off circuit. And everything on the right side is the kbus and ipod interaction circuit.
Went away from the software inverted signal and went back to the hardware serial with hardware inversion. Revised the transmit circuit a bit and I like it much better. And added a transistor to the Kbus side to drop the current draw from the kbus from a few mA to a few micro amps. Thinking back on when the draining the battery started we think it began when we went from the transistor design to the optocoupler design. I don't know. But new circuit draws very little current when it's off (less than 10 mA I think) and a negligible amount of current from the kbus (less than my first transistor design). But I thought i've had all this licked before. Until it's tested and proven out i'm wouldn't count on it.
Also found that the drain from the ipod to the Arduino only happens with the older ipods. 4th gen classics do it anyway. The 2nd gen ipod touch doesn't discharge through the Rx line. Depending on which ipod you use with the circuit you may not need that portion of the circuit. But it's only one more transistor and resistor.
The bad news is I'll not have an E46 to drive this week. My daughters E46 is not yet back together and school starts back on monday. I'll let her drive the E46 I was driving and I'll take the truck. So doubt much ipod testing will happen this week.
Thaniel
Ok, so I'm starting to understand the schematic a little. I've searched and found what all the symbols mean, except this one. Its used 4x and is labeled "D_Power_On". It looks like a diode and transistor combined? But I don't understand the little arrows Would you mind explaining please? Thanks,
Just a short update so I remember what I found. I built the entire circuit on one bread board yesterday (had previously tested in parts). It appeared to work great in bench testing. When no Kbuss messages being sent the unit draws 5mA from power and 14 micro amps from the Kbus. That should not drain the batteries. Resister R17 I have at 470K and I built the read portion to monitor the Kbus and had to use slightly less than 470K to get it to work. 470K seems to be on the upper limit. Higher ohms reduces the load on the Kbus. 400K or maybe even 300K might be a better choice.
I updated the program to include what I learned from listening to the CD changer. Need to test that in the car. Now that the eather is not so freezing cold perhaps I'll get out to the garage in the next few days to hook things up again.
Thaniel.
Attached is my latest circuit. It is currently being tested in the car. I'm back to driving an E46 as I finished the head gasket on my daughters car.
You can thank my Son Garrett for getting this current curcuit working. I was about to trash the 'self on and off' and go hardwire to a switched power source. It wasn't working right and I couldn't figure it out and was tired of messing with it. But he figured it out. What was happening was when the power is cut the the 12v to 5v isolatior, the Arduino would dispate the power on the Tx line faster than the 5V from the power isolator. Which would end up pulling the kbus low. Which would signal to the circuit that there was bus activity and time to turn on. Then repeat. We added a pullup resistor and it appears to have solved it. It is in the car and turns on and off just as expected. The programming hardware changes has fixed the random dropping that I had experienced. It connects to the head unit has worked flawlessly now. Few programming bugs but I am hoping the hardware is sorted. I'm so sick of playing with the hardware.
On a side note I noticed the USA spec doesn't make me push random each time the car is started when installed in the 2001. Then it dawned on me the 2001 doesn't cut the power to that unit when the car is started. So that irritating feature when installed in the '99 or '00 could be avoided by runing constant 12V to the USA spec instead of using the CD power source.
Little more work and hope to have this wrapped up. I'm ready to move on to installing an aftermarket subwoofer and amp. The car I'm driving doesn't have the harmon karmon and I miss it.
Thaniel
Looks great! I'm ordering parts Thanks for posting this project and sharing. Is the link to the code the most current software revision?
If you need help with the amp/sub install, let me know. Although I'm pretty sure that's a walk in the park for you!
Sorry no. The link is not up to date. I've been making little changes often so haven't updated. But attached is where it is today. Download and remove the (.pdf).
Edit: Latest programs are posted here https://drive.google.com/?usp=folder...kFpZVk1UHRvd3c
Last edited by Thaniel; 11-24-2014 at 01:23 PM.
Great looking project! You may find the work that I did a couple of years ago useful: https://github.com/blalor/iPod_IBus_adapter I also started with a Dension adapter in my '06 MINI (R53); it worked fairly well, but wasn't able to charge my iPhone 4. Then I bought an E30 and wanted to put a CD53 head unit from the MINI in there as it's a much better fit visually than any aftermarket radio. I figured out that the CD53 would work outside of the car as long as there was a device on the I-bus talking to it. My adapter makes the iPod appear as a Sirius receiver, and shows the artist and album on the display. It's kind of glitchy, but the I-bus interaction is working well and I was able to reliably use the CD53 in my E30 as well as the adapter in my MINI (with the factory head unit). I'm currently looking for an E46 and will probably resurrect this project in some form or another. SparkFun has a Bluetooth module with audio output that I'll probably try to use; so instead of iPod ↔ Sirius it'll be Bluetooth ↔ Sirius.
Finally got around to soldering up the newest circuit. Used it on the drive in today. Works great.
photo 3.JPG
Note the use of "pig tails" for the audio connection and power connection. Much easier to connect into the BMW harness. Now to make a few more and fix a few more program bugs.
Thaniel
Very nice. I've been following along awaiting updates before building one of these.
My wife has a "Peripheral" brand iPod adapter that came with her 00' 323i and she is definitely not liking it.
Looking forward to trying this since I like to build vs. buy stuff anyways.
Quick question - Is it the Arduino Mega ADK that you used?
I noticed a couple variations of the "Mega" on their site.
Me too.
The one "True" Arduino Mega I used was an ADK. But the ADK part wasn't being used. The feature that is important is the additional Hardware serial connections. Could actually do it with a Leonardo but they are frustrating to connect to a PC (I have one). And, in theory at least, an Uno could work but could not debug and talk to the IBus at the same time (don't use an Uno it's not worth it). Debugging is pretty critical so a Mega is what I went with.
By the way I accidently fried that Ardunio during develpment (connected in correctly). So I bought some Ardunio Mega clone for replacement and it is working just fine.
P.S. After a few days of use I'm still happy with the latest hardware design.
Thaniel.
Last edited by Thaniel; 01-28-2014 at 01:14 PM.
Hi Thaniel,
Thanks once again for taking the time to write this up.
Do you have pictures of the physical connection to the CD changer plugs please?
Ian.
Sure. Just took these:
Connected to the car:
photo 1.JPG
Close up of power/ibus connection
photo 2.JPG
Brown (top of screen) is ground, Red in the middle is +12V, White with red strip and yellow dot is K-Bus
Speaker connection
photo 3.JPG
The colors vary by car but it is a 6 pin connector. The middle two pins are Audio ground (not chassis ground). And in the above picture the two pins towards the top of the screen are the R&L channel +. There is probably better information in Wiring diagrams for the CD changer elsewhere.
Thaniel
Excellent thank you.
The reason I ask is because I am part way through building my own copy of your outstanding work.
I am a little stuck with the colours of the Ipod dock cable, I have the Audio and USB sorted ....
Have also added an LCD on the Mega to pass diag messages as I progress.
Have pictures but not sure how to upload onto this forum.
Ian.
Hi Thaniel,
That was just what I was looking for, great.
I was asking because I am halfway through building my own Mega iPod interface. I am using an LCD to send diag messages to the user too.
This should help.
I tried to post a picture but could not find out how to do this.
Ian.
Ha! Got the colours of the cable sorted and the iPod playing OK....just the kbus bit now.
Ian.
Glad you've got the iPod working. The colors for the wires on the iPod I don't think are standard so counting pins is probably best.
to post pics requires a certain number if posts. I forget how many it is.
Hi Thaniel,
Could you let me know all the colours on your cable as the few I have working so far seem to match yours.
Very difficult with my old eyesight to buzz out these small connections.
Thanks in advance,
Ian.
This is my ipod Cables colors. BEWARE. the white stripe is hard to see and can be mistaken for the one without the stripe.
iPod cable
1 empy
2 yellow - audio ground
3 purple/ white - audio r
4 white - audio L
7 black/white
8 gray
9 -
10-
11 Brown----grnd signal
12 purple--iPod tx ard rx
13 brown/white----iPod rx ard tx - resistor
15 lime Green also ground
16 black USB grnd
18 Blue
20 blue/white
21 Red/white - accy
23 red larger-usb 5v power
25 Orange - USB data -
27 forest green USB data +
30 Bare (shielding ground)
Here's the pic of Ian's work. Great stuff.
IAN.jpg
Thaniel
Forgot to add. Try breaking open the male connector that will be discarded. On mine the pins were labeled on the small circuit board there.
Bookmarks