Second Generation Nissan Xterra Forums banner

1 - 20 of 22 Posts

·
Registered
Joined
·
504 Posts
Discussion Starter #1
So I'm planning on doing a 4WD conversion sometime in the next year using a salvaged donor X. I know some people will tell me to sell and buy a 4wd from factory, but that's not why I made this thread.

I plan on activating the transfer case electronically and have LED indicators to tell me it's position. I'm making this thread to make sure I understand how it's activated and what each wire coming out of the TC does before pulling the plug on the swap.

Since I don't have a TC, actuator assembly, or a transfer control unit on hand, all I have to verify my information is the FSM, and I wanted y'alls opinions on my wiring and my understanding of the system. The pinouts and wire colors come from the 2006 FSM, not sure if they've changed throughout the years.

So.. here it goes.



On this diagram:

A-- is the 4LO switch. It completes the circuit when the TC is is 4LO.
B-- is the ATP switch. It completes the circuit when the TC is in neutral.
C-- is the Wait Detection switch. It completes the circuit when the TC is in 4WD (4HI and 4LO)
D-- is the transfer control module. It houses the actuator motor. The plug coming out of it has 7 pins.




This is the plug and how the pins are numbered in the FSM. The manual refers to the plug as F58. I believe the pins do the following.

D23-- (orange wire)
D24-- (grey wire)

D23 and D24 are the Actuator motor controls. If I understand the manual right, they should operate like this:

- The normal position for both is grounded.
- When the motor turns clockwise (2WD -> 4HI -> 4LO), pin D23 is supplied with +12VDC while pin D24 keeps its normal grounded position/
- When the motor turns counter-clockwise (4LO -> 4HI -> 2WD), pin D23 is grounded while pin D24 is supplied with +12VDC.

D22-- (black wire) is the common ground for pins D26,D20,D21, and D25.
D26-- (light green wire) is the Actuator switch#1. It should complete the circuit at all times except when the actuator is in the 4HI position.
D20-- (white wire) is the Actuator switch #2. It should complete the circuit while the actuator is in the 4LO position only.
D21-- (brown wire) is the Actuator switch #3. It should complete the circuit at all timesexcept when the actuator is in the 4LO position.
D25-- (blue wire) is the Actuator switch #4. It should complete the circuit at all times except when the actuator is in the 2WD position.

As far as I understand, D26 corresponds to ring 4 on the picture below (let's call it AP), D20 corresponds to ring 5 on AP, D25 corresponds to ring 3 on AP, D22 corresponds to ring 2 on AP.



Found this image on the forum, the light blue is the 2WD position, then 90 degrees clockwise is the 4HI position shown in red. Finally, 4HI is 180 degrees clockwise further shown in light green.

Now, the following picture is what my wiring diagram would look like. I would only use pins D23 and D24 and the 3 switches from the TC.



The top diagram is for the position feedback from the TC. The red LED will come on when the TC is in neutral. The green LED will come on anytime when the truck is in 4WD, and the blue LED will come on in 4LO only.

The bottom diagram is to actually engage and disengage 4WD.
The motor will be grounded on both side by default like it in from the factory.
It will receive power through one of its two terminals using 2 relays and a ON-OFF-ON momentary switch. I like this kind of switch better than 2 separate button switches because there is no way to activate the coil in both relays in this configuration. The momentary switch is powered by a relay controlled by a separate safety toggle switch to prevent the engagement of the motor by accident.


This is where the reason for this thread comes in: do I need to use the other pins and the actuator positions for anything? If I'm understanding this right, the TC switches and the actuator positions are fairly redundant and end up saying the same thing. I have a feeling that the factory has done it this way to add some safety and help the computer detect faults.

If you see anything I've done wrong, or anything you'd add to it, please let me know!


Also, an unrelated question that I could check myself, but it's cold out, is the cross-member where the front differential is bolted on removable? If I can swap the cross-member I won't have to weld in the brackets as long as the donor one is in good shape, but if the cross-member is welded to the frame rails I will have to.


Thanks for reading
 

·
Registered
Joined
·
504 Posts
Discussion Starter #2
Also, an unrelated question that I could check myself, but it's cold out, is the cross-member where the front differential is bolted on removable? If I can swap the cross-member I won't have to weld in the brackets as long as the donor one is in good shape, but if the cross-member is welded to the frame rails I will have to.
Disregard this part, I checked while changing my tensioner/serpentine belt and it's welded.
 

·
Registered
Joined
·
1,016 Posts
Over my pay grade bud! Never thought it was the involved. Thought it was similar to the fogs. Basically thought the wiring was there but not the hardware.
 

·
Registered
Joined
·
808 Posts
So you are gonna Energize the the TC via the safety toggle and then engage the rotation to select the drive mode via a momentary switch without any feedback from the TC other than 3 LED lights that you will watch?

That sounds like a bad idea.

The duplicate indicators are mode controlling and stop indicators.

For example in 2hi the motor can only spin towards 4lo and must stop at 4hi.
In 4hi it can go towards 2hi or 4lo and must stop at the correct indicator.
In 4lo it can only spin towards 2hi and must stop at 4hi.

When I was having endless troubles with my 4wd disengaging I took the TC actuator off and did a full state diagram of the stops and between stop transfer modes. I have it on a different computer and will upgrade it when I get a chance.
 

·
Registered
Joined
·
504 Posts
Discussion Starter #6
So you are gonna Energize the the TC via the safety toggle and then engage the rotation to select the drive mode via a momentary switch without any feedback from the TC other than 3 LED lights that you will watch?

That sounds like a bad idea.

The duplicate indicators are mode controlling and stop indicators.

For example in 2hi the motor can only spin towards 4lo and must stop at 4hi.
In 4hi it can go towards 2hi or 4lo and must stop at the correct indicator.
In 4lo it can only spin towards 2hi and must stop at 4hi.

When I was having endless troubles with my 4wd disengaging I took the TC actuator off and did a full state diagram of the stops and between stop transfer modes. I have it on a different computer and will upgrade it when I get a chance.
That was my plan. my understanding is that the 2WD and 4LO positions are fairly easy since the motor can't go past the correct position. (correct me if I'm wrong), so the only real problem is 4HI.

