loading
Well.. I've Ford Focus, and one day my original radio, Ford 6000, have stopped receiving any FM station. It turned up that the FM proccessor is down. I had another Ford radio - 5000, with a cassettes player.
I've started wondering - ok, there is a sign "changer support", let's check our polish ebay for changer. I've found the emulator of changer, but it was quite expensive, so I thought - there has to be the way, to build it on my own.
And then I've started to googling - I've found the yampp project, customized by Andrew Hammond, with ACP for Ford. But it was build 10 years ago, many of files wasn't available, links were down. But - I had a code and some instructions, and that was enough. I've ported Andrews code to Arduino Mega and made a Ford emulator for my own.

Check the progress:
http://www.youtube.com/watch?v=e6wNowo8DjE
and working beta version:
http://www.youtube.com/watch?v=FykGC-gzuNc

Step 1: Let's Get This Party Started!

Ok, so let's begin.

I've read about communication - radio is using RS485 protocol, so we need a MAX485 for communication. In included datasheet was basic schematic - everything is included on my schematic - I've used an led just as a indicator of communication.

You should use serial port no 1 (not 0) - RX1 and TX1 ports (18 and 19 pins of Mega) - basicly because of blocking ports etc.

Remember - don't include and don't use Serial library of Arduino - it's slowing things down (even for debbuging - it's better to use the lcd for that, but about lcd I'll mention later).

The basic problem was to get things synchronized - Yampp was prepared to use external oscilator with 7.37MHz clock, Arduino have 16MHz oscilator. And as I mentioned before - debugging with Serial library and arduino serial monitor on PC was causing errors while handshakes between radio and arduino.

After I've decided to resigne from using Serial library at all, I've discover (only by mistake) that handshakes are almost ok. It tourned up that even one more or less character on lcd may be a cause of synchro errors. That's why you shouldn't change the code.

My project looks like shield for Arduino - I've made it on universal pcb.

Step 2: Parts & Soft

Parts youre gonna need:
  • Arduino Mega (you can always use another, but remember to read manuals about blocking PORT etc.)
  • 100ohm resistor
  • 5v LED
  • transisotr L78509CV (this is an option)
  • two capacitors (I've used 10uF, but should be .. I don't know, 470uF was good ;) )
  • Ford 12pin multilock (search on the internet)
  • LCD compatibile with hd44780 (mine was jhd162a)
  • MAX485
I've decided to use L78509CV only to get 9V, you can get 12V from radio straight ahead.

