PDA

View Full Version : Volvo RTI navigation project with Android (Odroid platform)


arpi2390
Apr 10th, 2017, 11:01
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 :D ).


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:

https://lh6.googleusercontent.com/k0RMFRFRbRbT_-68SJFGE5sVhm6T9MxO_psAJwLvD_-_1WWPtLoLGKa6kcPcck5f2KRoGO6wQ306SGM=w1920-h1014-rw

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):

https://lh5.googleusercontent.com/kfMmqfcTcMjbsF16MTAieKKhZeJbZTV03sRFApIh5ylGfErMCS n6Lx7y6NvolnsYDDFEx_-K90R3buI=w1920-h1014-rw

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:

https://www.youtube.com/watch?v=AuOx__sRwuQ

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:

https://lh3.googleusercontent.com/S8xTvqrWrX98AHMx5aPXfJyNVqBAxwIlAxtOpFT9_M-S8FroTbYDFszCZ4lR678IwEWPMYUZaYxPuC0=w1920-h1014-rw


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:

https://www.youtube.com/watch?v=bGd31lbvm7o

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:
// 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:
// 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.

arpi2390
Apr 10th, 2017, 15:19
Missing images in the above post:

Current setup:
https://www.dropbox.com/s/t6u1b4uhzd7bf20/vIMG_9503_1200.jpg?raw=1

How it's all linked:
https://www.dropbox.com/s/n1sxoows9osua9s/vIMG_9519_exp_1200.jpg?raw=1

RTI screen image quality:
https://www.dropbox.com/s/nau691jib3bn6md/vIMG_9528_29_1200.jpg?raw=1

If someone could edit the above post and change out the images that would be great. Thanks.

DT19
Apr 11th, 2017, 15:02
Oh crap! Why didn't you post this 3 weeks ago? I've just ripped everything out of an RTI unit and fitted a 7" screen and controlled the motor with an Arduino Uno.

At the start I searched the internet for days looking for the pinouts before giving up and binning everything except the frame.

arpi2390
Apr 11th, 2017, 16:00
Look at the bright side, you have a (I'm guessing here) brand new screen in with higher resolution probably. What did you use for the screen?

I also have a cheap Chinese 7" LCD touch screen, but I managed to mostly burn the LCD controller sending in 12V the wrong way...I changed some caps and for now bypassed some voltage regulators and it starts up but it heats up quickly.

Anyway I wanted to add the above LCD to the RTI by laser cutting the plastic frame and adding 1 cm of plastic to the width and height, that should allow me, in theory, to add a 7" screen and the metal case has just about the clearance to allow that if I bend the two ends that go inwards and are the rails for those little white plastic guides on the bottom of the screen. But that will involve cutting plastic, fusing it together and using some plastic putty (not sure if that's the correct term in English) and a working screen.

As for the controller you could have used an Arduino Nano instead, it's a lot smaller and works just as good. It would fit better in the RTI case.

The information about the pins and the serial connection is out there but it's hard to find and to decipher what's what. That's why I put together the above tutorial/explanation. Everything is there with pictures, I'll also add diagrams, and if needed I'll further explain.

Hope it will help others. :)

P.S. The Arduino Uno might be better suited for the CD-Changer emulator that I want to make if you want to try that out. But I'll need a couple of weekends to work that out and a working HU in the house on my desk (still need to buy one) so that I can test it in house.

JRL
Apr 11th, 2017, 16:34
Now that is bloody brilliant! Unfortunately I don't have the hole in the dash for the screen, speaker in the way but I have been thinking for a long time of replacing the stereo with an android tablet, too much work though I think.

arpi2390
Apr 11th, 2017, 18:31
You can replace the full speaker with an RTI screen and speaker combination, granted the speaker is smaller I don't remember the exact size.

As for adding a tablet in place of the HU, that's a bit tricky. Really depends on what route you want to go on, you can either keep the whole HU unit and just put a tablet in front of it and add an AUX IN for the HU from the tablet. The AUX IN isn't simple either, unfortunately. Or you can get rid of the HU, wire up the tablet to an external amp (either OEM or aftermarket) but you won't have any FM/AM radio.

