NefMoto

Technical => Reverse Engineering => Topic started by: vwnut8392 on May 11, 2023, 12:27:56 PM



Title: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 11, 2023, 12:27:56 PM
im in the middle of swapping a 1.8T from  B6 A4 into a 1984 4000 and was thinking about the tach functionality. looks like the only way to currently make the original tach work is with some sort of converter which im not really into. this lead me to an idea wondering if there was a spare output pin that could used to drive an analog tach? if i remember correctly all the old 80's clusters need to see 4 pulse per revolution of the engine for 4 cylinder where as if i where to tap into just the cylinder 1 coil or injector that is not enough to drive it properly. its a sort of waste spark vs sequential spark problem. so the idea is to figure out in code where the final ignition events happen, somehow copy them into an open spot in RAM than have code elsewhere running that when it sees a trigger event in RAM it opens the spare output to trigger the tach. this is just an idea but i think it would be possible to do it this way with a code patch to avoid having to use external devices to drive an older VAG tach.


Title: Re: ME7 spare output to drive analog tach
Post by: mdz on May 11, 2023, 02:32:15 PM
If problem is CAN vs analog tach signal, then B6 ecu outputs analog rpm signal without any custom code.  ::)


Title: Re: ME7 spare output to drive analog tach
Post by: ratosluaf on May 11, 2023, 09:57:26 PM
analog rpm is on pin 37, often stated as something related to A/C in pinouts


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 15, 2023, 03:06:57 PM
interesting, did not know this. im using 06A 906 032HS ECU from a GTI in this car, the donor cars ECU was already missing.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 28, 2023, 07:30:29 PM
tried pin 37 and it does not work with my tach in my swap. so back to this and adding custom code for it. i think the problem is my tach in my 82 4000 requires 4 pulses per revolution and the ME7.5 ECU is only outputting 1 pulse per revolution. im wondering if in the code its as easy as multiply the output by 4 and it just works? not really sure where or how to start hunting for the code for that output though. function sheet section about the outputs is blank.


Title: Re: ME7 spare output to drive analog tach
Post by: ratosluaf on May 28, 2023, 09:50:13 PM
whats your ecu p/n?, mine was 4b0906018dh and rpm pin was on pin 37, outputting 4 pulses per revolution.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 28, 2023, 11:15:21 PM
whats your ecu p/n?, mine was 4b0906018dh and rpm pin was on pin 37, outputting 4 pulses per revolution.

06A 906 032 HS from a 2002 VW GTI.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 28, 2023, 11:33:17 PM
I found ME7.5 schematics that gives me my first clue how to find its code in disassembly.

First picture shows the output pin from the processor highlighted in green. it outputs on pin 2.13.

Second picture shows pin 2.13 outputting through its circuit to the ECU connector.

i found references like this in several places in my disassembly where its setting or clearing P2_13 or setting P2_13 but im not sure if its actually doing somthing with that port or if its just a coincidence.
Code:
[code]  bset    P2_13           ; Bit Set
[/code]


Title: Re: ME7 spare output to drive analog tach
Post by: prj on May 29, 2023, 12:08:09 AM
There's a high/low change every 30 teeth of the trigger wheel.
So if the tach can read it, then it should show RPM. Whether the correct one or not is a different question.

If it shows nothing you have the wrong pin or the wrong signal level, in which case no amount of software will help you.


Title: Re: ME7 spare output to drive analog tach
Post by: ratosluaf on May 29, 2023, 03:54:06 AM
06A 906 032 HS from a 2002 VW GTI.

so it is not from b6 a4 then...

http://www.mxauto.net/index.php?op=ViewArticle&articleId=217&blogId=1 have you seen that already?



Title: Re: ME7 spare output to drive analog tach
Post by: terok on May 29, 2023, 09:29:16 AM
Highly likely that tacho has input circuitry which needs high voltage spikes from coil negative. It might not work with 12v square wave. This is the case in older VW tachos. You can easily bypass this circuit and then tacho is happily showing correct rpm.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 29, 2023, 10:07:47 AM
Highly likely that tacho has input circuitry which needs high voltage spikes from coil negative. It might not work with 12v square wave. This is the case in older VW tachos. You can easily bypass this circuit and then tacho is happily showing correct rpm.

looking at the original wiring for the tach in the car it does appear that it is exactly that because it gets its signal directly off of the negative side of the coil. i had to actually separate the circuit under the dash because it also used to trigger the fuel pump relay on. the ME7 now controls the original fuel pump relay. i did continuity tests between ECU pin 37 and the connector at the back of the cluster with the red/black/yellow wire and im definitely connected with the connector for the gauge.

when you say bypass the circuit do you mean bypass it in the ECU or bypass it on the circuitry in the tach itself?

one thing i did try was to see if i could even see pulses with a noid light which i do not. the noid light just shows ground the whole time the engine is running. very little info out there about this output specifically. what exactly is its output? is it 5V square wave?


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 29, 2023, 10:59:39 AM
There's a high/low change every 30 teeth of the trigger wheel.
So if the tach can read it, then it should show RPM. Whether the correct one or not is a different question.

If it shows nothing you have the wrong pin or the wrong signal level, in which case no amount of software will help you.

so if there is a high/low change every 30 teeth that would make it output 2 pulses per one full revolution being that it has a 60-2 trigger wheel on the crank. the original setup in my case was 4 pulses per revolution. with that known my tach would require the change every 15 teeth of the crank sensor instead of 30 to get the 4 pulses.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 29, 2023, 11:28:00 AM
so it is not from b6 a4 then...

http://www.mxauto.net/index.php?op=ViewArticle&articleId=217&blogId=1 have you seen that already?


yes, i seen that and it only establishes that ECU pin 37 can output a tach signal. no specifics on what sort of signal it actually outputs.


Title: Re: ME7 spare output to drive analog tach
Post by: BlackT on May 29, 2023, 11:37:47 AM

I once have swap 2.0  ABK to audi B2, tacho was working and it was connected to ECU
ABK ecu have same output for tacho as any other 4 zylinder ECU for audi/VW inclunding ME7.5


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 29, 2023, 11:54:20 AM
Here is another wacky thought. what if i put the original ignition control module in the circuit from the ME7? put the ME7 output and input it into pin 5 on the ignition control module as if it was the original hall sender on the distributor than rewire the rest of the module as if it was like OEM because the module is essentially an amplifier and the tach signal does come from the module from the factory and not directly off of the coil.

I attached a little quick dirty diagram of my idea.


Title: Re: ME7 spare output to drive analog tach
Post by: terok on May 29, 2023, 11:57:19 AM
Quote
when you say bypass the circuit do you mean bypass it in the ECU or bypass it on the circuitry in the tach itself?
Yes, from the tach. You need to bypass the input signal filter.

Quote
the original setup in my case was 4 pulses per revolution
No, unless you had a V8.

Quote
I once have swap 2.0  ABK to audi B2, tacho was working and it was connected to ECU
ABK ecu have same output for tacho as any other 4 zylinder ECU for audi/VW inclunding ME7.5
This is also the case in some VW's, but not all. I bet there are many versions of clusters in audis too.


Title: Re: ME7 spare output to drive analog tach
Post by: terok on May 29, 2023, 12:02:40 PM
Here is another wacky thought. what if i put the original ignition control module in the circuit from the ME7? put the ME7 output and input it into pin 5 on the ignition control module as if it was the original hall sender on the distributor than rewire the rest of the module as if it was like OEM because the module is essentially an amplifier and the tach signal does come from the module from the factory and not directly off of the coil.

I attached a little quick dirty diagram of my idea.

Ignition module does not generate voltage, it's only job is to ground or not to ground.
If you want high voltage, you need coil also.
You are making this problem way way more complicated than it really is.


Title: Re: ME7 spare output to drive analog tach
Post by: prj on May 29, 2023, 01:22:43 PM
so if there is a high/low change every 30 teeth that would make it output 2 pulses per one full revolution being that it has a 60-2 trigger wheel on the crank. the original setup in my case was 4 pulses per revolution. with that known my tach would require the change every 15 teeth of the crank sensor instead of 30 to get the 4 pulses.
Is the tach from a V8 engine? If it's from a 4 cyl, then I'm calling bullshit on that.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 29, 2023, 01:41:42 PM
Is the tach from a V8 engine? If it's from a 4 cyl, then I'm calling bullshit on that.