Remember - check the code - on schematic pins for LCD may be diffrent, than settings in the code (I've created schematic first, then soldierd universal pcb).

"Why do I need capacitors?", you may ask. Well, you need them between your jack connection and L+ and R+ - I've got nice sound from my iPhone after adding capacitors. I have plans to build or use opamp (OPA! Amp should work fine).

I've used Arduino 1.0.5 software.

You need an TimerOne library:
http://playground.arduino.cc/Code/Timer1
(http://code.google.com/p/arduino-timerone/downloads/list)

Step 3: Finito

Full code is in the attachment.

Things to do:

  • nice box :)
  • better cable (I've used ethernet cabel, its sucks)
  • AND gate - you can get 8V or 9V from radio (pin CD ENABLE) when radio is on, I don't know how (right now of course) what to use to build AND gate, because 12V from radio is constantly alive, so you have to put on/off switch, or and gate (when 9V is on, put 12V into circuit)
  • use OP AMP ?
<p>Hi! I made with arduino mega without connected display but it works only when i powering arduino from pc, but when i swich power from radio it stops working. Someone wrote that there is needed diode on GND input line. I put diodes on GND and on VIN input lines but anyway it not working when powering from radio. Alternatively i tryed make on arduino uno with pro mini code. It compiles, but doesnot work. I have one version why not working pro mini,uno ,nano. If we look in pinouts in mega there are assigned to 18(TX1),19(RX1) to interupt pins INT3, INT2, but in pro mini, uno there is no assigned interupt pins on RX, TX, and the interupt cant be rised whan data comes. I can't solve this now, this code is too complicated for me....</p><p><a href="http://www.pighixxx.com/test/pinouts/boards/mini.pdf" rel="nofollow">http://www.pighixxx.com/test/pinouts/boards/mini.pdf</a></p><p><a href="http://www.pighixxx.com/test/pinouts/boards/mega.pdf" rel="nofollow">http://www.pighixxx.com/test/pinouts/boards/mega.pdf</a></p>
<p>Hello, niou_ns! Very good job! I have 5000 rds model with cassete. You wrote that you have got small solution for 5000 and its working different. Can you tall more about that?</p><p>I found solution where one guy solder wires directly to schema:</p><p>http://www.depechework.com/2013/12/aux-5000-rds.ht...</p><p>And after that upgraded solution with bluetooth feature than uses old bluetooth headphones:</p><p>http://www.depechework.com/2014/08/prolife-bt-56-b...</p>
<p>Hey! Actually it was more a workaround than solution - the trick was to quickly turn on, turn off and turn on radio :-) Like 3 fast clicks... on, off, and on - then the emulator was detected by 5000 :-)</p>
<p>Why links are cutted?</p><p><a href="http://www.depechework.com/2013/12/aux-5000-rds.html" rel="nofollow">http://www.depechework.com/2013/12/aux-5000-rds.html</a></p><p><a href="http://www.depechework.com/2014/08/prolife-bt-56-bluetooth.html" rel="nofollow">http://www.depechework.com/2014/08/prolife-bt-56-bluetooth.html</a></p>
<p>Hi, firstly let me say how awesome this is, I have made it using a mega and it works like a dream so thank you so much. Thing is I'd like to shrink this onto a pro mini, loose the LCD and pop it into a small project box to live behind my dash for ever more. Could you tell me if it is possible to install this onto a pro mini, I thought I'd port the code but I don't have a clue, obviously when you set the IDE to pro mini and try to compile you get the errors other people are mentioning. Before I try and overcome these errors and re-write the code to circumvent them, could you tell me if it's even possible, else I will waste hours researching :( Thanks again for a great project !!</p>
<p>Hey, I'm really happy and glad, that you've build your own emulator :)<br>I've made a software for you - it's attatched to last step - hope I've choosen right board for you. Switch pin for you is no. 23 on your Arduino Pro. Good luck with that and please llet me know if it's working.</p>
<p>Wow, thank you very much :) Sadly, I tried to compile it for the following board:</p><p>Arduino Pro or Pro mini(5v 16 Mhz) w/ ATmega 328</p><p>and I got the following errors, </p><p>FordACP.ino: In function 'void acp_txenable(boolean)':<br>FordACP:122: error: 'PC0' was not declared in this scope<br>FordACP:125: error: 'PC0' was not declared in this scope</p><p>I'm sorry I can't figure out the errors, I do appretiate what you have done for me, is there any chance you might be able to suggest why we are getting these errors please? I feel like a dope so I'm going to try and figure it out as well :)</p>
<p>Ok, my code was fine for mini with ATmega 168.<br>According to this:<br><a href="http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Boards/Arduino-Pro-Mini-v13.pdf" rel="nofollow">http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev...</a><br>and this:<br><a href="http://www.atmel.com/Images/doc8161.pdf" rel="nofollow">http://www.atmel.com/Images/doc8161.pdf</a><br>I've changed the acp_txenable function:<br><br>void acp_txenable(boolean enable)</p><p>{</p><p> if (enable){</p><p> PORTC |= (1&lt;&lt;PCINT8); //set high state on A0</p><p> }</p><p> else {</p><p> PORTC &amp;= ~(1&lt;&lt;PCINT8); // set low state on A0</p><p> }</p><p> asm volatile(&quot;nop&quot;);</p><p>}</p>
<p>Hi, the amended code compiles and uploads to the pro mini ! :) Unfortunately, when I connect the pro mini to the radio via the board I made for the mega with the max485 chip, the radio doesn't talk to it :( I don't know if this is a speed issue but when I substitue the pro mini for the mega it works again using the same little circuit with the max485. I'm using TX1, RX0 and A0 on the mini. This is the board I'm using </p><p><a href="http://arduino.cc/en/Main/ArduinoBoardProMini#.UwIEd7TTelo" rel="nofollow">http://arduino.cc/en/Main/ArduinoBoardProMini#.UwI...</a></p><p>Thank you for all your help so far, I really need to read up on ports and bit masks etc, I noticed we are using pin 28 on the mega for switching which is a digital pin, but A0 on the pro mini which is analog, should we not use a digital pin on the pro mini instead of an analog one?</p>
<p>Hi, you're right ! I've used analog-in in previous code :)</p><p><a href="http://arduino.cc/en/Hacking/PinMapping168#.UwIUOvl5Oao" rel="nofollow">http://arduino.cc/en/Hacking/PinMapping168#.UwIUOv...</a> - check this out<br>So maybe lets try to use another pin, it has to be from other port, than RX and TX - try with portB, so maybe PB0 pin ?<br>( PORTB |= (1&lt;&lt;PB0); ) ? Don't forget to change &quot;switchPin&quot; in code. Let me know if it's working.</p>
<p>Ok, I've rewritten the code as follows :</p><p>int switchPin = 8;</p><p>void acp_txenable(boolean enable)<br>{<br> if (enable){<br> PORTB |= (1&lt;&lt;PCINT0); //set high state on D8<br> }<br> else {<br> PORTB &amp;= ~(1&lt;&lt;PCINT0); // set low state on D8<br> }<br> asm volatile(&quot;nop&quot;);<br>}</p><p>I assume from the pin mapping that PB0 is PCINT0, it still is not recognised by the player though :( Is there something else I'm missing? </p>
<p>hmmm.. maybe you should start with basic solutions, like:<br>- check if the max485 is on when board is unplugged from radio<br>- try to make very simple circuit only with led, which will toggle led on and off on D8, which we try to use as gate for max485... I've never had an Arduino Mini (honestly - this was my first project with Arduino :-) ) so it's hard for me to be your advisor :)</p>
<p>Hey, I've found something really interesting, if I power the mega from the usb, this project works but if I try and power it from the jack plug or the vin, it doesn't work. I think this may be why the pro mini didn't work.</p>
<p>Did you removed the lcd part from code for mega ?</p>
<p>I did, I have a theory, if I power the mega from a usb battery pack used for recharging phones and the radio from a desktop 12v supply, all works well. If I power the mega using a 12v-9v dc-dc power board supplied from the same desktop psu I'm using to power the radio then it stops working. It seems as if I need to isolate the megas power supply from the radios power supply, it would almost seem there is feedback or noise if I use the same supply for the radio and the mega, I will continue to investigate.</p>
<p>I'll try to do the same, but I was almost sure, that without a lcd code board was working.. too fast (?) and didn't get it synchronized. But I left lcd for future, I've another plans with this project :) Anyway - which radio you're using ? Because I've got small solution for 5000 (it's working a little bit different than 6000).</p>
<p>Ok, I have found that it still works fine after removing both LCD hardware and LCD code, I built the emulator as per your instructions with an LCD to start with then removed it and it still works, I then wanted to reduce it to a pro mini but we know where that went ;) Im using a 6000NE radio, powering the mega from a usb port and the radio from a 12v PSU it works ok, problem is I need to power both radio and mega from the car battery which is where the problemstarts, if they are both powered from the sam source they stop talking. I think I need to decouple it with decoupling caps maybe?</p>
<p>I supose my answer come very late but I solve the problem with the comunication . The problem come when the ground from atmega is connected to ground to radio. I connect true a diode and now it's ok. Thank to author for this project.I made it and work very well.</p>
<p>Ok, well thanks for all your help, I will let you know if I solve it. Thanks again, it's great that you have gone out of your way to help, and thanks again for the project, to notch :)</p>
<p>I don't know if it means anything but the led on the max485 is almost constantly lit on the pro mini but flickers to show data on the mega, I'm guessing this has something to do with the enabling of the tx/rx or lack there of?</p>
<p>Hi. I have Ford 6000CD and universal car bluetooth usb sd mp3 aux player, it has 12V input, aux output and 4 buttons (MODE, PLAY/PAUSE, NEXT, PREV)</p><div><p>I removed buttons and i want use arduino to control this circuit, and emulate cd changer for radio to get aux working, and grab radio buttons to that circuit.</p><p>Arduino should have this pinout:</p><p>+12V - Voltage input (or 9v)</p><p>GND - Ground</p><p>Acp+ (comunication</p><p>Acp- with radio)</p><p>Toggle - input pin - button Turn changer on/off </p><p>Next - output pin - when pressed next track button on radio</p><p>Prev - output pin - when pressed previous track button on radio</p><p>CD1 - output pin - when pressed CD1 button on radio</p><p>CD2 - output pin - when pressed CD2 button on radio</p><p>CD3 - output pin - when pressed CD3 button on radio</p><p>CD4 - output pin - when pressed CD4 button on radio</p><p>CD5 - output pin - when pressed CD5 button on radio</p><p>CD6 - output pin - when pressed CD6 button on radio</p><p>I want to use this buttons from radio (arduino output) to control that circuit:</p><p>Next-Next</p><p>Prev-Prev</p><p>CD1-Mode</p><p>CD2-Play/Pause</p><p>+ one Toggle on/off button connected to arduino to control if i will able to listen internal cd reader in radio or emulated cd changer. </p><p>I have arduino nano. I think when arduino mega can emulate cd changer arduino nano can it probably too.</p><p>Is it possible? if yes, can anyone post here code please? i am using Arduino IDE to flash program to my arduino.</p><p>Thanx.</p></div>
<p>Wow, i used code for Pro Mini and it compiled for nano. so what is the pinout for this project on nano? same as on circuit?</p>
<p>Hey! You have to figure it out on your own - I haven't touched Arduino since I've made that project, so I won't help you with that ... ;)</p>
<p>Hi. what exactly means #define switchPin X ?<br>X means number of digital output? (like D1...D13)</p><p>or it means number of pin in atmega pinout?</p>
<p>https://www.arduino.cc/en/Hacking/PinMapping2560</p>
Exactly what I need. Can you tell me more about the Ford connector, typer, link, etc?
<p>I made this! Thanks for sharing! Check out my Instructable here: https://www.instructables.com/id/Ford-Bluetooth-Interface-Control-phone-with-stock-/</p>
<p>Hey men, the code gives me a lot of errors, by example, undeclared constants. Can you help me, please?</p><p>An example of the errors:</p><p>...</p><p>sketch_feb07a:74: error: 'UCSR1B' was not declared in this scope</p><p>sketch_feb07a:74: error: 'RXB81' was not declared in this scope</p><p>sketch_feb07a:75: error: 'UDR1' was not declared in this scope</p><p>...</p><p>And much more... u.u</p>
<p>great work...has anybody converted the software to work with the atmel328p (uno)? I'ld be very interested in that...</p>
<p>are u using arduino mega ? all of these errors might be caused by using arduino uno (for example), because it doesn't have a serial1 (and above).</p>
Well, I use an arduino due and arduino duenilanove. The error is the same with both arduinos, and with differents IDE versions (1.0.5 and 1.5.5). I've tried to debug it by myself, but I don't know how to define correctly this ports. Thanks for all!!
<p>Hey! and... what if you put a relay between 9V in and GND? It can connect the 12V from the radio to the arduino when 9V is on. (I'm MrManlu, from youtube. Good luck with that!! :D)</p>
<p>Hey, I've already done it :)</p>

About This Instructable

21,805views

30favorites

License:

More by niou_ns:Ford CD Changer Emulator - Arduino Mega 
Add instructable to: