BMW e34 M5 S38

Your chance to introduce yourself and your vehicle
Post Reply
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

BMW e34 M5 S38

Post by mtmotorsport »

Project for a customer. Converting this old S38B36 engine to coil on plug ignition, sequential injection, DBW, wideband oxygen sensor, etc. Basically modernize the engine. Future plan is for an EFR 8374 turbo.

Proteus ECU
S54 ITB DBW Actuator
Mercedes Benz throttle position sensor (allows me to mount original cable bell crank to maintain cruise control)
Dodge Dart Bosch ignition coils (very long boot, cheap and easy to get)
MRT Engineering Cam sensor kit (replaces distributor)
AEM UEGO via CAN (wired into OEM 4 pin connector)
1000cc Bosch EV14 injectors (I have on hand, yes they are more than enough)

Proteus is wired into an original Motronic ECU case. 6x EcoSpark IGBTs have been added for coil control. This is for a few reason, first the E-box is very tight, and this ensures OEM fitment. Secondly I plan on reusing the entire OEM engine harness adding only sub-harnesses as required for the new stuff. There are enough unused pins in the connector for these sub harnesses.

We dyno'd the car before the conversion, and in a few weeks when it is done we will dyno it again. I'm not sure if there is much power on the table but we will see.
Attachments
proteus e34.jpg
proteus e34.jpg (791.34 KiB) Viewed 19946 times
proteus e34.2.jpg
proteus e34.2.jpg (624.56 KiB) Viewed 19946 times
s38 coil mount.jpg
s38 coil mount.jpg (668.27 KiB) Viewed 19946 times
Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

Maybe the intake resonance flap transitions can be smoothed out so there isn't such a dramatic drop in torque at 4100rpm.
Attachments
stock run.png
stock run.png (37.12 KiB) Viewed 19945 times
Matt
MT Motorsport / EcotecMiata
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW e34 M5 S38

Post by AndreyB »

Did you have to remove ampseal connectors or is that an older board without connectors?

Interesting, a revival of the "proteus as module" idea.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

Removed the connectors
Matt
MT Motorsport / EcotecMiata
Simon@FutureProof
contributor
contributor
Posts: 413
Joined: Tue Jul 24, 2018 8:55 pm
Github Username: Orchardperformance
Slack: Orchardperformance

Re: BMW e34 M5 S38

Post by Simon@FutureProof »

We have recently added some things to the firmware that may help with the DISA flap switch overs, the next firmware release should contain it.

Essentially we have added the ability to set a modifier map for the spark and VE based on another variable.

In your case you would be able to set the variable as your DISA output, then dyno the engine with and without the DISA flap activated using the modifier map to change the VE and timing to suit.

You can then have the DISA flap activate more intelligently at different loads without remapping the engine.
Now keeping MRE in stock in the UK - https://www.FutureProofPerformance.com
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

That would be great!
Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

Can anyone see why this is failing ETB TPS auto calibrate?

Using the E46 M3 throttle actuator, there is one TPS (I've wired it as the main TPS, TPS1) on the actual actuator itself. The secondary TPS (2) is on the actual throttle body shaft. This is identical to the factory E46 M3 setup. This actuator does not rest in a slightly open position, it rests essentially fully closed. What can be seen in the logs is that when the ETB motor is driven in the close direction there is some give to the internal stop in the actuator and the main TPS signal dips slightly from the resting position. Due to the linkage, and the fact that this deflection is essentially internal to the actuator, there is no perceptible movement of the actual throttle shaft and consequently, no movement of TPS2.

Any idea how to work around this, if this is indeed the issue keeping me from passing the TPS auto cal?

https://www.rusefi.com/online/?vehicleName=BMW+E34+M5&user_id=1468
Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

Ok, I think I found the reason for failing auto TPS calibration. It seems there is about 0.200v of movement on the main TPS before the secondary TPS catches up. This is a combination of the angle of the linkage and the small amount of play in 30+ year old ITBs.

My solution is to fit a dual track TPS to the actual throttle shaft. This way the signals always match, and the controller is working towards achieving target on the actual throttle shaft, not the actuator shaft.
Matt
MT Motorsport / EcotecMiata
mi-hol
Posts: 39
Joined: Sun Jun 05, 2022 10:37 pm
Location: Tübingen, Germany
Github Username: mi-hol

Re: BMW e34 M5 S38

Post by mi-hol »

Seems conversion is nearly finished looking forward to performance diagram :)
Best Regards
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