tach is original to the car which is a 1982 audi 4000 FWD non quattro that had a 1.7L 4 cyinder CIS mechanical fuel injected engine. the distributor on the original engine is a simple hall effect sensor thats wired to an ignition control module. the trigger wheel inside the distributor has 4 windows. very basic setup. every time a window opens, spark. 4 window openings per 1 revolution of the distributor. every time a window opens the coil is told to spark. the negative side of the coil is also tied directly to the tach input on the cluster. its clearly not bullshit as you say. its how it worked originally. must not be very well versed on cars from the 1980's as you are modern ones.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 29, 2023, 01:45:14 PM
Yes, from the tach. You need to bypass the input signal filter.
No, unless you had a V8.
This is also the case in some VW's, but not all. I bet there are many versions of clusters in audis too.


to make it simple your referring to a modification like in this post. https://forum.autosportlabs.com/viewtopic.php?t=3046


Title: Re: ME7 spare output to drive analog tach
Post by: prj on May 29, 2023, 02:01:48 PM
tach is original to the car which is a 1982 audi 4000 FWD non quattro that had a 1.7L 4 cyinder CIS mechanical fuel injected engine. the distributor on the original engine is a simple hall effect sensor thats wired to an ignition control module. the trigger wheel inside the distributor has 4 windows. very basic setup. every time a window opens, spark. 4 window openings per 1 revolution of the distributor. every time a window opens the coil is told to spark. the negative side of the coil is also tied directly to the tach input on the cluster. its clearly not bullshit as you say. its how it worked originally. must not be very well versed on cars from the 1980's as you are modern ones.
How many revolutions does the crankshaft make when the distributor makes 1 revolution?

Back to school boy.


Title: Re: ME7 spare output to drive analog tach
Post by: BlackT on May 29, 2023, 03:29:51 PM
I see you know with IDA,
There is one more not so elegant solution
Connect some coil(N75/injector or something like that or simple inducitor) to MIL output pin (47)
And change in file, to ECU activate pin 47 instead pin 37.
Coil(N75/injector) will produce voltage spike enought for tacho


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 29, 2023, 03:47:13 PM
I see you know with IDA,
There is one more not so elegant solution
Connect some coil(N75/injector or something like that or simple inducitor) to MIL output pin (47)
And change in file, to ECU activate pin 47 instead pin 37.
Coil(N75/injector) will produce voltage spike enought for tacho

so what your saying is they change the code to send the signal that would normally go to pin 37 and make it go to pin 47 for the MIL light instead? im alright with IDA but im not very well versed with the assembly language for the C167. i cant find where the output to pin 37 actually happens in the code. seems to be very difficult to populate the RAM completely for the 032HS ECU. everything for tuning the ecu is defined in RAM but beyond that nothing pertaining to this is and i have yet to find A2L that indicates anything about this output pin. over all if your right than my initial idea of making some other output thats 12V-0V work for this is still a possibility.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 29, 2023, 03:56:15 PM
How many revolutions does the crankshaft make when the distributor makes 1 revolution?

Back to school boy.

yeah yeah, 2 to 1. still doesnt solve the problem or even point in any direction to solving it. this ECU has been so picked apart already with reverse engineering im surprised someone hasnt already figured out an in ECU solution for this to avoid those costly tach converters because i know its possible to make it do what has to be done but this thread has already gone off in so many different directions of which i will try or have tried with no success. been messing with a few of the boards from the tach itself and made a small standalone harness so i dont have to keep tearing the cluster apart over and over but still no luck. looked at pin 37 output with oscilloscope and i can see pulses but the signal looks really noisy though that could be the scope doing that too. only way i could see the pulses from it was to set it to 500mv with a time of 2ms than i could make out something. i figured i should see something more around 5V at least but the output of it is obviously not that powerful.


Title: Re: ME7 spare output to drive analog tach
Post by: BlackT on May 29, 2023, 04:11:13 PM
Post your bin, I will do it


