pgmfi.org

Hacking up Honda's ECU
It is currently Fri Oct 04, 2024 11:50 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Sep 05, 2020 4:52 pm 
Offline

Joined: Thu Aug 20, 2020 2:11 pm
Posts: 3
Hello,

I bought a '93 Honda Civic 1.6 125PS recently. The car had many issues, most of them fixed now. The most problematic was the speedometer issue, where the speedo would not work at all and the CEL code for speedometer was being generated by ECU. At first I thought that the problem lies in the speed sensor, so I bought a cheap replacement for around 10 USD. It turned out that the old VSS was ok and the real problem is inside the gearbox.

The "knob" that stands out from gearbox, on which the VSS is mounted, would not turn at all when the vehicle was moving. As I didn't want to unmount the gearbox and disassemble it (I don't know if that's even possible with this gearbox), I decided to design a VSS of my own using a GPS receiver.

The idea was to catch a GPS or GNSS signal with a GPS module connected to a microcontroller, get the ground velocity and convert it to digital signal resembling the output of an original VSS when the car is moving. The original VSS shorts the 5V pin of the 3-pin connector to GND when the "knob" from gearbox is rotating, so the microcontroller output was alternating betweend GND and high impedance.

The code below converts the kilometers per hour (value obtained from GPS module's $GPVTG frame) to a specific frequency that matches the speedometer km/h scale:
Code:
   double frequency = (double)mVelocityAndHeading.mKilometersPerH/1.41;  //initial testing showed that 100 impulses per second from VSS showed about 141 km/h on speedo
   if (frequency > 0) //prevent divide by 0 situation and values below 0
   {   
        frequency = (10000/frequency); //10000 equals to 10 kHz generated by microcontoller - this value is divided to achieve wanted impulses per second
        Clock_2_SetDivider((uint32_t)frequency);
        Clock_2_Enable();
   }
   else Clock_2_Disable(); //set the output of microcontroller to GND - speedo will show 0


Actually, the presented code fragment (and probably the rest of the code) has flaws as it was developed in order to test the concept, but eventually I didn't modify it up to this day, as the solution works. The biggest flaw is that the speedo jumps a little sometimes, as if the MCU couldn't handle all the GPS data in time (I had to change the GPS module output rate from 1 Hz to 10 Hz in order to have smaller speed changes - at 1 Hz in the first gear the speedo needle would jump 20 kilometers per hour at a time under hard acceleration).

Video shows the device. The white wire goes into the engine bay and is connected to the 3-pin VSS connector. https://www.youtube.com/watch?v=AC2UTF3v-a8&feature=youtu.be

Currently I don't have a video that would show the speedo, as I have another problem with the ECU (actually the device presented solved the VSS CEL code but now the VTEC solenoid pops after reaching 4800 RPMs). The attachment shows how it's mounted (actually it isn't, it hangs on the wires 8). The ECU is visible as i'm trying to solve the VTEC solenoid problem at the moment...).

Currently it's a temporary solution. I will probably develop another device in my spare time (GPS antenna mounted on the roof, better GPS module with 20 Hz refresh rate). I can post more information if anybody is interested (more photos, more code, schematic etc.).


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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® Forum Software © phpBB Group