PIC version based on vwcdpic project
Edit: better look for thisUPDATE: simple boards are for sale (1Euro for board + shipping), also asembled emulators + simple cable with jack (tested wvcdpic + audio cable = 10euros + shipping ), contact me on email if you are interested, also I can send preprogramed pic +2E
originaly this was on fritzing project page. There is lot of "files" so i make it clear here, I hope:
whole project is build around www.k9spud.com/vwcdpic/ project (mirror,mirror of devel site) , which was realease under gpl (2 I thing ...)
There are 3 firmware version:
v1: for large 16pin pic ... don't care
v2:
- for pic12f629
- source code provided
- serial output, easy to handle with arduino
- has bug with serial comuniaction, selecting CD3,4,5,6 send always command 0xd3 (cd3 selected), but fix is sipple,fixed pic asm is on my github
- is buggy(don't use it!) on blaupunkt chorus1 and concert1 not on philips concert1
- for pic12f629
- just hex
- serial output but with bug in serial communication (can't fix, no source code)
- is buggy(don't use it!) on blaupunkt chorus1 and concert1 not on philips concert1
I don't know what's real diffrence in v2 and v3 code, except used pins.
I use buggy version 3 of fimrware only for emulating CD changer, without controling anything else and fixed version 2 to comunicate with arduino, which then I used to controling HTC phone and BT module.
When I start to search about this, I found that guys form cz skoda forum are doing this fake changer, they add power control to "switching" permament +12V ...... so I take their design and used it. After some builds, and research how to use this emulator with old audi chorus unit, I realize that BSP452 which is used to switch and provide stable 12V on ACC pin is capable of 0.7A as minimum, so I remove whole "power switch" and drive it whole directly from radio ACC pin.
Also audio amlifier is better not to be used, lot of noise etc... I try a lot of shielding, koax kables and design , and then I just give up. Best is to use simple emulator made on universal board, just like next picture, and connect audio directly to coresponding pins on radio CD changer connector. If you relly want to use regural PCB go with smd version down there and just "cut" audio part.
Simple version |
for burning I use http://rweather.github.io/ardpicprog/
Emulators with audio amlifier
kicad filesfritzing files
Schematics, for firmware v3 |
kicad version build |
fritzing version |
Separated audio ground filling, to try killing the noise comming from comunication PIC<->radio.
edit: after a while I connect audio ground with separate cable to chassis and it fix noise problem, so as always, problem was ground loop. ...
HTC support
files on gitbut, also with instructionthis use v3 of firmware, because there is just "play/pause" on headphone remote control, so bug in firmware is not problem
Bluetooth support
files on gitbut, also with instructionproblem with this BT module is in handling incoming call (or its bug in my HTC) after "pickup" it disconected from phone.
only pic I have :) |
ATMEGA version
based on SHYD work, ported to arduino (ATMEGA168,328 and also works with ATMEGA8 -1$ on ebay). Works with 16MHz Xtal and also with internal 8MHz RC oscilator (tested) - set CPU_SPEED to cpu clock value in MHz more about this in newer post
connection of arduino to HU |
code on github
Hi
ReplyDeleteGreat project, much respect :)
Im wondering, will it work with Alfa Romeo/Fiat radio units?
Pinouts are basically the same. I need to build sth like this for Alfa Romeo since there is no possibility to play any external source
look at this
Deletehttps://github.com/Andrea81/CDCemu
Thank you, I saw this before.
DeleteIf im right this is orginal site of that project http://forum.stiloclub.it/viewtopic.php?f=15&t=25667#wrapheader
but I wanted something on avr or pic to be as simple as your project :)
Hi
ReplyDeleteGreat project, much respect :)
Im wondering, will it work with Alfa Romeo/Fiat radio units?
Pinouts are basically the same. I need to build sth like this for Alfa Romeo since there is no possibility to play any external source
Dobry den mal by som zaujem o ten cd changer simulator na passat radio je delta 6. Potreboval by som vediet ci k hotovemu simulatoru je este potrebne pripojit kabel s jack conektorom osobitne dakujem.
ReplyDeleteAhoj,
Deletevidim, ze si uz zadal objednavku na tindie, poriesime to teda tam.
t.
hi,
ReplyDeletewill it work with Renault Megane 2 Tuner list radio units?
I don't think so :/
Deletetake a look on this post: http://www.instructables.com/id/AUX-Cable-for-Renault-Megane/
DeleteI have green connector, so If you want one .....
Hi Tomas! I tried your code with arduino and 3 button control android headphone. The code is very good, but the control android headphone do not work. I have to enable any line of your code to operate the buttons? What is my error?
ReplyDeleteThanks
Hi Tomas! I tried your code with arduino and 3 button control android headphone. Your code is very good but the android buttons do not work. I have to enable any line of your code to operate the buttons? What is my error?
ReplyDeletePlease tell me which code and schematics you used then i can help you
ReplyDeleteI use arduino uno with your code "cdc_arduino_ported_k9spud_vwcdpic_just_8bit_timers.ino", radio audi concert 1 and htc hd with headphone 3 button control. Thanks!
Deleteok, and schematics? this one? https://github.com/tomaskovacik/hw/tree/master/kicad/arduino_based_cdc_emulator/atmegax8_dip
Deletecose, there is used 4066 powered with 5V, this need to by changed to 12V, just for 4066, to have lover switch resistance. otherwise it should works. I made it on bench.
Ok. Your code that I use is:
Deletehttps://github.com/tomaskovacik/arduino/blob/master/VWCDCemu/CDC_emulator/cdc_arduino_ported_k9spud_vwcdpic_just_8bit_timers/cdc_arduino_ported_k9spud_vwcdpic_just_8bit_timers.ino
but my problem is that arduino no signal output pins 5 (play button), 9 (previous button) and 6 (next button). It is that the code I have to use?
did you change //#define ANDROID_HEADPHONES to
ReplyDelete#define ANDROID_HEADPHONES
?
Yes. but it still does not output signal.
Deleteok, and other connection to radio? which radio do you have?
DeleteI have the radio audi concert 1. I connect cables data out, clock and data in, to pins 2,12,13 with the Arduino Uno.
ReplyDeletehttps://www.youtube.com/watch?v=rS1MFRZy9Uw
Deletehere you have video of that feature working on bench, I use radio_emulator for emulating radio.
2diodes are "prev" and "play" output, led on pin 13 of green arduino is "next"
this is configuration in cdc_arduino_ported_k9spud_vwcdpic_just_8bit_timers.ino:
* ANDROID HEADPRONES SUPPORT
* HTC: 3buttons, 220ohm previous|0ohm play/pause|470ohm next
*/
-//#define ANDROID_HEADPHONES
+#define ANDROID_HEADPHONES
/*
* ANDROID HEADPHONES SUPORT
@@ -134,9 +134,9 @@
*/
//#define ANDROID_HEADPHONES_ONE_BUTTON
-#ifdef ANDROID_HEADPHONES_ONE_BUTTON //just to be shure
-#define ANDROID_HEADPHONES
-#endif
+//#ifdef ANDROID_HEADPHONES_ONE_BUTTON //just to be shure
+//#define ANDROID_HEADPHONES
+//#endif
#if defined(__AVR_ATtiny85__)
#include
I moved all code here: https://github.com/tomaskovacik/vwcdavr/
DeleteOk. I'm sorry for my late answer. Thanks for your help.
DeleteYour code work very well making the modifications indicated by you.
https://youtu.be/tNRmCUwH-es
but it does not work well on my radio concert 1.
https://youtu.be/HvF-jwfxhLg
What can I do?
ok. try use this code
Deletehttps://github.com/tomaskovacik/vwcdavr/tree/master/CDC_emulator/cdc_arduino_ported_k9spud_vwcdpic
DATAOUT on pin 8
but this one is withou headphone support, need to make patch to this one
loks like, INT0 code is somehow buggy make lot of dataerr, I try to look into it
Also check ground, "just 8bit timers" works, but is buggy .... Or is just bad wire connection, i will try to test it tomorow
DeleteYes. Arduino gnd pin is connected to ground radio concert.
DeleteYour code is very good. I do not think your code has some error. I think my radio concert has different pulse.
I'll use the code: https://github.com/tomaskovacik/vwcdavr/tree/master/CDC_emulator/cdc_arduino_ported_k9spud_vwcdpic
to see if it works on my radio without buttons.
Thanks!
https://www.youtube.com/watch?v=LWpjHIddfwc
DeleteI put it on bench and it works, i do make same changes to tweek it, but changes are minor, check it out, also i used 16Mhz version. Is your standard arduino?
everything works :)
Yes, i used Arduino uno 16Mhz version. I'm sorry for my late answer.
ReplyDeleteI used the code:https://github.com/tomaskovacik/vwcdavr/tree/master/CDC_emulator/cdc_arduino_ported_k9spud_vwcdpic
and the code: https://github.com/tomaskovacik/vwcdavr/tree/master/CDC_emulator/cdc_arduino_ported_k9spud_vwcdpic_just_8bit_timers
with the two codes, the display only show: CD1 TR01
I think my radio concert works differently and the pulse signal is different but your code is correct and very well.
thanks for the help!
Connect andruido based logic analyzer on that line and chceck what you see
DeleteI do not have oscilloscope but I'll seek an alternative to arduino.
ReplyDeleteYour code (https://github.com/tomaskovacik/vwcdavr/tree/master/vw_cd_changer_sniffer) would help me check the signals?
https://github.com/gillham/logic_analyzer
DeleteHi, great job! I would like to build only cd changer emulator for aux in (no amplifier). Do you have info if this emulator could work with Audi Symphony 1 head unit. Basically cd changer is the same for all head units from this year, correct?
ReplyDeleteHi,great job!
ReplyDeleteDo you know if cd changer emulator could work with Audi Symphony I head unit? I think cd changer stayed the same no matter which head unit was used (in that range of year).
Hi, I have an Audi A4 B6 with Concert 2 unit. I have connected a bluetooth module on the CD-R/L/GND pins, it starts, I can connect to it with my phone, but I cannot select it. Pressing CD button - no luck, pressing CD + starting the HU I get message "NO CDC". Is there any gadget that you built that can help me with that? I would really like to also connect a microphone to it, if possible
ReplyDeleteHi, you need emulator, buy one or make one with arduino
DeleteT.
Hello congratulations nice application software can you modify it this way
ReplyDeletehttps://plus.google.com/photos/photo/101899105574100522850/6450115710770141154?icm=false&authkey=CN_-i8XHirX3vAE
sorry, but I'm not into PIC assambly, but i actualy do something similar here: https://github.com/tomaskovacik/hw/tree/master/fritzing/vwcdpic/HTC
DeleteIt is possible to do it with Windows Phone Lumias?
ReplyDeleteHi Tomas. What to do/check if Gamma IV shows No CD when i press CD button and wcdcpic is conected? I have ISO 10 pin connector on the back and i have connected wcdcpic in this way : 1 - Data In, 2 - CLK, 3 - GND, 4 - Data Out and 6 - +12V. Thanks.
ReplyDeletewhat are numbers you mentioned? pins in iso or on my vwcdpic ? Also I do not know about radio which has cdchanger interface on 10pin connector, only on 20pin. Please drop me message on my product page on tindie https://www.tindie.com/products/tomaskovacik/vwcdpic-audio-interface-adapter/
DeleteHi. I an trying to get this working with a Arduino nano and a bt module. I only get no cd. I have your pic emulator and when I use that and send data out to the nano I get the button commands. So it seems that the problem is white the emulation part. I am using cdc_arduino_ported_k9spud_vwdpic firmware and I have data out to pin 8 data in to pin 11 and clock to pin 13. What could be wrong?
ReplyDeleteBest regards
pic module is cdchanger emulator, you are trying to replicate same functionality on arduino, so you must connect arduino to radio and test it against it. Or use another arduino with radio emulator firmware from my github
DeleteHi. That is what I have done but when the Arduino is connected up which the clock and data in pins I get no cd. So I tried with your pic board for data on and clock and the data out is send to Arduino. I can see the button presses on the computer when I do this. But I can not get the emulation part work on Arduino. I have tried all of your firmwares but the same no cd comes up.
Deletethis sketch? https://github.com/tomaskovacik/vwcdavr/blob/master/radio_emulator/radio_emulator.ino
ReplyDeleteif so try change this two lines
https://github.com/tomaskovacik/vwcdavr/blob/c7778aafee8e6937d881a1903571cc6c45152957/radio_emulator/radio_emulator.ino#L128
to this:
pinMode(Clk, INPUT_PULLUP);
pinMode(DataIn, INPUT_PULLUP);
i am using this: https://github.com/tomaskovacik/vwcdavr/blob/master/CDC_emulator/cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino but maybe this dont emulate cd changer? i have all working with my Bt module and arduino with your pic emulator to trigger the changer option, and i can change songs and everything from the stereo this way but would be nice to only have one microcontroller to do both.
Deleteso u have arduino connected to radio? anyway, which BT you are using? I have FW for pic which controls BK8000L,BK3254 and BK3266 based bluetooth modules using serial@9600bps
Deleteyes the arduino is connected to radio and can have everything working except the emulation. i am using XS3868 module but saw that you stoped using it, why? i am about to order a BK8000L module soon so if you have the pic firmware for that i would be grateful.
DeleteI used 1 time XS3868, then I switched to bk8000L(bt2.1) and later to bk3254(bt4.1) and then to bk3266 (bt4.2). One not you must power arduino same time as radio, you cannot have it running from 5V(USB) and then expect to work when you later power up radio. Try powering arduino from switched output of radio.
Deleteok, yes i have it connected to switched power, i guess i doing something wrong, which BT module do you recommend and what of your PCB do you recommend. i have your old PCB for the XS3868 module but never got that to work either. Thanks for trying to help.
Deletehttps://github.com/tomaskovacik/vwcdavr/tree/master/HW/arduino_based_cdc_emulator/atmegax8_with_F6188
Deleteand use BK3266 module
regarding CDemulator code, what arduino send to serial?
Thanks, last question, which firmware to use with that PCB/Module. I used a arduino nano running at 16mhz, do i need to change parameters in code maybe? or can i just upload code to the Nano and connect it to the radio and it should work. Again thanks for trying to help me with this. And the code should do the emulation and controlling the BT module on one microcontroller?
Deleteok I found problem :) I probably accidentally I uploaded code with changed pin definition, I change it to change it to correct ones and it is uploaded to github:
Deletehttps://github.com/tomaskovacik/vwcdavr/blob/26f3da0335c80c2008c3c54768527e0a1737956e/CDC_emulator/cdc_arduino_ported_k9spud_vwcdpic/cdc_arduino_ported_k9spud_vwcdpic.ino#L138
I have now tried the changed firmware, still not working, i have also tested with a digispark without any luck too, still only no Cd so i think i give up on this, your pic board works flawlessly so i have everything working with that. Maybe my Delta 6 radio is sensitive.But thanks for all the help.
Deletedrop me email, I have few pcb wih BT+pic I will probably make the available on tindie soon , but I do not have a lot of free time to set up product page ...
Delete