piątek, 14 listopada 2014

What you need to start



First of all i'm surprised why there is no information about this on the net. It's kind of taboo i think.

You need:
-Raspberry Pi
-HDMI to VGA adapter:

-VGA to RGBS adapter like this one:


-PiCAN or other MCP2515-based extension board for RPi. You can make one by yourself.
TJA1054 or similar (newer) CAN Transceiver is the best choice, because it can control DC-converter to shut down RPi and get lower quiescent current (single microAmps when sleeping).


You need to set specific resolution for HDMI:
root@pi:/boot# tvservice -s
state 0x12001a [HDMI CEA (21) RGB lim 4:3 x2], 720x576 @ 50.00Hz, interlaced


Important! You need to connect all negative pins of video signals together and then to the ground (at the 26 pin connector on RNS side):
4 – Video signal input, RGBS, negative (ground)
9 – Video signal input, RGBS, negative (ground)
11 – Video signal input, screening earth
24 – Video signal input, RGBS, negative (ground)

The code is available at github:
https://github.com/majonezz/rns510-tv-input

28 komentarzy:

  1. Hi,

    I love this idea! But I have two questions:

    1. Where do you store the Raspberry PI in your car? Behind the dashboard?
    2. Where do I get the executable tvservice? Is it the binary of compiling the source code provided at google code?

    Best regards,
    Andreas

    OdpowiedzUsuń
    Odpowiedzi
    1. Hello Andreas.
      1) I have my Pi stored in the trunk. I've run VGA cable from trunk to the RNS unit.
      2) You need to compile one for yourself unfortunately. It shouldn't be complicated if you have Raspbian with CANBUS modules installed. There are many tutorials on the net. You can do it for sure. :)

      Usuń
  2. Hi,

    thanks for your quick reply.

    1) Ah, I see. My plan was to store it in the arm rest between the two front passengers, but unfortunately, I do not have a power outlet or something similar there. However, I will find a place for that.
    2) Compiling should be no big deal. I just wasn't sure whether the called "tvservice" executable is the binary resulting from compiling your source code or if it is another program.

    Another question: while using the raspberry pi via the AV input of the RNS 510 (and with activated tv in motion, of course), is it still possible to use navigation and traffic information?

    OdpowiedzUsuń
    Odpowiedzi
    1. It acts exactly like stock TV tuner, so navigation will work in background when mirroring. Navi commands will be visible in MFA and audible in the speaker system. Traffic announcement works as usual, so when traffic interrupt is on the air the unit will switch to radio and then again to TV.

      Usuń
  3. I nearly understand you cool solution.
    You have my respect for impementing the bap-stack on the fly.

    But one question stays open:
    How does the screen-mirroring work?
    How does this work on android side and how does this work on raspi side.
    Did you integrate mirrorlink on your raspi? How did you do this? I couldn't find any hints at google how to do this.

    Thanks

    OdpowiedzUsuń
  4. Edu, thanks for your words. I'm using piracast: https://github.com/codemonkeyricky/piracast . I must say that mirast support for linux is very poor at the moment. There is no good solution yet as far as i know :( But you can try piracast.

    OdpowiedzUsuń
  5. Hi there, thanks for this.minhave ordered a pican2, has this the ability to control the DC or do you keep your Pi always on a constant 5v even when the car is off?

    OdpowiedzUsuń
  6. Hello John. I have modified pican board with different CANBUS transceiver - TJA1054. This chip is connected to the DC converter (via "INH" pin) and to the RPi (via two additional logical lines - EN and STB). I can send "go to sleep" command to the TJA and DC converter is then switched off. Quiescent current is very low in that case. If the bus is going awake again TJA sets inhibit signal to DC converter and whole system can boot again. Check "Application Hints TJA1055T" document by NXP.

    OdpowiedzUsuń
  7. Hello
    Its really nice that you share this information for all of us.
    I ran the code on a rPi but with no luck. Code seems to run fine and transmits & receives fine.but Video button on Media is Grayedout.
    Could you help me with this problem ?

    OdpowiedzUsuń
  8. Hello Rajan, try to add TV Tuner in your CAN BUS Gateway installation list. I forgot to mention it in my post, but it's very important. Please let me know if it solve your problem. Regards, Michał.

    OdpowiedzUsuń
    Odpowiedzi
    1. Hi Michał,
      Thanks for the quick replay.
      I tested on bench, probably that's the reason ?. I'll try again with RNS connected to car.
      Got another question, does it required RGBs signal present at video port to activate TV button ?
      can I PM you ? Got many questions

      regards
      Rajan

      Usuń
  9. Ten komentarz został usunięty przez autora.

    OdpowiedzUsuń
  10. Odpowiedzi
    1. Well, it's up to you. I use HDMI to VGA converter with 3,5mm audio jack. Audio from Pi's output is poor, but you can try with it as well. Just connect L,R and GND to 26 pin connector of the RNS. The pinout is printed at the sticker on RNS cover.

      Usuń
  11. Hello MrMajonezz

    I have a question... I've ordered all part, made my pcb from schematic and now i want to connect my raspberry pi with pican2 to my rns510.
    I've searched the web but cannot find anything about how to connect the canbus wires to the rns510.
    My question is: can i solder the can-H and can-L wires from the pican2 direct to the wires that goes into the rns510 or doe i need some sort of splitter?
    I understand that i need a 120Ohm resistor as terminator (on board of the pican2)
    Is there some schematic of how to proper wire multiple canbus interfaces?
    Greets E. Ouwens

    OdpowiedzUsuń
  12. Hello. You can solder CAN H and L directly to canbus wires at RNS connector. You can strip off some insulation from wires and solder there new wires. No need of using terminators. If there are one, please take it off because it can impact the canbus. Regards.

    OdpowiedzUsuń
  13. So if you connect rpi on rgb pins of the rns510, do you have the rpi video output the whole time or how do you switch between rpi and radio i.e. rnx

    OdpowiedzUsuń
  14. It acts like TV tuner, so to escape from it you can just press "Radio" or "Map" or just tap screen and switch back to "Audio".

    OdpowiedzUsuń
  15. Hello...Got evrything working but i'm struggling with the video settings. I've set it to "state 0x12001a [HDMI CEA (21) RGB lim 4:3 x2], 720x576 @ 50.00Hz, interlaced" but when I boot, the console text is hardly readable. When i boot into desktop, text is also not readable. Are there some special HDMI timings, setting I have to set? Could it be that there are some special sync settings to be set? Can you help me? Thanx

    OdpowiedzUsuń
    Odpowiedzi
    1. Hi Emiel. No, that setting should be enough. Double check your VGA to RGBS converter. All of the negative video pins should be connected together and to the gnd.

      Usuń
    2. GREAT It's working!!!
      I've checked all my RGB+Sync connections and noticed that I've forgotten to solder the Sync input ground....
      Thanx a lot for your help :-)

      Usuń
  16. Oke thanks...I wil double check next weekend ;-)
    I'll let you know

    OdpowiedzUsuń
  17. Cześć a czy twoje rozwiązanie zadziała na RNS 315??

    OdpowiedzUsuń
  18. Hello MrMajonezz,
    Thanks for the amazing write-up!
    I tried to run the script on my raspberry pi with a CAN interface, but it doesn't seem to be working. I get the following message in the console when I run the script : "can0 at index 3" and it just hangs there. The 'video' button on the RNS is still greyed out, even though I have added the TV tuner to the installation list in the gateway.
    The vehicle is a 2009 Passat SW.
    Would you be able to help me with this issue?
    Thanks a lot!

    OdpowiedzUsuń
  19. Hi, Love this solution and I'm going try it.
    My Nav version is old and I want to bin that function and use nav via the rPi using android auto or google maps.
    This should work through the mirror link? Do you think I could use the Nav button reassigned to activate the function on the rPi?
    Regarding the audio, I understand the 3.5 jack on the rPi is low quality. So you used the HDMI to VGA or VGA o RGBS and extracted the audio there? I want to use my rPi and connected hard drive to send audio files as my RNS 510 won't read FLAC files
    Thanks in advance
    Julian

    OdpowiedzUsuń
  20. Hi,
    could I use this without a pi and PiCan to connect a rearview camera?
    Thx
    Up4

    OdpowiedzUsuń
    Odpowiedzi
    1. Oh forgot to mention,I have an adapter that converts the camera Signal to 640 x 480 PAL (50 Hz) VGA

      Usuń