I will work on a diagram to wire the entirety of the 7 pins of the motor connector and have redundancy with the LEDs to make sure I'm in the right position. I'll post that later on.

I'm assuming I can combine the 2 4LO indicators from the 7 pin connectors into 1. (D20 and D21)
 

·
Registered
Joined
·
504 Posts
Discussion Starter #7 (Edited)
Alright, here's my updated wiring diagram. The first two are the same except for some colors, but the third one is new and uses the actuator position


Edit: The relay for D20 should be a normal 4pin.

Now another possibility is to do something similar to what x_mods has done on clubfrontier, and use an Arduino, but programming isn't my strong suit. One advantage though is that it would be automated and could reuse the stock selector. I'll have to mess around programming a little.
 

·
Registered
Joined
·
504 Posts
Discussion Starter #8 (Edited)
So I did some more work and got an actuator assembly from a junk yard to mess with.
I came up with this:



All the solid lines are 5V, the dashed ones are 12V.

The ATP, Wait detection, and 4LO switches on the TC will also be wired as per the first post, but the ATP switch and wait detection will be wired into the dash cluster. The ATP switch will use the ATP light already present, and the wait detection will use the 4WD warning light bulb.

I messed around with the actuator and wrote some code for it. I've tested it a couple hundred times and it works fine.. but then again its just turning the shaft with nothing connected on the other side. In theory it should still work i think.

Code:
const int forward = 2; //relay motor forward 2WD->4HI->4LO induces positive to pin 23 on TC.
const int  backward = 3; //relay motor backward 4LO->4HI->2WD induces positive to pin 24 on TC.

const int twowd = 4; //selector switch in 2WD position.
const int fourhi= 5; //selector switch in 4HI position.
const int fourlo= 6; //selector switch in 4LO position.

const int ACTswONE= 7; //Actuator switch 1. From TC pin 26. On EXCEPT when in 4HI.
const int ACTswTWO= 8; //Actuator switch 2. From TC pin 20. On in 4LO ONLY.
const int ACTswTHREE= 9; //Actuator switch 3. From TC pin 21. On EXCEPT in 4LO.
const int ACTswFOUR= 10; //Actuator switch 4. From TC pin 25. On EXCEPT in 2WD.

const int twowdLED = 11; //indicator LED for 2WD.
const int fourhiLED = 12; //indicator LED for 4HI.
const int fourloLED = 13; //indicator LED for 4LO.



