Volvo RTI navigation project with Android (Odroid platform) controlled with Arduino
Username
Do you already have an account?
Forgot your password?
  • Log in or Sign up

    Results 1 to 7 of 7
    1. #1

      Volvo RTI navigation project with Android (Odroid platform) controlled with Arduino

      Hi everyone,

      I haven't been too active on this forum, I just consume the information here so I thought I'd give back something to the community.

      I've been driving a really lot the last couple of months, long trips outside the country (around Europe) and for navigation I've used a GPS that attaches to the windshield and my phone with Waze. Waze is really great so I've been switching more and more to my phone and I'm ditching the GPS slowly (still have to use it abroad because of roaming cost). The problem is that I don't like the idea of keeping my phone in the sun so I've mounted a holder to the HU and I keep it there but it's not really "in my face" down there and I do have to "give up" the phone a bit when I'm using it, it's not a major problem because it's connected to the HU via bluetooth and I can have calls.

      While driving at night I like to have a sort of heads up display of the road in my field of view. Another minus with the phone is the smaller screen size.

      My solution: OEM Volvo RTI screen which "runs" Android. Something that is a bit more complicated then it sounds...as I found out later...

      A little heads up, I don't have a lot of experience in the field of electronics (next to nothing) and not a lot of knowledge in programming hardware components (a few PIC controller projects in uni a few years ago turning on LEDs ).


      First step in the project was to get an RTI screen with the lift mechanism, which I got from a donor car from a local breaker.
      Next steps were identifying the problems and solving them. First problem, the RTI screen...well it's a bit more complicated then your average desktop monitor... A few sleepless nights searching on the internet turned up some answers on what to use and how to turn on the screen. Second problem, finding something that runs Android (for Waze, Youtube and other apps) well enough to be used day to day, "the internets" helped me out here too. I'll detail below.

      So here's the current setup:



      As you can see there are 3 components in the setup, firts off the OEM RTI screen, there's an Arduino Mega controller (an open-source electronic platform, I'll explain it's use later on) currently I switched the Mega to an Arduino Nano and last but not least an Odroid running Android (a sort of Raspberry Pi - don't mistake it for a raspberry pie it's not the kind of thing that you eat - that runs Android really well).


      A bit more in detail:

      The RTI is connected to 12V, ground and 12 ACC. Currently it's running off of a 12V power supply which has 12V and ground, the power supply is connected to the connector on the right side (with 5 pins) which is normally blue, you need to connect 12V to PIN 1 (right most pin), ground goes to PIN 5 (left most pin) and ACC - which I understood to be live only when the engine is running - also takes 12V so I connected the 12V from the power supply to that too, ACC is PIN 3.

      So as follows:

      PIN 1 - 12V
      PIN 5 - Ground
      PIN 3 - 12V


      PIN 2 and PIN 4 is I guess a backup connection for 12V and ground I didn't connect them up (PIN 2 - 12V and PIN 4 - Ground).


      The other connector is the more interesting one, the green one on the left side. This in my setup has 3 important pins, PIN 4, PIN 7 and PIN 10.

      Green connector pins explaind:

      PIN 4 - serial connection (this is the communication port, we'll use it to send commands to the RTI, it's a unidirectional communication, the RTI is always the receiver)
      PIN 7 - ground (you need to ground this to your controller)
      PIN 10 - composite video in (we'll send the video feed here, I'm using NTSC but PAL is available on this pin too)

      The Arduino is used to start the RTI screen and lift the screen up, also it can control the brightness of the screen.

      Connecting the Arduino to the RTI: The ground pin I think is self explanatory, you hook PIN 7 to a ground on the Arduino. This is easy because the Arduino has all of it's pins marked you just connect it to something marked GND and you are good. PIN 4 is the interesting one because this needs to send through serial commands so we will need to connect this up to a serial communication pin on the Arduino too, on the Arduino Mega you have a few transmission pins, the Arduino Nano has just one. It's again easy to find the serial communication pins on the Arduino because they are marked (on the Mega because there's more then one you also have a lable "Communication" where you'll find all the communication pins) we will need to transmit data so you should be looking for TX pins, for best practice I suggest using TX0 pin even on the Arduino Mega and you only have the single TX0 pin on the Nano. (I also used these so my code is compatible with PIN TX0).

      So this is the setup for Arduino to RTI:

      PIN GND on Arduino -> PIN 7 RTI
      PIN TX0 on Arduino -> PIN 4 RTI


      Those who have been paying close attention know that there's one component left. The Odroid which is running Android and will output from the CVSB pin (composite video, NTSC) to the RTI.

      We have one pin free left from the 3 that we will use in our setup, PIN 10. We need to hook that up to the Odroids video output and we need to ground the Odroid to the whole setup. For ground I grounded the Odroid (there's a ground pin right next to the CVSB on the Odroid) to the Arduino but it can be grounded directly to the RTI too.

      So as follows:

      CVSB OUT on Odroid -> PIN 10 on RTI
      Ground on Odroid -> Ground on Arduino (GND Arduino or any other ground in the setup, the whole RTI metal casing is ground)


      Here's an image of the whole setup that I tried to explain in the above lengthy text (if you got lost in it):



      The Odroid outputs NTSC video and the RTI is set up to receive NTSC too. RGB can be used somehow too, but I haven't yet got to that. I've been working on this just the last weekend, this is the progress that I made.


      Now, the more complicated bit (not that complicated) is programming the Arduino to fire everything up. If anyone has ever coded in C, C++ or any other derivative of these, or more complex programming languages you should be good to go. For the novices in programming I will be your tech support if needed.

      The idea is that the RTI needs to receive the "stay alive" command continuously, the "stay alive" command is nothing more then telling the screen what video mode it needs to use, what brightness it should be on (this can be omitted but you still need to send a command instead) and another bit of data, currently not know what this is, I've searched around but didn't find anything on it but to run everything it's needed. Pure speculation on my part for the unknown bit is that it's a sort of end of line character so that the RTI knows that it can execute the command...this is just my thought, could be completely wrong.

      I'm using the Arduino to send out these bits and bytes. A more detailed explanation of the 3 pair of bytes we need to send to the RTI:

      RTI screen mode: There are several screen modes the RTI can operate on, as follows RGB, NTSC, PAL. Also the first pair of byte controls the on/off of the screen, if you send out either the RGB, NTSC, PAL command the screen will turn on, if you send out the OFF command it will shut down and retract.

      The pair of bytes in HEX value for the screen mode: RGB = 0x40; PAL = 0x45; NTSC = 0x4C; Screen off = 0x46;

      Screen brightness: There are 16 values for the screen brightness, here are the HEX values from 1 to 16 -> 0x20, 0x61, 0x62, 0x23, 0x64, 0x25, 0x26, 0x67, 0x68, 0x29, 0x2A, 0x2C, 0x6B, 0x6D, 0x6E, 0x2F

      The unknown data (probably pair of byte to start executing the command): 0x83 - this needs to be sent out last

      Example of turning on the screen with NTSC mode, full brightness: 0x4C 0x2F 0x83 (explination: NTSC | BRIGHTNESS | "Execute Command") - if you want the screen to stay up you need to continuously send this data out, I'm sending it out every 100 ms (added a delay of 100 ms).

      A video of my first try:



      In the above video I'm using the Arduino Mega but I switched it out with the Nano later on. Also there was a problem with the screen, the electric motor kept running even after the screen went up or down, that turned out to be a connector that was not plugged in to it's socket inside the RTI, that's what you get when you take it apart too many times, solved it by plugging in back in.

      The screen isn't stellar but it will suffice for now, some images:




      Another video with a bit of progress, I use push buttons to operate the up/down (turning on/off) motion of the screen and the brightness:



      I haven't seen a full guide to implement this so that's why I dared to make such a lengthy post. The code I use isn't entirely my work, it's based on something I found on "the internets" I will find the source again and link it here. That was for a V50 tilt screen.

      Here's an example code to get you started:
      Code:
      // Connect:
      // Screen PIN 4 to Arduino PIN 2 (TX) 
      // Screen PIN 7 to Arduino ground
      
      enum display_mode_name {RTI_RGB, RTI_PAL, RTI_NTSC, RTI_OFF};
      const char display_modes[] = {0x40, 0x45, 0x4C, 0x46};
      const char brightness_levels[] = {0x20, 0x61, 0x62, 0x23, 0x64, 0x25, 0x26, 0x67, 0x68, 0x29, 0x2A, 0x2C, 0x6B, 0x6D, 0x6E, 0x2F};
      
      
      //int current_display_mode = RTI_OFF;
      int current_display_mode = RTI_NTSC;
      bool send_brightness = true;
      char current_brightness_level = 13;
      
      //delay between bytes, ms
      const int rti_delay = 100;
      int once = 1;
      
      void setup() {
        Serial.begin(2400);
      }
      
      void loop() {
      
        rtiWrite(display_modes[current_display_mode]);
        
        if (send_brightness)
          rtiWrite(brightness_levels[current_brightness_level]);
        else
          rtiWrite(0x40);
          
          rtiWrite(0x83);
        
      }
      
      void rtiWrite(char byte) {
        Serial.print(byte);
        delay(rti_delay);
      }
      This will continuously keep the screen alive, if you want to shut it down you will need to change int current_display_mode = RTI_NTSC; to int current_display_mode = RTI_OFF; and update the Arduino. I just added that code so you can try everything. If you for some reason don't manage to update it just unplug the Arduino, the RTI will notice that it's not getting commands and it will automatically shut down.

      Here's a better code where I use push buttons to operate the screen:
      Code:
      // Connect:
      // Screen PIN 4 to Arduino PIN 2 (TX) 
      // Screen PIN 7 to Arduino ground
      
      enum display_mode_name {RTI_RGB, RTI_PAL, RTI_NTSC, RTI_OFF};
      const char display_modes[] = {0x40, 0x45, 0x4C, 0x46};
      const char brightness_levels[] = {0x20, 0x61, 0x62, 0x23, 0x64, 0x25, 0x26, 0x67, 0x68, 0x29, 0x2A, 0x2C, 0x6B, 0x6D, 0x6E, 0x2F};
      
      
      //int current_display_mode = RTI_OFF;
      int current_display_mode = RTI_NTSC;
      bool send_brightness = true;
      char current_brightness_level = 13;
      
      //delay between bytes, ms
      const int rti_delay = 100;
      int pinNumber = 5;
      int pinBrightness = 6;
      int stateChange = 0;
      
      void setup() {
        Serial.begin(2400);
      }
      
      void loop() {
      
        int button;
        int buttonBrightness;
        
        pinMode(pinNumber, INPUT);
        digitalWrite(pinNumber, HIGH);
        button = digitalRead(pinNumber);
      
        pinMode(pinBrightness, INPUT);
        digitalWrite(pinBrightness, HIGH);
        buttonBrightness = digitalRead(pinBrightness);
      
        if (button == 0) {
          stateChange = abs(stateChange - 1);
        }
      
        if (buttonBrightness == 0) {
          current_brightness_level = current_brightness_level + 3;
          if (current_brightness_level == 15 || current_brightness_level == 16) { current_brightness_level = 1; }
        }
      
      
        if (stateChange == 1) {
          current_display_mode = RTI_NTSC;
        } else {
          current_display_mode = RTI_OFF;
        }
      
        
        rtiWrite(display_modes[current_display_mode]);
        
        if (send_brightness)
          rtiWrite(brightness_levels[current_brightness_level]);
        else
          rtiWrite(0x40);
          
          rtiWrite(0x83);
        
      }
      
      void rtiWrite(char byte) {
        Serial.print(byte);
        delay(rti_delay);
      }
      The push buttons are connected to the Arduino through the digital pins, in this case PIN 5 (on/off) and PIN 6 (brightness) and both buttons are grounded to the Arduino (in essence I'm putting voltage on PIN 5,6 and watching when it makes contact with ground).

      That's kind of all for controlling the RTI and outputting video to it.

      My problems as of now:

      1. The biggest one is powering off the Odroid safely after the engine stops. I will need to make a controller that notices if the engine is off and commands the Odroid to shut down, I haven't researched it yet.
      2. Finding all the right wires on the car and hooking it up, hopefully not setting everything on fire.
      3. Something to control the Odroid, currently I have a mouse hooked up. I want to in the first run hook up a touch pad and install it behind the shifter, in the cup holder. That way I can close it and hide it. I'm also planning on adding a touch screen to the RTI assembly, I have a 6.2" one that will fit really well...but I need to write a controller/driver for it so I can connect it though USB to the Android...need to research it.
      4. I also want to change the screen...I ordered a Chinese 7" screen with touch panel (would need to modify RTI because it's bigger but just the plastic part, the metal has just about the clearance to fit everything in with a bit of bending). But being a complete novice in electronics I managed to send 12V to the ground of the screen and connected the 12V rail to the ground of the power supply, reversed polarity...fried a few things, popped a few caps. I changed the capacitors and bypassed a voltage regulator but the main chip is heating up and I can only input RGB, can't switch to HDMI. Will need to investigate further.

      The Odroid is running a normal Android, I can use any app that's on the Play Store. I'll use Waze, Google Maps and iGO for navigation.

      Plan for the future besides the RTI is to make a simple AUX IN for the HU, connected to the back where the CD changer goes, for now it will be just a simple AUX IN, later on I will try to make something that works like the Grom, Yatour devices.

      I'm also aware of the iMIV but as I'm planning on switching out the screen it would be almost useless, I would just use it for the lift mechanism and audio in. I already have those taken care of at the fraction of the cost of an iMIV.

      Let me know if you have questions.


      PS. Theoretically this should work on any P2 Volvo (up to 2009), and the code that I used was tested by the guy who wrote it on a V50 so it should work on that too.
      Last edited by arpi2390; 04-10-2017 at 08:14 AM.
      2003 S60 2.0T - Stock
      1984 360 GLS 2.0 - Stock

    2. Remove Advertisements

      Advertisements
       

    3. #2
      Junior Member Njenks's Avatar
      Join Date
      Mar 2013
      Location
      CT
      Posts
      220
      Wow, I like this. Keep us updated.
      '04 Audi A4 Avant 6MT - Daily - 269k
      Past: '98 S70 N/A, '96 854 GLT
      Searching for my next Volvo...

    4. #3
      Thanks. Unfortunately progress will be slow because I have little time to tinker with this but as I make progress I will keep everyone who's interested updated.
      2003 S60 2.0T - Stock
      1984 360 GLS 2.0 - Stock

    5. Remove Advertisements

      Advertisements
       

    6. #4
      First of all,

      Congratulations about this project.

      I think it´s awesome.

      Past months I was also retrofiting a RTI screen for my S60 and I think we can change some ideas about it. I did it with electronics (with some friends help). I bought a 6.5 chinese screen and I swap it for the RTI one. I was able to up/down the RTI with a push button. When I fit everything on the car it worked well the first day, but the second day the up/down function worked intermittently. So I think something in the circuit board broke. I have to re-do the circuit board.

      I will write tomorrow about some ideas I have for it and maybe It is useful for you and vice versa.

    7. #5
      Hi and thanks.

      I also want to change out the screen as the OEM one is a low resolution screen 480px x 242px if I'm not mistaken. I went ahead and bought a 7" Chinese touch screen too, but I managed to send 12V the wrong way into the LCD controller board so I popped a few things and fried some others. I managed to change some capacitors and bypassed some voltage regulators so the screen starts up but the controller board gets hot really fast. I'll have to either fix it or order another one, also to fit the 7" screen I will need to modify the plastic part of the RTI. I'm not sure of the quality of these Chinese screens, I don't want to set anything on fire...in there they shut down if there's too much heat but you never know...

      To modify the plastic holder I plan to laser cut it and add 1 cm to the width and height, I will "glue" everything back together and I will smooth out everything with plastic...uuum not sure what the correct English term is...putty (I guess) and I will re paint it with plastic paint. It should come out good and no one should notice that it's cut in half. That 1 cm of height/width should allow me to fit the 7" screen in and there's just about 1 cm and a bit of clearance in the metal frame if you bend outwards or cut those rails that are under the screen where those white guides slide on, so that shouldn't be a problem.

      What are you using for video output, what device have you hooked up to the screen?
      2003 S60 2.0T - Stock
      1984 360 GLS 2.0 - Stock

    8. #6
      Quote Originally Posted by arpi2390 View Post
      I managed to send 12V the wrong way into the LCD controller board so I popped a few things and fried some others.
      Same thing happened to me. First time I connected it I put the 12v cables the wrong way. It started to heat a lot but luckily I realized and nothing was burnt.

      Quote Originally Posted by arpi2390 View Post
      I'm not sure of the quality of these Chinese screens, I don't want to set anything on fire...in there they shut down if there's too much heat but you never know...
      Yeah.. I was a bit frightened by that also.
      I think best thing is to put it a dedicated fuse for the screen itself

      Quote Originally Posted by arpi2390 View Post
      To modify the plastic holder I plan to laser cut it and add 1 cm to the width and height, I will "glue" everything back together and I will smooth out everything with plastic...uuum not sure what the correct English term is...putty (I guess) and I will re paint it with plastic paint. It should come out good and no one should notice that it's cut in half. That 1 cm of height/width should allow me to fit the 7" screen in and there's just about 1 cm and a bit of clearance in the metal frame if you bend outwards or cut those rails that are under the screen where those white guides slide on, so that shouldn't be a problem.
      I can´t imagine how a 7" screen could fit in the hole. Even if you cut and glue the case I think there are other things as you say, the metal frame, that could touch it in the up/down movement.

      I mean.. I hope you are right, I wanted to fit a 7" at first. But when I had the RTI disassembled and I measured it I went for the 6.5
      The good thing about buying a 7" is that there are thousands of options to choose. With a 6.5" is much more complicated to buy one, I didn't found a 6.5" with the same resolution as you would find for a 7" screen.

      I bought my screen with the touch panel but I break it while pulling apart from the screen itself. Anyway, the visibility of the screen with the touch panel is much worse and I think the screen is far away to manage it touching. I´m a bit taller and for me I think it´s too far. I bought it just in case I put one day a car computer but for the moment I´m not using it.

      Quote Originally Posted by arpi2390 View Post
      What are you using for video output, what device have you hooked up to the screen?
      Good question. I passed a lot of time thinking about it.
      As you, I always use Waze. So I had to choose something to use it, and something that was able to update frequently. Finally I decided to use it with my phone, an iPhone.
      I know that using with a phone can be a little weird but with some gestures and with Siri I think it can be useful and practical. I also thought about using an Android device but I was not sure about the functionality and usefulness of operating it with a "mouse" or something.

      Despite of these, I even looked for some trackpads and other options that we can use with.

      Tomorrow I will explain better.

      btw: where are you from?
      Last edited by xuanxo02; 04-12-2017 at 01:39 AM.

    9. #7
      The 7" with the modifications to the plastic will fit, the clearance will be about 2 mm on each side (if I bend those two guide rails), but I'm going to get a second RTI to try it on. If I mess something up I want to have at least the backup original screen.

      I'm not an iOS user so this might sound like a dumb question but how did you connect the screen with the HDMI connector to your iPhone and how do you mirror the screen? I think it's a great idea, especially if you put a phone holder somewhere around the HU, then you can easily reach it.

      My idea is to use a trackpad that I will install behind the shifter in the cup holder (when not in use I can close the lid) and use that to operate the device when on the road. When stationary I will use the touchscreen (hard to reach but not a problem when you're stopped) to enter addresses and other things faster.

      I'm from Transylvania, Romania (Europe).
      2003 S60 2.0T - Stock
      1984 360 GLS 2.0 - Stock

    10. Remove Advertisements

      Advertisements