ETB issues sorted. Next issue is GP PWM output.

Attempting to use GPPWM1 to control intake flap. Lowside 9 output on Proteus. I know the output physically works, if I set it to Fan1 it behaves as I would expect. However with the GP PWM table I've got it will not activate the output. I've uploaded the tune and datalog.
Matt
MT Motorsport / EcotecMiata
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: BMW e34 M5 S38

Post by mck1117 »

mtmotorsport wrote:
Tue Feb 28, 2023 11:00 pm
I've uploaded the tune and datalog.
link please
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

Matt
MT Motorsport / EcotecMiata
Timmo6
Posts: 3
Joined: Mon May 01, 2023 9:01 am

Re: BMW e34 M5 S38

Post by Timmo6 »

Any progress in sorting out GP PWM output as I'm following this topic?
Curious about further tuning VE and IGN tables when Flap is activated because I am struggling with this since I activated the Flap in the 2500-4100rpm range. I can feel a drop in torque in this range while activated. With some small adjustments of VE values in this range I still have a good AFR. I probably need some ignition advance adjustments too.
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: BMW e34 M5 S38

Post by mck1117 »

Here's how I'd do it:

- Fully tune the engine with the flap deactivated using the normal VE/ignition tables.

- Set up GPPWM to open the flap where you want it (sounds like you have this part figured out).
image.png
image.png (75.76 KiB) Viewed 18080 times
- Set up a VE blend table to make the required VE adjustment for when the flap is open. You can chain the blend parameter for for VE/ignition blends off of GPPWM, so it will add the blend table when the GPPWM output is active.
image.png
image.png (194.18 KiB) Viewed 18080 times
- Then to tune it, change your activation table to force it on 100% of the time, and re-tune the engine using just the blend table to adjust the VE up/down as needed when the flap is open.

- Switch the activation table back to whenever you want it open. A good approximation of when to open it is that whenever the VE blend table values are positive, it's better to have the flap open than closed.
Timmo6
Posts: 3
Joined: Mon May 01, 2023 9:01 am

Re: BMW e34 M5 S38

Post by Timmo6 »

Very good approach, thank you.
Though i,m not sure i can achieve that with my system (VEMS). I will figure that out.
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

Update on this project:

Runs fairly well except for coasting in gear to idle. The engine will start bucking around 1300-1400rpm until you press the brake to slow it down, or clutch in. This problem happens at the target idle rpm value plus the RPM upper limit idle detection threshold. What I'm seeing is the idle position drop from 26(%) to 0, and then back up, oscillating for a long time. I've uploaded a datalog showing this issue at around the 220 second mark.

I can change the engine speed that this oscillation occurs by changing the RPM upper limit idle activation value. In this datalog warm engine idle rpm target is 900rpm, and the idle RPM upper limit value is 500.

What should be addressed to stop this oscillation? The engine is VERY responsive to throttle angle changes at low speed so this problem makes it quite horrible to drive.

The OEM setup had a fixed throttle plate angle as it was drive by cable and used a large bosch style idle air control valve plumbed to all 6 intake runners. That valve failed, which prompted the conversion to drive by wire. It did not display any of these issues with the stock setup.

The car also has another sync issue during cranking that I originally attributed to a flaky 30+ year old VR crank sensor. I replaced it with a hall type sensor and that made no real change to the starting. RPM reading drops out during cranking every cycle or so. I disabled fast start, and also the cam sensor (which is a VR sensor in place of the distributor rotor) and that had no real effect either. EDIT: This issue I assume was present with the OEM ecu as well because it had a very long extended crank to get it to fire up. I just cant see anything wrong with the huge external 60-2 trigger on the crank pulley, and the factory crank sensor mount is adjustable for air gap, which has no effect on this issue.


Tune:
https://rusefi.com/online/view.php?msq=1478

Log:
Matt
MT Motorsport / EcotecMiata
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW e34 M5 S38

Post by AndreyB »

please make log public?
image.png
image.png (52.6 KiB) Viewed 17418 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

Fixed
Matt
MT Motorsport / EcotecMiata
User avatar
NormanAlphaspeed
Posts: 63
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: BMW e34 M5 S38

Post by NormanAlphaspeed »

mtmotorsport wrote:
Thu Jun 01, 2023 8:42 pm
Update on this project:

Runs fairly well except for coasting in gear to idle. The engine will start bucking around 1300-1400rpm until you press the brake to slow it down, or clutch in. This problem happens at the target idle rpm value plus the RPM upper limit idle detection threshold. What I'm seeing is the idle position drop from 26(%) to 0, and then back up, oscillating for a long time. I've uploaded a datalog showing this issue at around the 220 second mark.

I can change the engine speed that this oscillation occurs by changing the RPM upper limit idle activation value. In this datalog warm engine idle rpm target is 900rpm, and the idle RPM upper limit value is 500.

What should be addressed to stop this oscillation? The engine is VERY responsive to throttle angle changes at low speed so this problem makes it quite horrible to drive.

The OEM setup had a fixed throttle plate angle as it was drive by cable and used a large bosch style idle air control valve plumbed to all 6 intake runners. That valve failed, which prompted the conversion to drive by wire. It did not display any of these issues with the stock setup.

The car also has another sync issue during cranking that I originally attributed to a flaky 30+ year old VR crank sensor. I replaced it with a hall type sensor and that made no real change to the starting. RPM reading drops out during cranking every cycle or so. I disabled fast start, and also the cam sensor (which is a VR sensor in place of the distributor rotor) and that had no real effect either. EDIT: This issue I assume was present with the OEM ecu as well because it had a very long extended crank to get it to fire up. I just cant see anything wrong with the huge external 60-2 trigger on the crank pulley, and the factory crank sensor mount is adjustable for air gap, which has no effect on this issue.


Tune:
https://rusefi.com/online/view.php?msq=1478

Log:
-snip-
I have a feeling it might be your coasting idle table being all zeroes, disable it using
image.png
image.png (332.21 KiB) Viewed 17394 times
As it is, coasting-to-idle is not very smart and has no tranisition time, so it might jump between both (specially if coasting IAC position is 0)
Actually, an almost-edit
image.png
image.png (64.91 KiB) Viewed 17394 times
You can certainly see it banding from coasting to normal and back to coasting

About the sync stuff, a log of cranking would help a lot
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

Tried to disable the coasting IAC and it just hangs up around 2000rpm. I had enabled it for that reason. If I set the ETB target table low enough to get the engine to return to idle it has too much engine braking to drive smoothly. Ideally if we had some taper time from IAC coasting position to base ETB target position above idle that would be ideal for engine braking but as it is right now it is still very good. With a better understanding of how the coasting IAC table works I was able to tune it to be butter smooth on decel. You can now decel from high rpm in a low gear right to idle and no weirdness. I've attached a log of the starting and the tune with the adjusted coasting table.

Tune:
https://rusefi.com/online/view.php?msq=1479

Datalog of cold start:


Datalog of hot start:
Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: BMW e34 M5 S38

Post by mtmotorsport »

Just noticed cold start datalog doesn't start until a second after it actually fires. I'll try that again later today.
Matt
MT Motorsport / EcotecMiata
User avatar
NormanAlphaspeed
Posts: 63
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: BMW e34 M5 S38

Post by NormanAlphaspeed »

I have requested dashpot (return-to-idle logic) for some time now.

https://github.com/rusefi/rusefi/issues/5303

I wrote some Lua code that does it somewhat, but a better implementation would be much appreciated lol

I'll take a lookat the starting later today
User avatar
NormanAlphaspeed
Posts: 63
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: BMW e34 M5 S38

Post by NormanAlphaspeed »

Dashpot functionality has been added on the latest firmware!
image.png
image.png (199.22 KiB) Viewed 17086 times
Whatever you add on extra throttle (which will be used for dashpot), remove from coasting IAC. Then when coming to idle from coasting it'll hold the extra air for the set amount of time, then transition to normal idle using the decay time.

I tested it and it works pretty good!
Hmelik
Posts: 14
Joined: Sun Jan 16, 2022 5:07 pm

Re: BMW e34 M5 S38

Post by Hmelik »

HI!!
I tried a new function dashpot and here is the log file, At first the ETB target falls only then it starts working dashpot.
log https://rusefi.com/online/view.php?log=1251
https://rusefi.com/online/view.php?msq=1496
Attachments
Screenshot 2023-06-25 183112.png
Screenshot 2023-06-25 183112.png (47.95 KiB) Viewed 16926 times
Post Reply