void setup() {
// Sets up relay activators as outputs.
  pinMode(forward, OUTPUT);
  pinMode(backward, OUTPUT);
  
// Sets up selector switch positions as inputs.
  pinMode(twowd, INPUT_PULLUP);
  pinMode(fourhi, INPUT_PULLUP);
  pinMode(fourlo, INPUT_PULLUP);
  
// Sets up actuator position pins as inputs. Pin 22 is also connected to the arduino as a constant ground. (not defined or needed in code).
  pinMode(ACTswONE, INPUT_PULLUP);
  pinMode(ACTswTWO, INPUT_PULLUP);
  pinMode(ACTswTHREE, INPUT_PULLUP);
  pinMode(ACTswFOUR, INPUT_PULLUP);
  
// Sets up indicator LEDs for the 3 positions.
  pinMode(twowdLED, OUTPUT);
  pinMode(fourhiLED,OUTPUT);
  pinMode(fourloLED,OUTPUT);
  
// Makes sure that the actuator motor is not running when the Arduino resets.
  digitalWrite(forward,HIGH);
  digitalWrite(backward,HIGH);
  
// Turns on all the indicator LEDs for a second for troubleshooting. Turns them off afterwards.
  digitalWrite(twowdLED,HIGH);
  digitalWrite(fourhiLED,HIGH);
  digitalWrite(fourloLED,HIGH);
  delay(1000);
  digitalWrite(twowdLED,LOW);
  digitalWrite(fourhiLED,LOW);
  digitalWrite(fourloLED,LOW);
}



void loop() {

//Switch both sides of the actuator to ground by default. Doesn't stay LOW long enough to reopen the relay while the actuator is not on position.
  digitalWrite(forward,HIGH);
  digitalWrite(backward,HIGH);
  
//The following will turn the actuator motor backwards until the TC is in 2WD when the selector switch is on 2WD.
  if(digitalRead(twowd)==LOW) {
    if(digitalRead(ACTswONE)==LOW && digitalRead(ACTswTWO)==HIGH && digitalRead(ACTswTHREE)==LOW && digitalRead(ACTswFOUR)==HIGH) {
    }
      else {
        digitalWrite(forward,HIGH);
        digitalWrite(backward,LOW);
      }
  }
  
//The following will turn the actuator forward until the TC is in 4LO when the selector switch is on 4LO.
  if(digitalRead(fourlo)==LOW) {
    if(digitalRead(ACTswONE)==LOW && digitalRead(ACTswTWO)==LOW && digitalRead(ACTswTHREE)==HIGH && digitalRead(ACTswFOUR)==LOW) {
     
    }
      else {
        digitalWrite(forward,LOW);
        digitalWrite(backward,HIGH);
      }
  }
  
//The following will turn the actuator from 2WD to 4HI until the TC is in 4HI when the selector switch is on 4HI.
  if(digitalRead(fourhi)==LOW && digitalRead(ACTswTHREE)==LOW) {
    if(digitalRead(ACTswONE)==HIGH && digitalRead(ACTswTWO)==HIGH && digitalRead(ACTswTHREE)==LOW && digitalRead(ACTswFOUR)==LOW) {
      
    }
      else {
        digitalWrite(forward,LOW);
        digitalWrite(backward,HIGH);
      }
  }
  
//The folowingwill turn the actuator from 4LO to 4HI until the tc is in 4HI when the selector switch is on 4HI.
  if(digitalRead(fourhi)==LOW && digitalRead(ACTswTHREE)==HIGH) {
    if(digitalRead(ACTswONE)==HIGH && digitalRead(ACTswTWO)==HIGH && digitalRead(ACTswTHREE)==LOW && digitalRead(ACTswFOUR)==LOW) {
      
    }
      else {
        digitalWrite(forward,HIGH);
        digitalWrite(backward,LOW); 
      }
  }
  
//LED INDICATORS
  if(digitalRead(ACTswONE)==LOW && digitalRead(ACTswTWO)==HIGH && digitalRead(ACTswTHREE)==LOW && digitalRead(ACTswFOUR)==HIGH) {
      digitalWrite(twowdLED,HIGH);
  }
      else{
        digitalWrite(twowdLED,LOW);
      }
      
  if(digitalRead(ACTswONE)==HIGH && digitalRead(ACTswTWO)==HIGH && digitalRead(ACTswTHREE)==LOW && digitalRead(ACTswFOUR)==LOW) {
    digitalWrite(fourhiLED,HIGH);
  }
    else {
      digitalWrite(fourhiLED,LOW);
    }
    
  if(digitalRead(ACTswONE)==LOW && digitalRead(ACTswTWO)==LOW && digitalRead(ACTswTHREE)==HIGH && digitalRead(ACTswFOUR)==LOW) {
    digitalWrite(fourloLED,HIGH);
  }
    else {
      digitalWrite(fourloLED,LOW);
    }
    
}
Any feedback is welcome :wink:
 