I myself would keep the HU, remove some unnecessary components (CD drive or cassette on older models), fit the tablet somehow in the HU casing, obviously make a cutout for the tablet's display (laser cutting would yield good results) and connect everything up, move the LCD display and buttons of the HU somewhere so even if you want to switch to radio you have control and you can see what's going on.

For the above there's an even more complicated way of going about, where you can control all of the functions of the HU from within the tablet but for that you need good knowledge of the Android OS and micro controllers.

The third and most simple option is just getting a 2DIN Android device/player, there are quite a few Chinese products out there. That can be wired up to the existing system just like any other aftermarket stereo.

arpi2390
Sep 4th, 2017, 09:54
Hi,
I've been reading through you instructions for thr RTI/Odroid project and I think I might give it a go. I did something similar already and fitted and 8" Android tablet using an arduino to control the up/down bit. After using it for a while I think the screen is a bit too big and it doesn't look right. I've now got myself another unit to play with but I'm already stuck. My unit has blue and grey connectors rather than blue and green in your instructions. Do you know the pinout for this please?
Regards
Andrew

Hi,

I can't yet reply to PMs because I don't have enough posts (30 is the limit) so I'll reply here if it's not a problem.

The actual connector on the RTI unit is grey if I remember correctly, the bit that slides into the connector is green. I kind of left the project at the stage that I posted last time because I didn't have time for it so I don't remember how everything looks but I'll check it later today.

I'm pretty sure the pinout is the same and you only have to connect 3 things on that connector, a ground which is easy to test if you have a multimeter, the other two is the serial pin and CVBS pin (composite video), that can be done with trial and error if the pinout isn't the same but as I've said I don't think it was changed at all throughout the years. If I remember correctly it's even the same on the S40/V50 (2004+) models where the screen rotates out of the dash.

Try it out the way I did and I'm 99% sure it should work. Don't send 12V to any of the pins on that connector and everything should be fine. :D

Let me know if I can help you with anything else.

P.S. I just remembered that you already used an Arduino to get the screen out so you already know which pin is the serial and the ground pin. The CVBS pin should be easy to find if it's not the same pin as it is on mine, just with trial and error.

DT19
Sep 4th, 2017, 12:25
Thanks for that. I spent yesterday fiddling about and I've got it working perfectly now. I only wanted to use the screen to display the rear view camera when reversing. When I select reverse gear the screen comes up then goes down again when I take it out of reverse or switch off the ignition. I've got the brightness adjust working as well. Just doing some more testing and trying to think if anything else needs doing (might switch between 2 cameras). then I'll fit it in my car and take the 8" Android pad version out.

Most of what the Android version does is on my phone as well so I haven't used it as much as I though I might.

I have to say that so far this method has been much much easier than my first attempt.

arpi2390
Sep 4th, 2017, 12:33
Yes, it's almost plug&play if you sort the arduino part out.

Where are you getting the "reverse" signal from? I haven't taken apart the lower part of the center consol yet but I'm guessing there's a switch there with 12V, did you step that down to 3.3V (anything above 5V I think will fry the arduino)?

DT19
Sep 4th, 2017, 16:03
Yes, it's almost plug&play if you sort the arduino part out.

Where are you getting the "reverse" signal from? I haven't taken apart the lower part of the center consol yet but I'm guessing there's a switch there with 12V, did you step that down to 3.3V (anything above 5V I think will fry the arduino)?

I haven't got that far yet. I have a 3" screen at the moment and it takes it's signal from the reversing light bulbs so it will be 12volts.

I'm using a switch in the TX/RX line, try it, it works. I'm going to try using a relay to take the 12v signal to switch the relay to connect/disconnect the signal line.

Edit:
Just tried with a relay and it's works fine

SwissXC90
Sep 4th, 2017, 16:56
You could monitor the vehicle CAN bus to get all vehicle info: ignition switch status, reverse status, steering wheel key presses, etc

As it is a high speed CAN bus, there's a lot of data to filter initially to get what you want - but it is all there.....

DT19
Sep 4th, 2017, 17:00
You could monitor the vehicle CAN bus to get all vehicle info: ignition switch status, reverse status, steering wheel key presses, etc

As it is a high speed CAN bus, there's a lot of data to filter initially to get what you want - but it is all there.....

I could do that, if I was an electronics Jedi master, but I'm not. Usually if I can't fix it with a hammer I'm not interested.

