Change font size


Post a new topicPost a reply Page 1 of 2   [ 14 posts ]
Go to page 1, 2  Next
Author Message
 Post subject: SF5 Cluster Gauge Sweep
PostPosted: Sat Feb 13, 2016 11:11 pm 
User avatar

Vehicle: MY00 SF5 - MY04 SG9 STi

Posts: 335
Location: Melbourne
Ever hopped into a newer model Subaru and watched in awe at the cluster while it does a full sweep prior to ignition? Ever wished your SF5 had the same capability? Now it can! This DIY covers the process of building and installing a custom module that runs a full sweep of both the speedo and tacho upon startup: Forester SF5 Cluster Gauge Sweep. If you're proficient at reading and soldering circuits, this can be completed in about half a day and will set you back no more than $20 in parts.

Overview:

Both the tacho and speedo rely on electrical pulses to determine the current speed and RPM. The faster the pulse, the higher RPM/speed displayed, slower, the gauges will display a lower value. In order to control the position of both gauges, we must output our own pulse to trick the cluster into thinking it's revving/speeding up, and down again. At the same time, we need to ensure that after the sweep is completed, the original speedo/tacho signals are received by the cluster. In short, we use an Arduino Nano to output the pulse, and a relay to switch between the original signals and our Arduino output. The process is as follows:

  • Ignition power received by cluster and Arduino module
  • Relay powered on which disconnects the ECU and VSS feeds to the speedo/tacho and connects our Arduino pulse outputs in place
  • Arduino program runs and outputs the pulses at the frequency required to run the sweep
  • Sweep finalises and after a short delay the relay is powered off, restoring the original signals to both speedo and tacho
  • Program exits and will not run again until the next power cycle

Note that as we are feeding false information to the cluster, every time you start your car the KM reading will advance prematurely by approximately 10 meters. If your car is started twice per day, every day of the year, it will age prematurely by 7.3KM each year.

Also, the speedo pulse input is 5V where as tacho is 12V. This is why we need a bit more of a circuit on the tacho side, to step up the 5V output to a 12V signal.

Materials:

  • Arduino Nano (or Nano clone)
  • 2 x 2N3904 Transistors
  • 1 x 2N3906 Transistor
  • 3 x 2K Resistors (1/4W)
  • 1 x 100K Resistor (1/4W)
  • 1 x 10K Resistor (1/4W)
  • 1 x 5V DPDT (eg. HK19F-DC 5VSHG. 12V relay may be used with a simple change)
  • 1 x 5V regulated power supply (must be able to handle between 10 and 15V input, constant 5V out)
  • 1 x 6-Pin PCB-mount plug/socket (optional)
  • 1 x 40x60mm prototyping board (or larger)
  • Solder (flux core is the easiest to work with)
  • Plastic project box to fit your prototyping board
  • Heat-shrink tube (smaller diameter eg. 5mm, 3mm - size requirement depends on the size of wire used)
  • 18-20 AWG wire (for connection to vehicle looms)
  • 22-24 AWG wire (for linking components on PCB)

Tools:

  • Soldering Iron
  • Wire strippers
  • Wire cutters
  • Multimeter
  • Stubby philips head screwdriver
  • Regular philips head screwdriver