·
Registered
Joined
·
159 Posts
I always enjoyed the challenge and logic of programming (about a million years ago)... What language is that?
Pretty sure he is using an Arduino, which uses a set of C/C++ functions, like digitalWrite() and digitalRead(). I'm pretty sure you can write your own methods as well as long as it can be interpreted properly by the C/C++ compiler.
 

·
Registered
Joined
·
3,811 Posts
Pretty sure he is using an Arduino, which uses a set of C/C++ functions, like digitalWrite() and digitalRead(). I'm pretty sure you can write your own methods as well as long as it can be interpreted properly by the C/C++ compiler.
Thanks and wow! A little bit of reading on the Arduino shows how powerful it can be and what a great cost!

I spent a year writing in Pascal in the late '80s, along the same lines of a C language iirc. Makes me want to build something in my "free time" :grin:
 

·
Registered
Joined
·
504 Posts
Discussion Starter #14
Thanks and wow! A little bit of reading on the Arduino shows how powerful it can be and what a great cost!

I spent a year writing in Pascal in the late '80s, along the same lines of a C language iirc. Makes me want to build something in my "free time" :grin:
You should. I'm really bad at programming but after looking up sample codes online and some trial and error you can get whatever you want to work. Some people even automate their blinds with an Arduino and a light sensor.
 

·
Registered
Joined
·
3,811 Posts
You should. I'm really bad at programming but after looking up sample codes online and some trial and error you can get whatever you want to work. Some people even automate their blinds with an Arduino and a light sensor.
This could come in incredibly handy for me in the future. I work in a small machine shop. One of our CNC lathes has extra functions built into it, basically it will turn on or off a 12v power source that you can use as a signal. It was a used machine and came with a PLC (programmable logic controller) that I could never get to work right. With an Arduino I think I could get it to control extra live tooling. I haven't had to do anything complicated in a while so I'll keep the Arduino sizzling on the back burner of my brain for future uses. Glad I read about your project!
 

·
Registered
Joined
·
16 Posts
OP, did you ever try the Arduino controlled transfer case when it was installed in your X? I am gathering the parts together to do the 4X4 conversion on my 07 and would really like to use the arduino for it. Also, how was your experience with the front diff brackets? Do you have to weld them on? I would much rather drill a hole or two through them and bolt them onto the chassis.
 

·
Registered
Joined
·
504 Posts
Discussion Starter #17
OP, did you ever try the Arduino controlled transfer case when it was installed in your X? I am gathering the parts together to do the 4X4 conversion on my 07 and would really like to use the arduino for it. Also, how was your experience with the front diff brackets? Do you have to weld them on? I would much rather drill a hole or two through them and bolt them onto the chassis.
I'm about to start wednesday. I will use the arduino and will also weld them on. You do have to weld them on, but it doesn't seem too bad. I'll update This thread while doing the conversion
 

·
Registered
Joined
·
2 Posts
I know I'm digging this out of a 11 month grave, but am curious if this has worked out. Currently have a 4wd Frontier that isn't so 4wd. Would like to actuate the transfer case, and re-wiring it is a much better option than the dealership.
 

·
Registered
Joined
·
504 Posts
Discussion Starter #20
I know I'm digging this out of a 11 month grave, but am curious if this has worked out. Currently have a 4wd Frontier that isn't so 4wd. Would like to actuate the transfer case, and re-wiring it is a much better option than the dealership.

It's worked out great and hasn't given me any problems at all. The hardest part of all this was finding the correct connectors for the transfer case.
 
1 - 20 of 22 Posts
Top