Reverse Engineering ME7.4.4 as a stand alone ECU
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Reverse Engineering ME7.4.4 as a stand alone ECU
TunerProRT Plugin is up and running! Bin upload/download and emulation mode works.
Time to start building maps and tables and fueling code
Time to start building maps and tables and fueling code
Re: Reverse Engineering ME7.4.4 as a stand alone ECU
Unreal!!! great work 

According to chemistry, alcohol is a solution...
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Reverse Engineering ME7.4.4 as a stand alone ECU
cheers Gareth
- Tre-Cool
- Posts: 414
- Joined: Tue Oct 16, 2012 12:17 pm
- cars: VY SS UTE, VX Drag Car
- Location: Perth
- Contact:
Re: Reverse Engineering ME7.4.4 as a stand alone ECU
very cool. love to know more about that crank decoding stuff you did.
I may have skipped it, but does it also have a cam position sync aswell?
I may have skipped it, but does it also have a cam position sync aswell?
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Reverse Engineering ME7.4.4 as a stand alone ECU
I've made the crank decoding very flexible:
#define ToothCount 36
#define MissingTeeth 1
#define ActualTeeth (ToothCount - MissingTeeth)
#define DegreesPerTooth (360 / ToothCount)
#define DegreePrecision 2 // 0.5 degree granularity
So all you really need to define is the tooth count, how many are missing and the precision you want for spark timing. This works fine for 60-2, 36-1, 12-1 tooth patterns etc. More complex patterns found on 'quick start' engines would need the decoding function modified and I'll look at adding a few different ones it once the ECU is running my engine. I can migrate these settings to EEPROM so you can define them in Tunerpro and not have to recompile the firmware.
This ECU has built in coil drivers with a very clever circuit to identify which 'end' of the wasted spark coil is under compression and which is on the exhaust stroke. From there the ECU knows the cam phasing so no sensor is needed. Before this is known (cranking etc) injection is batch or bank fired, then going to fully sequential once phasing is detected. I haven't implemented this in code yet but Bosch did so it's possible and I just need to read the IO port from the sensing circuit after the ignition fires.
If using 'smart' coils, this obviously won't be available but there are a few spare logic inputs so a cam hall sensor could be used for phasing.
#define ToothCount 36
#define MissingTeeth 1
#define ActualTeeth (ToothCount - MissingTeeth)
#define DegreesPerTooth (360 / ToothCount)
#define DegreePrecision 2 // 0.5 degree granularity
So all you really need to define is the tooth count, how many are missing and the precision you want for spark timing. This works fine for 60-2, 36-1, 12-1 tooth patterns etc. More complex patterns found on 'quick start' engines would need the decoding function modified and I'll look at adding a few different ones it once the ECU is running my engine. I can migrate these settings to EEPROM so you can define them in Tunerpro and not have to recompile the firmware.
This ECU has built in coil drivers with a very clever circuit to identify which 'end' of the wasted spark coil is under compression and which is on the exhaust stroke. From there the ECU knows the cam phasing so no sensor is needed. Before this is known (cranking etc) injection is batch or bank fired, then going to fully sequential once phasing is detected. I haven't implemented this in code yet but Bosch did so it's possible and I just need to read the IO port from the sensing circuit after the ignition fires.
If using 'smart' coils, this obviously won't be available but there are a few spare logic inputs so a cam hall sensor could be used for phasing.
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Reverse Engineering ME7.4.4 as a stand alone ECU
A little more progress.
Still need to add more conversion scalars, IAT, CLT, MAP, TPS, Dwell, deadtime and test the speed density fueling code.
I've used up around 5kbytes of SRAM out of the stock 32kbytes for the tables currently implemented. 7kbytes of program code space used out of 512kbytes so there's plenty left. 64kbytes of that is used for preserving the calibration from SRAM. Ignition angles are re-calculated every trigger wheel tooth and the main code thread is running 1000 times per second though this might need to be reduced as the calculations get more complex.
Maximum logging speed of 200hz though this consumes CPU computing time so I've added a delay in the ADX monitor function in tunerpro to bring it down to around 50hz.
My CNC'd VR sensor mount arrived, just waiting on a pin extraction tool to finish up a quick loom and hopefully I can get the car running spark only from this ECU then fully migrate from 12P to BV744.
Still need to add more conversion scalars, IAT, CLT, MAP, TPS, Dwell, deadtime and test the speed density fueling code.
I've used up around 5kbytes of SRAM out of the stock 32kbytes for the tables currently implemented. 7kbytes of program code space used out of 512kbytes so there's plenty left. 64kbytes of that is used for preserving the calibration from SRAM. Ignition angles are re-calculated every trigger wheel tooth and the main code thread is running 1000 times per second though this might need to be reduced as the calculations get more complex.
Maximum logging speed of 200hz though this consumes CPU computing time so I've added a delay in the ADX monitor function in tunerpro to bring it down to around 50hz.
My CNC'd VR sensor mount arrived, just waiting on a pin extraction tool to finish up a quick loom and hopefully I can get the car running spark only from this ECU then fully migrate from 12P to BV744.
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Reverse Engineering ME7.4.4 as a stand alone ECU
Loom is mostly complete! 3bar TMAP sensor added to the manifold, 36-1 trigger wheel and VR sensor added, dizzy and old coil removed.
Starts, runs and is tunable. I still have a bit of coding to do to make Accel enrichment / decay more configurable, and add in Async enrichment if its needed and also tip in spark tables and boost and idle PID's.
There are still sooooo many I/O pins free in this ECU. All spark and fuel calculations are running in a 100hz interrupt, serial comms is running in the main loop at around ~800hz. Spark timing is updated every tooth and the timing is rock solid at all RPM's under the timing light.
I'm pretty happy with how its all coming together!
2-step and rolling antilag works great too.
Starts, runs and is tunable. I still have a bit of coding to do to make Accel enrichment / decay more configurable, and add in Async enrichment if its needed and also tip in spark tables and boost and idle PID's.
There are still sooooo many I/O pins free in this ECU. All spark and fuel calculations are running in a 100hz interrupt, serial comms is running in the main loop at around ~800hz. Spark timing is updated every tooth and the timing is rock solid at all RPM's under the timing light.
I'm pretty happy with how its all coming together!
2-step and rolling antilag works great too.
- antus
- Site Admin
- Posts: 9008
- Joined: Sat Feb 28, 2009 8:34 pm
- cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B - Contact:
Re: Reverse Engineering ME7.4.4 as a stand alone ECU
excellent work 

Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Reverse Engineering ME7.4.4 as a stand alone ECU
A little dyno time this morning to get the VE table in the ballpark and find peak torque at WOT.
Blue curve is a fixed 12deg throughout, and purple is 'optimal'. Not a huge difference between 12 and 24deg of timing.
The wastegate was pinned open and max boost was under 1psi. The plan is to leave everything else the same and swap out the stock cam with a 'leaded' holden Camira cam. These are supposed to make a good 10kw more and make power up to 7000rpm. Hopefully similar gains with boost. We'll see!
Blue curve is a fixed 12deg throughout, and purple is 'optimal'. Not a huge difference between 12 and 24deg of timing.
The wastegate was pinned open and max boost was under 1psi. The plan is to leave everything else the same and swap out the stock cam with a 'leaded' holden Camira cam. These are supposed to make a good 10kw more and make power up to 7000rpm. Hopefully similar gains with boost. We'll see!