Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Driving 97 kick tach after J18A engine swap
#41
Hi there! 

It's been a long time!

I finally got around to trying the relay and transistor circuit posted on the Megasquirt forums. (this one :https://www.msextra.com/forums/viewtopic.php?f=131&t=40365).
I can confirm that it works quite well. Probing the output, I got about 45v RMS on my Chinese scope (it says that the max input voltage is 40v, but I read somewhere on the internet that it's an easy fix even if it breaks).

Tach works! The relay is being switched so fast, that it doesn't have enough time to spring back, so it doesn't even click when the engine is running. 

Meanwhile, the little Immo emulator that I had used let out the magic smoke. For the past year I have been learning and doing flash tunes on cars, and have had to disable a few immos as well. I have accumulated quite a large library of different immo software by now, so I decided to try one of the programs, which seemed to support these HITACHI ECUs. The program only changed a single byte from the EEPROM dump and the car fired right up, but upon trying to restart it, the MIL started blinking again and the immo was once again locked. Reading the EEPROM again, turns out, that the CPU overwrites said byte every restart, or every other restart. There is a variation of the 93c46 EEPROM that can be write locked by the programmer, but I had to order them from china, so I got to thinking. I ended up using an Arduino NANO, as an EEPROM programmer and just glued it to the inside of the ECU. One pin detects when the ignition goes from ON to OFF (via a voltage divider, since the arduino can't take 12v) and just starts hammering the EEPROM with write commands to the proper address. I decided to do it with the ignition off, because I wanted to make sure that the CPU wasn't accessing the EEPROM while the Arduino was also trying to access it. In the next post, I will post a short explanation on how I did it, so if anyone ever needs to do it will hopefully find it helpful.
Reply
#42
It is essentially setting a byte to "90" in hex, but after every start, the ECU just overwrites it ant it doesn't start anymore. So I just wrote a simple sketch that detects every time the ignition is switched off and just overwrites the address, so that when you turn the key on the next time, the address still reads "90". It is very crude and I could tweak the sketch to detect whether the byte is correct and only if it isn't to overwrite it. But that's why I'll include the sketch, so you can improve it and tailor it to your liking.

First, you need to have a little bit of knowledge regarding the Arduino platform.

Things to download:
1. Arduino IDE

2. Some sort of 93Cx6 library, I used this one: https://github.com/TauSolutions/M93Cx6. I actually used the example sketch as the base for this.

3. Bounce library which you can download using the IDE itself when you go into the corresponding menu.

Picture of the PCB: https://photos.app.goo.gl/xEe2iBtsG326NYPK8

Connections:
+12v from main relay -> Vin on arduino
Ecu gnd -> Arduino gnd
ECU ignition switched 12v -> D2 on arduino
EEPROM pin1 -> D10 on arduino
EEPROM pin2 -> D13 on arduino
EEPROM pin3 -> D11 on arduino (I found it easier to solder to the via)
EEPROM pin4 -> D12 on arduino
+5V for EEPROM do it as shown on the picture, it's easier.

!!! IMPORTANT !!! You CANNOT feed 12v from the ignition switch directly to the arduino pin, max is 5V (used for detecting ignstate). As you can see in the photo I've used 2 resistors to make a voltage divider (inside the heatshrink). I cannot recall the values, but there are online calculators in case you don't know the formula.

For anybody using this, I would recommend to power the arduino directly from the 5v pin using a 7805 IC connected to the ECU 12v to convert it to 5v. As it is in my case, using the integrated voltage regulator of the arduino, It means that in the event of a failure of said regulator, anything connected to the same 5v supply as the EEPROM could get damaged.

You can see the address containing "90" In the attached file "Baleno ImmoOff"

The "M93Cx6_test" is the actual arduino sketch. There is some code which writes some unnecessary bytes before actually writing the important byte, it's just left over from testing and I didn't bother to remove it.

Pastebin of the sketch in case it doesn't open: https://pastebin.com/2Lx8RW3D


Sketch + EEPROM Dump:

https://drive.google.com/file/d/13jq9by8...sp=sharing, https://drive.google.com/file/d/1E6FzxYk...sp=sharing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)