This DIY does not cover:

  • How to solder
  • How to get setup with the Arduino. For this, I would recommend reading the Getting Started (https://www.arduino.cc/en/Guide/HomePage) guide and installing the software, then have a look at the 'Blink' tutorial to make sure everything is working as expected. Don't be put off - you can be up and running in 5 minutes.

Other Notes:

  • All components should be available at Jaycar (with the exception of the relay maybe - but I've never checked). I source all my stuff online in bulk, mainly from eBay.
  • Don't buy the Arduino Nano from Jaycar, you can get copies from DealExtreme or eBay for about $5 each, which include USB cables.
  • You can purchase small-gauge wire but there is an abundance of looms available for harvesting in any photocopier - particularly the older stuff (pre 90's). Find one for free on Gumtree and tear it apart. Takes a bit of time but the yield will last forever.
  • I have used an 'Arduino Pro Mini' instead of the Nano. The difference is that the Pro Mini has no USB programmer inbuilt, so it is a smaller form factor. If you use a Pro Mini you'll need an ISCP programmer or another Arduino to upload the program. In other words, just use the Nano.
  • The 5V power supplies are also abundant on eBay. Many run on the LM2596, which works fine, just make sure it's adjusted to output 5V.

Build the Circuit:

Hopefully by this point you're still with me, as this is where it gets fun. I've drawn up the circuit in two formats - a breadboard format which is a better visual representation of how everything needs to be connected, as well as a schematic:

The breadboard:

Image

The schematic:

Image

For assembly, there are a couple of options. Prototyping boards come in two formats - either just completely disconnected through holes:

Image

Or, through holes which are connected in rows:

Image

You will find that if you use the first option (which I did), more soldering will be required - as you have to create every connection. The second option might simplify things, but either is fine.

Assemble the components onto the board. There's no right or wrong way to do this. Prior to soldering, place the larger components first. Check they all fit well, and that there is sufficient room to solder the resistors/transistors etc. When you're happy everything will fit, solder into place. NOTE: If you have a variable power supply (eg. voltage needs to be set using a little screwdriver) then you MUST set this to no more than 5V prior to soldering in. Connect the input side to your car battery, and measure the output using a multimeter until you have a nice voltage. 4.5-5v is perfect:

Image

I used some double sided tape to fix the power supply to the PCB, then soldered in some wires to connect the voltage input/output. I also soldered in a 6-pin connector, as I was still developing at the time and wanted to be able to remove the harness easily. You'll also notice my lack of USB port on the Arduino, but there's a black 6-pin connector which I soldered in for programming.

After soldering the components, the links can be made. Using the smaller gauge wire (22-24), my approach was:

  • Solder links between individual components first. For example, the link between Arduino pin 10, and resistor R1. This link does not connect elsewhere, do links of this nature first.
  • I soldered wire onto all components that connect to GND. Cut them all to equal length, soldered them together at the other end, then in one go soldered them into the GND output of the power supply.
  • Finished up with the +5V and +12V links using the same logic as above.
  • Don't forget to wire in your connector. If no conector, use the 18-20AWG wire soldered straight into your board. I left approx 30cm.

I used different colour wire to separate pulse circuit (yellow), GND (black), +5V (blue, and +12V (orange). Also, because of the programming header I have 6 additional connections which really clutter up the place:

Image

Upload the Program:

The following program needs to be uploaded to the Arduino. Connect the Arduino to your PC and open up the Arduino IDE, flash away. **I need to tidy the code up, it's full of rubbish at the moment, but works:

Code:


// constants won't change. Used here to
// set pin numbers:
const int ledPinTacho =  4;      // the number of the LED pin
int ledStateTacho = LOW;             // ledStateTacho used to set the LED
long previousMillisTacho = 0;        // will store last time LED was updated
int initDelayTacho = 0;

const int ledPinSpeedo =  5;      // the number of the LED pin
int ledStateSpeedo = LOW;             // ledStateTacho used to set the LED
long previousMillisSpeedo = 0;        // will store last time LED was updated


 
 
 
long previousTimerTacho = 0;        // will store last time LED was updated
int sweepValue[9] = {40000,13500,7450,4930,3710,2910,2400,2080,1870};
int sweepIntervalTacho = 100;
int sweepIntervalTachoLong = 800;
int sweepCounterTacho = 0;


long previousTimerSpeedo = 0; 
int speedoSweepValue[9] = {32900,23000,11600,7700,5850,4660,3950,3400,2980};
//int speedoSweepValue[9] = {32900,23000,11600,7700,5850,4660,3950,3400,2980};
int sweepIntervalSpeedo = 80;
int sweepIntervalSpeedoLong = 900;
int sweepCounterSpeedo = 0;

int relayPin = 10;

int sweepIntervalTachoActual = sweepIntervalTacho;
int sweepIntervalSpeedoActual = sweepIntervalSpeedo;

int totalRoundsTacho = 0;
int totalRoundsSpeedo = 0;

int sweepDirectionTacho = 1; //1 for increase 0 for decrease
int sweepDirectionSpeedo = 1; //1 for increase 0 for decrease

int speedoFinalise = 0;
int tachoFinalise = 0;

void setup() {
  // set the digital pin as output:
  pinMode(ledPinTacho, OUTPUT);
  pinMode(ledPinSpeedo, OUTPUT);   
 
  pinMode(relayPin, OUTPUT);   
 
 
 
  delay(1000);
  digitalWrite(relayPin,HIGH);

 
// Serial.begin(9600);
}

void loop()
{




 
//while (totalRoundsTacho < 18) {
   
if (totalRoundsTacho < 18) {
tachoPulse(sweepValue[sweepCounterTacho]);

if (sweepCounterTacho == 8) {
   sweepIntervalTachoActual = sweepIntervalTachoLong;
   //initDelayTacho = 1;
}
else {
   sweepIntervalTachoActual = sweepIntervalTacho;
}

unsigned long currentTimerTacho = millis();

if(currentTimerTacho - previousTimerTacho > sweepIntervalTachoActual) {
   previousTimerTacho = currentTimerTacho;
   
   if (sweepDirectionTacho == 1) {
      sweepCounterTacho = sweepCounterTacho + 1;
    }
    else {
      sweepCounterTacho = sweepCounterTacho - 1;
    }
    if (sweepCounterTacho == 8) {
       sweepDirectionTacho = 0;
    }
    if (sweepCounterTacho == 0) {
      sweepDirectionTacho = 1;
    }

totalRoundsTacho = totalRoundsTacho + 1;   
  }
 
}
else {
  tachoFinalise = 1;
}

if (totalRoundsSpeedo < 18) {
speedoPulse(speedoSweepValue[sweepCounterSpeedo]);
 
if (sweepCounterSpeedo == 8) {
   sweepIntervalSpeedoActual = sweepIntervalSpeedoLong;
   //initDelaySpeedo = 1;
}
else {
   sweepIntervalSpeedoActual = sweepIntervalSpeedo;
}

unsigned long currentTimerSpeedo = millis();

if(currentTimerSpeedo - previousTimerSpeedo > sweepIntervalSpeedoActual) {
   previousTimerSpeedo = currentTimerSpeedo;
   
   if (sweepDirectionSpeedo == 1) {
      sweepCounterSpeedo = sweepCounterSpeedo + 1;
    }
    else {
      sweepCounterSpeedo = sweepCounterSpeedo - 1;
    }
    if (sweepCounterSpeedo == 8) {
       sweepDirectionSpeedo = 0;
    }
    if (sweepCounterSpeedo == 0) {
      sweepDirectionSpeedo = 1;
    }

totalRoundsSpeedo = totalRoundsSpeedo + 1;   
  }
   
}
else {
  speedoFinalise = 1;
}

// }
 
//  delay(500);
// digitalWrite(ledPinSpeedo,LOW);

//digitalWrite(ledPinSpeedo,LOW);
  //speedoPulse(2980);
 
if (speedoFinalise == 1  && tachoFinalise == 1){
  delay(500);
  digitalWrite(ledPinSpeedo,LOW);
  digitalWrite(relayPin,LOW);
  exit(0);
}
}


int tachoPulse(int durationTacho)
{
   

  unsigned long currentMillisTacho = micros();

  if(currentMillisTacho - previousMillisTacho > durationTacho) {
    // save the last time you blinked the LED
    previousMillisTacho = currentMillisTacho;   
    //interval = interval + 200;

    // if the LED is off turn it on and vice-versa:
    if (ledStateTacho == LOW)
      ledStateTacho = HIGH;
    else
      ledStateTacho = LOW;

    // set the LED with the ledStateTacho of the variable:
    digitalWrite(ledPinTacho, ledStateTacho);
   
   // Serial.println(durationTacho);
}

}

int speedoPulse(int durationSpeedo)
{
   
  unsigned long currentMillisSpeedo = micros();

  if(currentMillisSpeedo - previousMillisSpeedo > durationSpeedo) {
    // save the last time you blinked the LED
    previousMillisSpeedo = currentMillisSpeedo;   
    //interval = interval + 200;

    // if the LED is off turn it on and vice-versa:
    if (ledStateSpeedo == LOW)
      ledStateSpeedo = HIGH;
    else
      ledStateSpeedo = LOW;

    // set the LED with the ledStateTacho of the variable:
    digitalWrite(ledPinSpeedo, ledStateSpeedo);
   

  }
 
}


Quick Test:

At this point, you should be able to connect the GND and +12V connections from your power supply to the car battery. The relay will engage, then disengage about 2 seconds later. If you have got this far, then things should work when you get the module into the vehicle. You can test the outputs with a multimeter, set to DC voltage at a low level and for the first 2 second after applying power, you should see some activity (measure between GND and TACHO OUT/SPEEDO OUT. If no activity, then there could be a problem - check your circuit and compare it to the schematics.

Install into Enclosure:

Grab your Jaycar enclosure and install your board. I didn't tie it down, but it fit pretty snug due to all the wiring on the back. I put a couple of layers of foam tape on to the top of the relay to help keep things compacted inside:

Image

I also had to cut a hole in top of the enclosure lid to fit the molex connector:

Image

At this point, do yourself a favour and label your wires - this will simplify installation into the car:

Image

Remove the Cluster:

I have no photos at this point, but if you're sitting in the drivers seat, there are two screws in the plastic shroud directly above the cluster. Use the stubby driver to remove these screws. You can then remove the shroud - there are two clips at the bottom left and bottom right which just pull out.

Next, remove the three screws holding the cluster in place (one top middle, one bottom left, one bottom right). Manoeuvre the cluster out and disconnect the plugs at the same time - there are three.

Splice into the Looms:

The fun part - hacking apart the factory looms. The below photo shows the four cables we are interested in. Essentially we will splice into +12V, and GND, then we will intercept tacho and speedo. This is the middle of the three plugs:

Image

At this point, you'd be best to disconnect the battery. I didn't, and had no problems, but it's the sensible thing to do. I did these one-by-one. First, cut the +12V about 3-4CM from the plug. Strip the plug side and loom side back about 8mm. MAKE SURE YOU'VE GOT SOME HEATSHRINK PLACED OVER THE WIRE READY TO GO. Nothing more annoying than having to de-solder a joint just to install heatshrink you've forgotten the first time round. Join in the +12V connector from the Arduino module, and solder all back together:

Image

Apply heatshrink (I use a butane soldering iron for this (hot air), but you can use a match or lighter (carefully), or a full size heat gun if you can fit it in - try not to melt anything:

Image

Repeat the process above for GND. After that, starting with tacho, cut the loom in the same position. This time, the plug side of the tacho signal needs to be connected to the TACHO OUT plug on the Arduino module, and the car side of the tacho signal needs to be connected to the TACHO IN plug. This photo shows finalised +12V and GND, plus the tacho wiring:

Image

Do the same for speedo:

Image

Finally, tidy up your looms - don't leave wires hanging about everywhere. They'll rub on things and create shorts:

Image

I couldn't get a decent photo, but I mounted the module just below the steering column - push it through the hole in behind the cluster, and fish it out down the bottom. Couple of cable ties hold it in place sufficiently.

Finalise:

That's it. Re-install the cluster - it can take some persuasion to get it back into place - be careful not to scratch the plastic. Connect all three plugs, then add screws and shroud. Finally, start the car and admire your cool new gauge sweep :thumbs:

_________________
Rob's Faux MY00 JDM S/tb v7 STi
Rob's Legit MY04 SG9 STi


Top
 Profile  
 
 Post subject: Re: SF5 Cluster Gauge Sweep
PostPosted: Mon Feb 22, 2016 11:42 pm 
User avatar

Vehicle: MY05 XT

Posts: 699
Location: Jumanji
There are a lot of DIYs on this forum but I think this just took the crown.

Very well done man!


Top
 Profile  
 
 Post subject: Re: SF5 Cluster Gauge Sweep
PostPosted: Mon Feb 22, 2016 11:47 pm 
User avatar

I Say: Go Hard Keyboard Warriors !!
Vehicle: Subaru フォレスターSTI 04 SG9

Posts: 3784
Location: Mackay, QLD
Yip, make the boxes up and you'll have ppl lining up !!

_________________
Now
2004 Subaru Forester STI - JDM571
Before
2006 Subaru STI Forester - PHA745


Top
 Profile  
 
 Post subject: Re: SF5 Cluster Gauge Sweep
PostPosted: Tue Feb 23, 2016 2:08 am 
User avatar

I Say: let the part harvest begin
Vehicle: 99GTLUX

Posts: 1692
Location: Margaret River WA
Yep would buy one for sure I miss my Vipec cluster sweep.

_________________
________________
New GTLux Worklog
http://ozfoz.com/forum/viewtopic.php?f=12&t=43042


Top
 Profile  
 
 Post subject: Re: SF5 Cluster Gauge Sweep
PostPosted: Tue Feb 23, 2016 9:45 pm 
User avatar

Vehicle: MY00 SF5 - MY04 SG9 STi

Posts: 335
Location: Melbourne
Thanks guys.

The whole thing can be condensed by substituting the Arduino board out with a little 8-pin chip which costs next to nothing. Might look at the cost of getting a few boards fabricated up, and I can easily program the IC from this end. Not sure where I'd put an EOI for this - wouldn't bother unless I had at least 10 people interested.

_________________
Rob's Faux MY00 JDM S/tb v7 STi
Rob's Legit MY04 SG9 STi


Top
 Profile  
 
 Post subject: Re: SF5 Cluster Gauge Sweep
PostPosted: Wed Feb 24, 2016 5:09 am 
User avatar

I Say: F#*k 'em if they can't take a joke.
Vehicle: Gold '02 GT

Posts: 695
Location: Sydney
Pending cost I'd probably get one :thumbs:

_________________
I call her Bea the golden girl


Top
 Profile  
 
 Post subject: Re: SF5 Cluster Gauge Sweep
PostPosted: Thu Feb 25, 2016 1:22 pm 
User avatar

Vehicle: 2000 Subaru Forester Gt -

Posts: 27
Location: Western Australia
Please mass produce these boxes :ok:
Id love one of these but am terribly lazy hahaha :dontknow:


Top
 Profile  
 
 Post subject: Re: SF5 Cluster Gauge Sweep
PostPosted: Thu Feb 25, 2016 2:08 pm 
User avatar

Vehicle: MY00 SF5 - MY04 SG9 STi

Posts: 335
Location: Melbourne
Just did some quick and dirty calculations. I can supply PCB, all components (except box/case), and pre-program the IC at around the ~$30 mark - to be soldered by yourselves.

~$40 would get it pre-assembled.

~$45 pre-assembled in a box ready to go.

Same as before though - I'd need 10 people committed or it'll cost me too much in overhead. Also this mod should work on other Subaru clusters. If anyone has a GC8 cluster etc. I can easily re-map the existing program to suit - I'd need to borrow it for a couple of hours.

_________________
Rob's Faux MY00 JDM S/tb v7 STi
Rob's Legit MY04 SG9 STi


Top
 Profile  
 
 Post subject: Re: SF5 Cluster Gauge Sweep
PostPosted: Thu Feb 25, 2016 7:13 pm 
User avatar

Vehicle: 2000 Subaru Forester Gt -

Posts: 27
Location: Western Australia
Id commit to one pre-assembled in a box man :drinks:


Top
 Profile  
 
 Post subject: Re: SF5 Cluster Gauge Sweep
PostPosted: Fri Feb 26, 2016 12:16 am 
User avatar

I Say: let the part harvest begin
Vehicle: 99GTLUX

Posts: 1692
Location: Margaret River WA
Yep im down for pre assembled box

_________________
________________
New GTLux Worklog
http://ozfoz.com/forum/viewtopic.php?f=12&t=43042


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 2   [ 14 posts ]
Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
"Takka LE" for phpBB3