Title: Re: ME7 spare output to drive analog tach
Post by: _nameless on May 29, 2023, 04:16:27 PM
I have done something similar by using a diode on the coil trigger signal wires and that runs a npn transistor. That way you can get 4 ground pulses per revolution. Its elegant by any means but it will work


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 29, 2023, 09:02:49 PM
i got it to work and this is how i did it. i went through the ME7.5 schematics and found that the evap purge canister which i am not using is output through the same chip as the injectors and has the over all same circuit as the injectors do. than i looked at the other schematic and see that ECU pin 64 is fed processor pin P7.3. so i went into the BIN and searched for every single instance of P7_3 in IDA pro and noted it down. than i looked for every instance of P2_13 which is the original output of the RPM signal on ECU pin 39. i went through the binary and made every reference to P7_3 CC 00 which is NOP or no operation. after that i changed every instance that P2_13 to reference P7_3 instead so the RPM signal code was than output on ECU pin 64 instead of ECU pin 37.

after doing this and loading the file to the ECU i checked pin 64 with my oscilloscope and seen an extremely clean signal but not one strong enough to drive the tach. i took a spare micro relay i had laying there and wired it so that ECU pin 64 triggered the ground side the relay, gave it switched 12v and the through wire is also switched 12v. in the end when pin 64 grounded the relay the relay sends 12V to my tach. works perfectly and matches exactly with what the ECU says in VCDS measuring blocks!

hope this helps someone else avoid buying costly tach converters as it is obviously not necessary. thanks for all the help guys!!


also forgot to mention that i did this mod to the tach board itself in this thread though i dont think its necessary.  https://forum.autosportlabs.com/viewtopic.php?t=3046


Title: Re: ME7 spare output to drive analog tach
Post by: prj on May 30, 2023, 01:51:36 AM
I have done something similar by using a diode on the coil trigger signal wires and that runs a npn transistor. That way you can get 4 ground pulses per revolution. Its elegant by any means but it will work
Again, you don't get 4 ground pulses per revolution of the engine, which refers to the crankshaft. You get 4 pulses per revolution of camshaft, or 2 pulses per revolution of crankshaft. And this is what all the 4 cyl tachos expect.

You guys ever considered that the cars engines are 4 stroke and not 2 stroke?


Title: Re: ME7 spare output to drive analog tach
Post by: prj on May 30, 2023, 01:55:12 AM
i took a spare micro relay i had laying there and wired it so that ECU pin 64 triggered the ground side the relay, gave it switched 12v and the through wire is also switched 12v. in the end when pin 64 grounded the relay the relay sends 12V to my tach. works perfectly and matches exactly with what the ECU says in VCDS measuring blocks!

hope this helps someone else avoid buying costly tach converters as it is obviously not necessary. thanks for all the help guys!!


also forgot to mention that i did this mod to the tach board itself in this thread though i dont think its necessary.  https://forum.autosportlabs.com/viewtopic.php?t=3046

So in the end, the info provided to you was correct.
Also a mechanical relay won't work for any period of time, you either need a transistor or a solid state relay.


Title: Re: ME7 spare output to drive analog tach
Post by: terok on May 30, 2023, 07:46:33 AM
Any relay will not survive for long.

Also did you scope the original #37 pin signal with pullup-resistor connected to 12V?
Maybe try this new #64 pin also without relay and with pullup.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on May 31, 2023, 07:24:01 PM
Any relay will not survive for long.

Also did you scope the original #37 pin signal with pullup-resistor connected to 12V?
Maybe try this new #64 pin also without relay and with pullup.

37's output was messy with the scope on my car at least. 64's output is much cleaner and i did try it without the relay, there isnt enough there to drive the tach. this tach definitely needs to go 12 or higher than open.


Title: Re: ME7 spare output to drive analog tach
Post by: prj on June 01, 2023, 02:13:37 PM
37's output was messy with the scope on my car at least. 64's output is much cleaner and i did try it without the relay, there isnt enough there to drive the tach. this tach definitely needs to go 12 or higher than open.
You can't do it with a mechanical relay, it'll wear out very quickly and stop working. They are not meant to be switched on and off continuously.
Use a transistor or a SSR.


Title: Re: ME7 spare output to drive analog tach
Post by: vwnut8392 on June 05, 2023, 12:57:25 PM
You can't do it with a mechanical relay, it'll wear out very quickly and stop working. They are not meant to be switched on and off continuously.
Use a transistor or a SSR.
im using a solidstate relay now. works perfectly and no sound. regular relay just confirmed that i had found a solution to my problem.