Everything I've done here is trial and error and searching the internet for info.

danhans42
Jan 15th, 2018, 14:33
Hi there,

I used a similar setup with an Ordroid C2 in my old audi, with it hacked into the low speed can network and also had full power management.

I used an Arduino Leonardo with CAN (A prebuilt unit from Hobbytronics) a relay and a 5v PSU to achieve this, and also there is some software from the odroid c2 forums which handled the power management.

See here for the Android software for the C2..

https://forum.odroid.com/viewtopic.php?f=137&t=21386

I also have the sources I used for USB HID/ Power management etc which I will l am happy to share if needs be.. the code is not the best, but it worked 100% perfectly for nearly 2 years.

Logging CAN messages is not hard, especially for button presses. Just log the data to a text file, import it into Excel and analyse the data in that.. (create a vlookup list or count the occurances of the message etc).

I will be doing this myself on the exact same platform, just need to get my hardware logging the data properly and I will begin work in the next week or so.

ThomasG
Jan 16th, 2018, 09:35
NOW it crops up..

After I lost interest..

BTW:
Did you manage to run external USB camera in odroid?
For use with apps like AutoGuard (dashcam app)

danhans42
Jan 16th, 2018, 17:08
NOW it crops up..

After I lost interest..

BTW:
Did you manage to run external USB camera in odroid?
For use with apps like AutoGuard (dashcam app)

Camera - I never tried for this application, the driver board for the LCD I hacked into the RNS had a reverse camera input, so the Arduino that handled the power/buttons also pulled that input high when reverse gear was selected.

I initially thought about wiring the reversing camera into a USB capture device but seemed more hassle than the route I chose.

On the odroid forums people have written about getting it to work, but I think it is pretty unstable and only certain model cameras work.

DT19
Jan 16th, 2018, 18:42
I've got mine working just for the reverse camera now. Put it in reverse and the screen comes up with the camera on, out of reverse and the screen goes blank but doesn't go back down for 5 seconds in case I want to go into reverse again. I also have an over ride switch so the screen stays up with the camera on and another for adjusting the brightness.

I originally used an android tablet but I could get the camera to work and it looked a bit crap. When I thought about it everything I wanted the tablet to do was already on my phone so I had two lots of everything but still no camera.

I'll put a video up when I can, I've got one of these stinking flu's at the moment, it's been three weeks and I still feel dreadful.

I also have another unit which I used for testing the code, I don't need it now so if someone wants to make me an offer I can build up a working one with fitting instructions.

Ghassan
Sep 15th, 2018, 18:23
Dear Sir, I tried it on my xc90 2006 and it work properly, but please can someone help in adding VOLVO logo in white on a blue Background if no video signal is available and on RTI screen Open and also when closing. I think it will be a nice enhancement.

Ghassan
Sep 16th, 2018, 23:18
dear sirs can we add Volvo logo on start-up and when no signal is available?
please someone update the code to include background and Logo

InspecT
Mar 23rd, 2019, 17:52
Awesome project. I was wondering from where do you count your pins :D. And also, I have grey one instead of green. Are they any diffrent?

rogatip
Jan 27th, 2020, 15:16
Hi guys,
I am going on the same way. Initially my XC 90, 2010 doesn't have navigation system, so I bought used RTI screen with the lift mechanism, also I got 6.5 touch screen from ebay and Odroid XU4. It seems to control the display goes up and down, I've to use additional controller. I've Uno and Nano. The only thing which is not clear for me is the scheme of the two connectors. Can you help me with the pins.
Cheers,
Georgi

Tandemas
Mar 10th, 2020, 14:15
Hi, I Know i’m writing late since post is uploaded, but I still hope u will reply. I have a RTI mounted allready in my dashboard and i guess I don’t need Adruino. I knew nothing about this Adruino and Odroid, but recently i was searching some info about them. If i allready have RTI I don’t need Adruino ? and How i Need to Link Only Odroid with RTI ?

Tandemas
Mar 10th, 2020, 14:19
And do i need something else or only Odroid ?

SwissXC90
Mar 10th, 2020, 14:58
The only thing which is not clear for me is the scheme of the two connectors. Can you help me with the pins.

The pinout is in the wiring diagrams, which you really need for what you are doing