Elektroda.pl
Elektroda.pl
X
Please add exception to AdBlock for elektroda.pl.
If you watch the ads, you support portal and users.

Emulator CDC dla radia Blaupunkt w Nissan Micra K12

RigelInOrion 21 May 2019 23:10 13803 67
Optex
  • Emulator CDC dla radia Blaupunkt w Nissan Micra K12
    Witam. Projekt emulatora powstał na prośbę jednego z kolegów z elektrody. Ma on na celu odblokowanie linii audio-in w radiu, aby można było podłączyć zewnętrzne źródło audio do kostki miniiso. Udostępniam projekt w Eagle i kod źródłowy napisany w środowisku Arduino. Do prawidłowej kompilacji trzeba ściągnąć bibliotekę SoftwareSerial9 lub wgrać załączony plik .hex. Do projektu wykorzystałem mikrokontroler ATTINY85, ale może być też ATTINY45. Ustawienia fusebitów opisane w kodzie źródłowym.
    Podłaczenie do miniiso: +12V -> pin16; masa -> pin17; RX -> pin14; TX -> pin13
    Dołączam też opis złącz w tym radiu. Mam nadzieję, że się przyda. Pozdrawiam.

    PS. W projekcie użyty jest ATTINY13 z braku ATTiny85 w bibliotece. Nie ma to wpływu na działanie układu. Bezpiecznik polimerowy smd 1206 na wejściu 12v dodany jest, ponieważ zasilanie jest pobierane z pinu 16 (po stacyjce") i można go obciążać do wartości 300mA.

    Z ostatniej chwili...
    Dodałem projekt eagle z ATTINY w obudowie smd SUU i złączem jack 3,5mm.

    Opis podłączenia do złącza miniiso
    opispin płytkipin miniiso
    GND117
    +12V216
    RX314
    TX413
    AudioR520
    AudioL619


    Emulator CDC dla radia Blaupunkt w Nissan Micra K12 Emulator CDC dla radia Blaupunkt w Nissan Micra K12 Emulator CDC dla radia Blaupunkt w Nissan Micra K12 Emulator CDC dla radia Blaupunkt w Nissan Micra K12 Emulator CDC dla radia Blaupunkt w Nissan Micra K12

    Cool? Ranking DIY
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
    About Author
    RigelInOrion
    Level 12  
    Offline 
    RigelInOrion wrote 110 posts with rating 72, helped 2 times. Live in city Pabianice. Been with us since 2007 year.
  • Optex
  • #2
    skywalker2
    Level 13  
    Czy elektrolity koło stabilizatora nie są podłączone odwrotnie ?
  • Optex
  • #3
    austin007
    Level 17  
    skywalker2 wrote:
    Czy elektrolity koło stabilizatora nie są podłączone odwrotnie

    To oczywiste, że odwrotnie.
  • #5
    lombard1
    Level 13  
    Parę lat temu miałem podobny problem z odblokowaniem linii audio w samochodowym radiu Blaupunkt.
    Chciałem zrezygnować ze zmieniarki CD a w zamian używać odtwarzacza MP3.
    Wejście audio było aktywne tylko gdy była ona podłączona.
    Zaczęliśmy z kolegą projektować symulację jej podłączenia za pomocą mikroprocesora,
    a w tzw. międzyczasie znalazłem informacje,
    że jak podłącze opornik 1k do konkretnych pinów z tyłu radia,
    to wejście audio się uaktywni. I tak sie stało,
    na wyświetlaczu radia mogłem w menu wybierać wejście audio.
    Może w tym wypadku też tak jest ;)?
  • #6
    RigelInOrion
    Level 12  
    lombard1 próbowałem z rezystorem. Bez rezultatu. Sęk w tym, że jednostka potrzebuje od zmieniarki informacji o bankach. Jeśli takowych nie otrzyma, przełącza się z powrotem na tryb radia. Ważne też są opóźnienia i znaki zakończenia ramki, których zmieniarka nie odsyła z powrotem. Można by ustawić pin 9 kostki miniiso w stan niski (telmute) wtedy radio odblokuje linie dla telefonu (pin 7 i 8). Niestety wejście to jest tylko monofoniczne.

    Dodano po 18 [minuty]:

    austin007 wrote:
    skywalker2 wrote:
    Czy elektrolity koło stabilizatora nie są podłączone odwrotnie

    To oczywiste, że odwrotnie.


    Poprawione :) Dzięki za czujność
  • #7
    Didi1102
    Level 12  
    a czy umiał byś mi narysować podstawowy schemat z ścieżkami z procesora do poszczególnych elementów tak jak kiedyś sie rysowało schematy bo przepraszam ale nic z tego co jest powyżej nie rozumiem a z takiego jak kiedyś spróbował bym jakiegoś pająka zrobić wtedy mogę po kolei po lini lecieć z elementami wtedy wiem gdzie podłączyć jaka nogę procesora i do jakiego elementu chciał bym umieć z tego co przedstawiłeś bez problemowo odczytać twoj przekaz ale to dla mnie teraz jak czytanie chieroglifow :-P

    lub był byś w stanie pokazać jak taki układ poskładać tak by moc krok po kroku go ponowić ... :-)
  • #8
    RigelInOrion
    Level 12  
    Didi1102 wrote:
    a czy umiał byś mi narysować podstawowy schemat z ścieżkami z procesora do poszczególnych elementów tak jak kiedyś sie rysowało schematy bo przepraszam ale nic z tego co jest powyżej nie rozumiem a z takiego jak kiedyś spróbował bym jakiegoś pająka zrobić wtedy mogę po kolei po lini lecieć z elementami wtedy wiem gdzie podłączyć jaka nogę procesora i do jakiego elementu chciał bym umieć z tego co przedstawiłeś bez problemowo odczytać twoj przekaz ale to dla mnie teraz jak czytanie chieroglifow :-P

    lub był byś w stanie pokazać jak taki układ poskładać tak by moc krok po kroku go ponowić ... :-)


    Szybciej będzie jak wyślę Ci płytkę wytrawioną. ;) Polutujesz sobie sam. Za jakieś dwa tygodnie, bo teraz mam wyjazd. Zachęcam jednak zawziąć się i spróbować samemu wytrawić płytkę, posklejać i wgrać program. Zapewniam, że da Ci to dużo frajdy. To nie jest skomplikowana płytka. Mogę wstawić jeszcze gotowy plik do wydruku, żeby przenieść go na laminat.
  • #9
    Alpha
    Level 24  
    RigelInOrion wrote:
    Sęk w tym, że jednostka potrzebuje od zmieniarki informacji o bankach. Jeśli takowych nie otrzyma, przełącza się z powrotem na tryb radia. Ważne też są opóźnienia i znaki zakończenia ramki, których zmieniarka nie odsyła z powrotem. Można by ustawić pin 9 kostki miniiso w stan niski (telmute) wtedy radio odblokuje linie dla telefonu (pin 7 i 8). Niestety wejście to jest tylko monofoniczne.

    O, i takiego opisu działania - a nawet czegoś więcej - zabrakło mi w pierwszym poście :)
  • #10
    RigelInOrion
    Level 12  
    Alpha wrote:
    RigelInOrion wrote:
    Sęk w tym, że jednostka potrzebuje od zmieniarki informacji o bankach. Jeśli takowych nie otrzyma, przełącza się z powrotem na tryb radia. Ważne też są opóźnienia i znaki zakończenia ramki, których zmieniarka nie odsyła z powrotem. Można by ustawić pin 9 kostki miniiso w stan niski (telmute) wtedy radio odblokuje linie dla telefonu (pin 7 i 8). Niestety wejście to jest tylko monofoniczne.

    O, i takiego opisu działania - a nawet czegoś więcej - zabrakło mi w pierwszym poście :)

    Tu są skąpe informacje na temat protokołu DMS, którym posługują się radia blaupunkt http://www.bodikrumlov.net/Schemata/cd%20changer%20protocol.pdf
    Wątek z forum arduino https://forum.arduino.cc/index.php?topic=282752.0
    I coś jeszcze na github, ale nie pamiętam.
    To wszystko co znalazłem w sieci.
    Niestety mimo tych materiałów pająk nie zadziałał. Nie obyło się bez podsłuchania komunikacji.
  • #11
    SlaweK
    Level 43  
    Mowa o starszych radiach BP, bo od pewnej serii większość ma możliwość odblokowania AUX w menu DSC, chyba od serii RCM126\127

    SławeK
  • #13
    mr.box
    Level 15  
    Witam Wszystkich Forumowiczów.
    Czy udało się komuś uruchomić ww. układ na Arduino Nano?
    Jestem własnie po takowych testach z radiem Blaupunkta, montowanym jednak w Grande Punto, ale niestety reakcji żadnej nie ma.
  • #14
    RigelInOrion
    Level 12  
    mr.box wrote:
    Witam Wszystkich Forumowiczów.
    Czy udało się komuś uruchomić ww. układ na Arduino Nano?
    Jestem własnie po takowych testach z radiem Blaupunkta, montowanym jednak w Grande Punto, ale niestety reakcji żadnej nie ma.


    Widziałem coś takiego ADAPTER ZŁACZE AUX IN JACK 3,5mm Fiat Grande Punto na alledrogo. Może zadziała.
    I jeszcze tutaj...
    https://www.elektroda.pl/rtvforum/topic697475.html#5467247
  • #15
    mr.box
    Level 15  
    Tak, jest coś takiego, ale funkcjonuje on w wypadku braku multimedialnego zestawu (Blue&Me). Zależy mi bardzo, żeby uruchomić Twoją konstrukcję. Przy kolejnej próbie muszę "nasłuchać" co się dzieje na liniach.
    Arduino Nano w moim wypadku było taktowane 16Mhz, może w tym będzie tkwił problem?
  • #16
    RigelInOrion
    Level 12  
    Nie ma znaczenia częstotliwość, jeśli jest => 8Mhz. Taki jest wymóg biblioteki SoftwareSerial9. Natomiast może mieć znaczenie wgrany na Nano bootloader. On opóźnia start programu znacznie. Radio odpytuje zmieniarkę niezwłocznie po uruchomieniu, podczas gdy program jeszcze nie wystartował i nie zaczął emulować. Jak budowałem wersję emulatora z bluetooth sterowanym z panelu radia, to starałem się nawet znaleźć przekaźnik z jak najmniejszą zwłoką, bo obawiałem się, że to może mieć znaczenie.
  • #18
    rdmkya
    Level 3  
    Hello, I signed up your site for this topic. Thank you for your work.
    I uploaded the source code to arduino nano. I connected pins 0 and 1 to the tx and rx inputs on the mini iso. But it didn't work.
    Radio does not switch to cd changer mode. I wanted to build a prototype with Arduino and then build the circuit.
    Model number of the radio: bp2347 4 6064480

    I've been trying for about 7 days, but I can't find a solution. Is it possible to do this work with arduino nano or uno?
  • #19
    RigelInOrion
    Level 12  
    rdmkya wrote:
    Hello, I signed up your site for this topic. Thank you for your work.
    I uploaded the source code to arduino nano. I connected pins 0 and 1 to the tx and rx inputs on the mini iso. But it didn't work.
    Radio does not switch to cd changer mode. I wanted to build a prototype with Arduino and then build the circuit.
    Model number of the radio: bp2347 4 6064480

    I've been trying for about 7 days, but I can't find a solution. Is it possible to do this work with arduino nano or uno?




    Hello. It did not work because uno and nano have a loaded bootloader which takes a while to start(i think). The radio checks whether the changer is connected in a very short time after the start and if in this time emulator does not answer him, he does not try to communicate with him anymore. You must upload the program using the programmer while removing the bootloader.
  • #20
    rdmkya
    Level 3  
    RigelInOrion wrote:
    rdmkya wrote:
    Hello, I signed up your site for this topic. Thank you for your work.
    I uploaded the source code to arduino nano. I connected pins 0 and 1 to the tx and rx inputs on the mini iso. But it didn't work.
    Radio does not switch to cd changer mode. I wanted to build a prototype with Arduino and then build the circuit.
    Model number of the radio: bp2347 4 6064480

    I've been trying for about 7 days, but I can't find a solution. Is it possible to do this work with arduino nano or uno?




    Hello. It did not work because uno and nano have a loaded bootloader which takes a while to start(i think). The radio checks whether the changer is connected in a very short time after the start and if in this time emulator does not answer him, he does not try to communicate with him anymore. You must upload the program using the programmer while removing the bootloader.


    Thanks a lot for your reply. I will try attiny13a. If I can do with steering wheel controls I will share result.
  • #21
    RigelInOrion
    Level 12  
    I did not read your first post carefully...
    rdmkya wrote:

    I connected pins 0 and 1 to the tx and rx inputs on the mini iso. But it didn't work.


    ... so, the RX and TX signals from the radio are inverted so, you must first pass it through the inventer (NOT gate, look at the schema). Connecting directly will not work. However, it will not work or it will be at random if the bootloader will be on the microcontroller.


    rdmkya wrote:

    Thanks a lot for your reply. I will try attiny13a.


    If you want to use my code, you must use attiny45 at least. The attiny13 will not fit. In the diagram I placed ATTiny13 because I could not find in Eagle ATTiny45. Clock must by minimum 8Mhz. This requires the SoftwareSerial library.



    rdmkya wrote:

    If I can do with steering wheel controls I will share result


    Good luck
  • #22
    rdmkya
    Level 3  
    RigelInOrion wrote:

    ... so, the RX and TX signals from the radio are inverted so, you must first pass it through the inventer (NOT gate, look at the schema). Connecting directly will not work. However, it will not work or it will be at random if the bootloader will be on the microcontroller.


    thank you for your detailed answer. Does it work by radio TX RX pins cross connection to the mini iso without inverter? I thought it would work when the TX RX pins were cross-connection. I was review your scheme but I dont understand inverter connection on the bottom right.
    I don't know the Eagle program. Can you show me a printable circuit?
    I'm going to prototype with a punch card and try to find out.

    Very thanks for your interest and share knowledge.

    Emulator CDC dla radia Blaupunkt w Nissan Micra K12
  • #23
    RigelInOrion
    Level 12  
    rdmkya wrote:

    thank you for your detailed answer. Does it work by radio TX RX pins cross connection to the mini iso without inverter? I thought it would work when the TX RX pins were cross-connection. I was review your scheme but I dont understand inverter connection on the bottom right.
    I don't know the Eagle program. Can you show me a printable circuit?
    I'm going to prototype with a punch card and try to find out.


    The signal must be reversed and crossed otherwise it will not work. In the bottom right corner is the rest of the inputs that are unused. They should be connected to the ground according to the datasheet.
  • #24
    rdmkya
    Level 3  
    RigelInOrion wrote:
    rdmkya wrote:

    thank you for your detailed answer. Does it work by radio TX RX pins cross connection to the mini iso without inverter? I thought it would work when the TX RX pins were cross-connection. I was review your scheme but I dont understand inverter connection on the bottom right.
    I don't know the Eagle program. Can you show me a printable circuit?
    I'm going to prototype with a punch card and try to find out.


    The signal must be reversed and crossed otherwise it will not work. In the bottom right corner is the rest of the inputs that are unused. They should be connected to the ground according to the datasheet.


    Eureka! :)
    Thanks for all. It's working. My notes on this project;
    1) When signal not be reversed, it did not work. Did not even work unstable.
    2) Sound has not any noise. Clean and sufficient.
    3) Output volume low. I think, it need a preamp to the aux input before miniiso 19. and 20. pins.
    4) The last code you sent is out of attiny memory. I cleared the parts related to Acu Voltage in the code and made some memory.
    5) I didn't do anything for the steering remote control. I'm investigating how to listen to the remote control signals at Arduino.

    I worked for two weeks. I have learned to use NOT gate, attiny programming and more.
    Above all I had much fun.
    Thanks for all.
  • #26
    pnkra
    Level 13  
    RigelInOrion wrote:
    Można by ustawić pin 9 kostki miniiso w stan niski (telmute) wtedy radio odblokuje linie dla telefonu (pin 7 i 8). Niestety wejście to jest tylko monofoniczne.

    Co trzeba podać na ten pin 9, żeby wprowadzić w telmute? Masę, napięcie, czy może jakiś inny sygnał?
  • #28
    Kresche
    Level 1  
    Cześć Mam także Nissana Micrę i Chciałbym móc obsługiwać ten system.
    Gdzie mogę kupić modulator?
  • #29
    gibonada
    Level 1  
    I have Micra K12 and will definitely try this solution. I have some Arduino laying around that will try to emulate the CD Changer.
    Next step - forward the buttons from steering wheel via A2DP to the phone. Has someone recorded which buttons from radio and steering wheel are forwarded to the CD changer?
  • #30
    RigelInOrion
    Level 12  
    gibonada wrote:
    I have Micra K12 and will definitely try this solution. I have some Arduino laying around that will try to emulate the CD Changer.
    Next step - forward the buttons from steering wheel via A2DP to the phone. Has someone recorded which buttons from radio and steering wheel are forwarded to the CD changer?


    If you want to use arduino or another atmega328 based module for this, you will need to remove the booloader. I described the reason several posts above.

    Either way you can use my project. There is an emulation with bluetooth control of the radio buttons. I didn't have a working changer to detect all buttons, but the control buttons work. In addition, you can partially control the display.
    https://github.com/rigelinorion/nissan-micra-k12-radio-CDC-emulator