Elektroda.pl
Elektroda.pl
X
OptexOptex
Proszę, dodaj wyjątek dla www.elektroda.pl do Adblock.
Dzięki temu, że oglądasz reklamy, wspierasz portal i użytkowników.

Emulator CDC dla radia Blaupunkt w Nissan Micra K12

RigelInOrion 02 Cze 2020 15:41 4866 46
  • #31
    mattydaws
    Poziom 5  
    Hello, I am Matt, I downloaded the Arduino sketch and then uploaded successfully to Attiny85 using Arduino UNO as ISP. Then I connected the Attiny 85 to my Micra k12 original stereo (Blaupunkt BP2346) in this way:

    Attiny PIN 5 -> PIN 13 (ASCII OUT CDC)
    Attiny PIN 6 -> PIN 14 (ASCII IN CDC)
    Attiny VCC -> 5V
    ATTINY GND -> GROUND

    nothing seems to happen, I turn on the radio and click SRC button, but CHANGER doesn’t appear. I noticed that between radio and Attiny should be an IC(hex inverter 4069), so if I buy it, can anyone help me to connect in right way? I love this project and I am very interested, thanks for sharing your time and your experience.

    Emulator CDC dla radia Blaupunkt w Nissan Micra K12
    Emulator CDC dla radia Blaupunkt w Nissan Micra K12
  • OptexOptex
  • #32
    RigelInOrion
    Poziom 12  
    Hi Matt I suggest that if you don't want to create a PCB from the project to use a prototype board. It will be easier for you to put all the elements together. Of course, Inventer is necessary! Without it, attiny will not communicate with the radio. Also remember that attiny cannot have a bootloader. Emulator CDC dla radia Blaupunkt w Nissan Micra K12
  • OptexOptex
  • #33
    mattydaws
    Poziom 5  
    Ok thanks for the answer, I have a empty PCB so I can use to put all the elements together, but can you show me the links between attiny85 - inverter - Radio? I have created a lm317 regulator that switch 12V from radio to 5V. And another question, how I can delete bootloader from Attiny? I already it from arduino IDE :(

    Dodano po 4 [minuty]:

    I want to buy this IC as Hex Inverter, is it ok? Will work properly? Is it the same that you used in the project?

    This is the eBay link: https://www.ebay.it/itm/360828694825
  • #34
    RigelInOrion
    Poziom 12  
    If I find some time I will try to figure out how it should be placed on the plate.

    mattydaws napisał:
    And another question, how I can delete bootloader from Attiny? I already it from arduino IDE :(

    If you bought attins as a separate chip and not on the board, the bootloder
    attiny does not have one.
    Which command in arduino do you use to upload the program to attins? What programmer?

    mattydaws napisał:
    This is the eBay link: https://www.ebay.it/itm/360828694825

    Yes this inverter will be good.
  • #35
    mattydaws
    Poziom 5  
    Ok bought the inverter, I will have it in max 7 days.
    I used Arduino UNO to upload program successfully to Attiny85.
    Programmer : Arduino as ISP.
    Internal clock : 8 MHz
  • #36
    RigelInOrion
    Poziom 12  
    Well. Attiny doesn't have a bootloader in your case. Clock set well. It's best if you power the radio pins for some 7805 or 1117. There will be fewer soldering components.

    I wonder why you don't want to make pcb from the project? It would be much easier for you to run the emulator.
  • #37
    mattydaws
    Poziom 5  
    Ok, but i Click “load bootloader” button and it was done successfully, was I wrong ?
  • #38
    RigelInOrion
    Poziom 12  
    You should use the "Upload using programmer" command then the IDE will only upload the program to attins. If you upload a bootloader and later use the "Upload" command when starting the emulator, the bootloder will start first, delaying the start of the program. And the radio tries to communicate with the changer very soon after launch. If it doesn't get an answer, it won't start communication again until it is restarted.


    So...
    You set the programmer as Arduino as ISP
    You set attins to internal 8Mhz timing
    And you click "Upload using a programmer"
    This is the program upload procedure. I don't know if the new attiny has the internal clock divided by 8 and whether the IDE can remove this setting during uploading. But it remains to be seen when you have everything folded.
  • #39
    mattydaws
    Poziom 5  
    thanks for explaining the steps to follow for a correct upload, I will do this way. However I got the cd4069, when you have time can you explain how to connect it?

    Emulator CDC dla radia Blaupunkt w Nissan Micra K12 In the meantime I'll upload a photo so you can use it to draw the connections from the pins.

    Dodano po 47 [minuty]:

    I drawn these connections by looking at your scheme, are correct?:

    - PIN 14 of the CD4069 to the voltage (+ 12V).
    - PINS 7.9.11.13 of the CD4069 to the GND.
    - PIN 2 of the CD4069 to the PIN 5 of the ACTINY85
    - PIN 3 of the CD4069 at the PIN 6 of the ATTINY85
    - PIN 1 of the CD4069 to the PIN 13 of the radio car.
    - PIN 4 of the CD4069 to the PIN 14 of the radio car.

    Emulator CDC dla radia Blaupunkt w Nissan Micra K12
  • #40
    RigelInOrion
    Poziom 12  
    Yes. It should be OK.
    Wait. The inverter power supply should be connected to the attina power supply. That is after the 5v regulator.
    - PIN 14 of the CD4069 to the voltage (+ 5V).
    - PINS 7.9.11.13 of the CD4069 to the GND.
    - PIN 2 of the CD4069 to the PIN 5 of the ACTINY85
    - PIN 3 of the CD4069 at the PIN 6 of the ATTINY85
    - PIN 1 of the CD4069 to the PIN 13 of the radio car.
    - PIN 4 of the CD4069 to the PIN 14 of the radio car.
  • #41
    mattydaws
    Poziom 5  
    Ok,so I have to connect pin 14 of cd 4069 to the same 5V that powers attiny85. Tomorrow I will sold the pcb and try... how about the 10k resistor, have I to connect it between Attiny85 Reset pin and 5V? Is an automatic reset of attiny possible, without installing the resistor?
    Very thanks for your help!!!!
  • #43
    mattydaws
    Poziom 5  
    Hello, I programmed (successfully) attiny 85 using Arduino UNO, set arduino as isp, 8mhz internal clock... then connected to the 5V GND, and pin 5-6 with cd4069, as in figure, and finally connected pin 1 and 4 of Cd4069 to the 13 and 14 of radio... but nothing, changed source doesn’t appear :( :( where Am 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 I wrong?
  • #44
    RigelInOrion
    Poziom 12  
    Hey. You have a little mess with these wires.
    First of all, I can't see the bottom of the plate.
    Secondly, why don't you power the board with 16.17 radio pins? The radio should be powered in section A pin4, pin6, and the board should be powered from 16.17 of section C-3.
    Third, why is attiny not soldered in the plate? It would sort things out a little.

    Emulator CDC dla radia Blaupunkt w Nissan Micra K12
    Should be like on this picture
    If it does not work, swap the wires on radio pins 13,14.
  • #45
    mattydaws
    Poziom 5  
    Ok thanks for answer, I did the same of you, but 2 difference:
    - I took 12V for the PCB from PIN 4 and GND from radio chassis (maybe this is a problem (?))
    - I connected the 12V to 4 and 7 pin of the radio and not 4 and 6, 6 is pin for orange illumination led (I read).
  • #46
    mattydaws
    Poziom 5  
    Now I connected the 12V to cdchanger 12V output. So,only when I switch on the radio, the circuit switches on. So, 12V goes to lm317, and 5.05V output goes to the Attiny85 and Cd4069 IC. GND are well connected.

    I put the output of the radio (PIN 14) (Red cable in photo) to the PIN 1 of CD4069 (Input 1), PIN 5 of the attiny85 to the PIN 2 of the IC (Output1), PIN 6 of the attiny85 To the PIN 3 of the IC (Input 2), finally, input of the radio (PIN 13) (Black cable in photo with IN label) to the PIN 4 of the IC (Output2).

    However, if I press SRC button on the radio, it switches only between Radio and CD(Inserted). CHANGER doesn’t appear. Where am I wrong? Please anyone can help me? I have the radio on my desk from 4 Weeks. Thanks in advice.


    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
  • #47
    RigelInOrion
    Poziom 12  
    Hi mattydaws. I conducted a test with fusebits and it appears that ...
    1. The Arduino IDE does not set fusebits when you download the program, you also have the program loaded, but the fusebits settings remain plastic, so the clock is at 1Mhz.
    2. After uploading the bootloader from core attiny85 arduinoIDE sets fusebits to 8Mhz clock.

    So the procedure looks like this ...
    0. Set the programmer to AVR ISP.
    1. Upload internal 8Mhz bootloader to attiny85.
    2. Upload the program using the "upload using programmer" command
    3. Connect everything as it was at the beginning without swapped cables and it should talk.
    4. Buy yourself a USBASP programmer and use AVRLab or MkAVrCalculator - you will make your life easier.