Megasquirt Base Tune on NA M30B35

E28 technical advice asked and given! Troubleshooting, modifications and more.
Post Reply
hp1310
Posts: 21
Joined: Jan 07, 2022 5:37 AM
Location: Vancouver

Megasquirt Base Tune on NA M30B35

Post by hp1310 »

I recently installed a megasquirt pnp unit on my M30B35 and I’ve spent a while reading up on tuning and messing around with the tune but I feel like I’m not making any progress on it. The base tune that megasquirt provides doesn’t seem to work well either. Does anyone have a tune that they would be willing to share for a stock M30 engine? Thank you!
turbodan
Posts: 9153
Joined: Jan 09, 2007 10:19 PM

Re: Megasquirt Base Tune on NA M30B35

Post by turbodan »

I've got M20 tunes but no M30.

Do you have a wideband 02 sensor or are you tuning with the narrowband? What specific aspects of the tune are most problematic?
Ju@n
Posts: 702
Joined: Apr 27, 2013 1:11 PM
Location: Uruguay

Re: Megasquirt Base Tune on NA M30B35

Post by Ju@n »

I do have a tune for my NA M30B34.
This was at some time the map I had: https://i.ibb.co/1qbxf1q/Screen-Shot-20 ... -40-54.png
But I would be wary, what particular issue are you facing? Generally I'd say a map won't give you major issues unless it's really wonky.
tschultz
Posts: 4059
Joined: Mar 01, 2009 7:58 PM
Location: Denver, Colorado
Contact:

Re: Megasquirt Base Tune on NA M30B35

Post by tschultz »

Is you req_fuel value incorrect or maybe wrong warmup enrichment?
RobertRO
Posts: 418
Joined: Feb 12, 2006 12:00 PM
Location: Romania
Contact:

Re: Megasquirt Base Tune on NA M30B35

Post by RobertRO »

I don't know if it may be of any help, but here's my Megasquirt / Microsquirt module build thread, for a NA M30B35 on an E32. In the "Tune" post you may also find a .zip archive with a tune that ran decently. However, use it cautiously, as a base tune only.

https://www.bimmerforums.com/forum/show ... my-E32-M30
hp1310
Posts: 21
Joined: Jan 07, 2022 5:37 AM
Location: Vancouver

Re: Megasquirt Base Tune on NA M30B35

Post by hp1310 »

turbodan wrote: Mar 21, 2023 4:31 PM I've got M20 tunes but no M30.

Do you have a wideband 02 sensor or are you tuning with the narrowband? What specific aspects of the tune are most problematic?
I am using a wideband 02 which I’ve wired the 12V to a connection in the cars interior and the ground is wired directly to a chassis ground. Is there any way to determine if my 02 readings are accurate or not?

My tune seems fairly volatile at the moment sometimes the idle hunts and it dies and sometimes it’s okay and the same goes for when I’m on the throttle. Most likely just have to tune the maps more!
hp1310
Posts: 21
Joined: Jan 07, 2022 5:37 AM
Location: Vancouver

Re: Megasquirt Base Tune on NA M30B35

Post by hp1310 »

Ju@n wrote: Mar 21, 2023 6:40 PM I do have a tune for my NA M30B34.
This was at some time the map I had: https://i.ibb.co/1qbxf1q/Screen-Shot-20 ... -40-54.png
But I would be wary, what particular issue are you facing? Generally I'd say a map won't give you major issues unless it's really wonky.
Thank you I’ll try it out! I’m having trouble getting idle steady and at times the engine will struggle getting to higher RPM which I assume just needs adjustments on the fuel and ignition maps. I’m reading up on it and hopefully will figure it out soon!
hp1310
Posts: 21
Joined: Jan 07, 2022 5:37 AM
Location: Vancouver

Re: Megasquirt Base Tune on NA M30B35

Post by hp1310 »

tschultz wrote: Mar 22, 2023 3:28 AM Is you req_fuel value incorrect or maybe wrong warmup enrichment?
I actually didn’t have the correct req_fuel I’ll fix that thanks!
hp1310
Posts: 21
Joined: Jan 07, 2022 5:37 AM
Location: Vancouver

Re: Megasquirt Base Tune on NA M30B35

Post by hp1310 »

RobertRO wrote: Mar 22, 2023 4:54 AM I don't know if it may be of any help, but here's my Megasquirt / Microsquirt module build thread, for a NA M30B35 on an E32. In the "Tune" post you may also find a .zip archive with a tune that ran decently. However, use it cautiously, as a base tune only.

https://www.bimmerforums.com/forum/show ... my-E32-M30
I’ll be cautious with it but that’s perfect thank you for sharing that!
turbodan
Posts: 9153
Joined: Jan 09, 2007 10:19 PM

Re: Megasquirt Base Tune on NA M30B35

Post by turbodan »

hp1310 wrote: Mar 22, 2023 3:00 PM I am using a wideband 02 which I’ve wired the 12V to a connection in the cars interior and the ground is wired directly to a chassis ground. Is there any way to determine if my 02 readings are accurate or not?

My tune seems fairly volatile at the moment sometimes the idle hunts and it dies and sometimes it’s okay and the same goes for when I’m on the throttle. Most likely just have to tune the maps more!
Get a datalog and check to see if you have something weird going on with enrichments. Acceleration enrichment can cause problems like this if it is not tuned properly. If the AE trigger thresholds are too low it will be activating all the time when you don't want it to. I think your AFR readings are probably fine.

Idle is pretty easy to tune if you don't have MAP based accel enrichment kicking on and off. Ignition timing at idle is important, I use a bit of a pocket in the table that helps corner the RPM and keep it in a narrow range, I have full advance of about 28 degrees at 25/30 kpa and 800 RPM. At 850 RPM for the same manifold pressure, I have 18 degrees of timing. Megasquirt automatically interpolates between these figures resulting in a steep ramp between 800 and 850 that keeps RPM stable. If the idle speed tries to climb out of the pocket, it automatically pulls timing back. If RPM dips, it feeds advance back in. Works great.

I would advise turning off idle advance and running the idle air control in warm up mode, open loop. Closed loop idle control and idle advance require more tuning and I don't know if it's really worth it. Works pretty well in a open loop mode where it just steps down as coolant temp climbs.
hp1310
Posts: 21
Joined: Jan 07, 2022 5:37 AM
Location: Vancouver

Re: Megasquirt Base Tune on NA M30B35

Post by hp1310 »

turbodan wrote: Mar 22, 2023 6:42 PM
hp1310 wrote: Mar 22, 2023 3:00 PM I am using a wideband 02 which I’ve wired the 12V to a connection in the cars interior and the ground is wired directly to a chassis ground. Is there any way to determine if my 02 readings are accurate or not?

My tune seems fairly volatile at the moment sometimes the idle hunts and it dies and sometimes it’s okay and the same goes for when I’m on the throttle. Most likely just have to tune the maps more!
Get a datalog and check to see if you have something weird going on with enrichments. Acceleration enrichment can cause problems like this if it is not tuned properly. If the AE trigger thresholds are too low it will be activating all the time when you don't want it to. I think your AFR readings are probably fine.

Idle is pretty easy to tune if you don't have MAP based accel enrichment kicking on and off. Ignition timing at idle is important, I use a bit of a pocket in the table that helps corner the RPM and keep it in a narrow range, I have full advance of about 28 degrees at 25/30 kpa and 800 RPM. At 850 RPM for the same manifold pressure, I have 18 degrees of timing. Megasquirt automatically interpolates between these figures resulting in a steep ramp between 800 and 850 that keeps RPM stable. If the idle speed tries to climb out of the pocket, it automatically pulls timing back. If RPM dips, it feeds advance back in. Works great.

I would advise turning off idle advance and running the idle air control in warm up mode, open loop. Closed loop idle control and idle advance require more tuning and I don't know if it's really worth it. Works pretty well in a open loop mode where it just steps down as coolant temp climbs.
That makes sense I like how you described tuning the idle I’ll give that a shot! I also sometimes find that the engine will only run rich and if I try to lean it out it will die. Is this something where I need to adjust the timing or is there another setting that causes this?
turbodan
Posts: 9153
Joined: Jan 09, 2007 10:19 PM

Re: Megasquirt Base Tune on NA M30B35

Post by turbodan »

Could be a lot of things. If you're running a generated timing table go ahead and shit-can it. I've never seen a table generator that produced something worthwhile. Ignition timing maps need to reflect the VE curve of the engine and incorporate vacuum advance as well.

Have you calibrated your AFR table in Tunerstudio for your specific wideband setup?
hp1310
Posts: 21
Joined: Jan 07, 2022 5:37 AM
Location: Vancouver

Re: Megasquirt Base Tune on NA M30B35

Post by hp1310 »

turbodan wrote: Mar 23, 2023 1:09 AM Could be a lot of things. If you're running a generated timing table go ahead and shit-can it. I've never seen a table generator that produced something worthwhile. Ignition timing maps need to reflect the VE curve of the engine and incorporate vacuum advance as well.

Have you calibrated your AFR table in Tunerstudio for your specific wideband setup?
I have calibrated the AFR table for the AEM AFR unit that I am running. My current timing table is one that I've found online but it definitely needs work. Still not completely sure how to adjust the ignition map based on the VE curve and taking all the other inputs into consideration. Do you recommend any resources to learn about it?
Ju@n
Posts: 702
Joined: Apr 27, 2013 1:11 PM
Location: Uruguay

Re: Megasquirt Base Tune on NA M30B35

Post by Ju@n »

I would start with a standard timing table and go from there, you can get the timing table from the original ECU.
If not, you can get a generated timing table, top right 34, top left 10, bottom right 40, bottom left ~15.
Disable everything you can, acceleration enrichment, adv corrections, afr compensation, (in a megasquirt we tune with VE, so go to your AFR table and set everything to 13.8 or thereabouts to start), and every other type of thing that could be changing fuel/timing.
After that, if you keep on having issues with idle or with acceleration (if your wideband reads correct values), I'd look at the engine, usually issues with an engine only running too rich are tied up with really unbalanced injectors.
turbodan
Posts: 9153
Joined: Jan 09, 2007 10:19 PM

Re: Megasquirt Base Tune on NA M30B35

Post by turbodan »

hp1310 wrote: Mar 23, 2023 2:31 AM I have calibrated the AFR table for the AEM AFR unit that I am running. My current timing table is one that I've found online but it definitely needs work. Still not completely sure how to adjust the ignition map based on the VE curve and taking all the other inputs into consideration. Do you recommend any resources to learn about it?
It can be hard to find good resources all in one spot. It takes a lot of googling, examination of maps from various different applications, comparison of contradictory information and trial and error.

Generally speaking, the ignition map will be somewhat inverse to the VE table. At high load, you dial in greater advance where volumetric efficiency is lower. Around peak torque, cylinder pressures are highest and minimum best timing will be reduced. As you rev toward peak HP, VE is dropping off and you can feed timing back in gradually to extend the power curve.

For example, this map from my 528e:
Image

Peak torque hits around 3000 RPM, you can see the timing reflect that. Below 3000 it's running full advance to pump up the low end power, from 3000 on up it gradually dials timing back in as revs climb and volumetric efficiency drops off. This is a modified version of the curve you would generate solely based on RPM, which starts with conservative timing at low RPM and ramps up to full advance usually by 2000 or 3000 RPM. You can also see the idle control tuning on the lower left side.

At my altitude, atmospheric pressure is only about 80 kpa, which is why I have that as the top row before it gets into boost. Labeling your rows and columns is important, you want to place these strategically depending on engine characteristics. For example, peak torque. You want to have a column at that RPM to best tailor your map to what the engine needs. That's an inflection point.

For now, I think you need to get fueling sorted out. That's the most likely cause of your issues. Make sure there aren't any unwanted, spontaneous enrichments. Turn off EAE, check your time based accel enrichment settings, make sure the thresholds are high enough that it's not triggering off of noise. Make sure the settings aren't excessive in terms of pulsewidths or accel time. Take some datalogs and see what it's doing. Get the idle stable and you should be able to tune from there.
hp1310
Posts: 21
Joined: Jan 07, 2022 5:37 AM
Location: Vancouver

Re: Megasquirt Base Tune on NA M30B35

Post by hp1310 »

Ju@n wrote: Mar 23, 2023 9:28 AM I would start with a standard timing table and go from there, you can get the timing table from the original ECU.
If not, you can get a generated timing table, top right 34, top left 10, bottom right 40, bottom left ~15.
Disable everything you can, acceleration enrichment, adv corrections, afr compensation, (in a megasquirt we tune with VE, so go to your AFR table and set everything to 13.8 or thereabouts to start), and every other type of thing that could be changing fuel/timing.
After that, if you keep on having issues with idle or with acceleration (if your wideband reads correct values), I'd look at the engine, usually issues with an engine only running too rich are tied up with really unbalanced injectors.
Do you know where or how to source the timing table from the original ECU? I got the paid version of tunerstudio now so I'll adjust my settings and try out VE analyzer once my idle is smooth!
hp1310
Posts: 21
Joined: Jan 07, 2022 5:37 AM
Location: Vancouver

Re: Megasquirt Base Tune on NA M30B35

Post by hp1310 »

turbodan wrote: Mar 23, 2023 10:31 AM
hp1310 wrote: Mar 23, 2023 2:31 AM I have calibrated the AFR table for the AEM AFR unit that I am running. My current timing table is one that I've found online but it definitely needs work. Still not completely sure how to adjust the ignition map based on the VE curve and taking all the other inputs into consideration. Do you recommend any resources to learn about it?
It can be hard to find good resources all in one spot. It takes a lot of googling, examination of maps from various different applications, comparison of contradictory information and trial and error.

Generally speaking, the ignition map will be somewhat inverse to the VE table. At high load, you dial in greater advance where volumetric efficiency is lower. Around peak torque, cylinder pressures are highest and minimum best timing will be reduced. As you rev toward peak HP, VE is dropping off and you can feed timing back in gradually to extend the power curve.

For example, this map from my 528e:
Image

Peak torque hits around 3000 RPM, you can see the timing reflect that. Below 3000 it's running full advance to pump up the low end power, from 3000 on up it gradually dials timing back in as revs climb and volumetric efficiency drops off. This is a modified version of the curve you would generate solely based on RPM, which starts with conservative timing at low RPM and ramps up to full advance usually by 2000 or 3000 RPM. You can also see the idle control tuning on the lower left side.

At my altitude, atmospheric pressure is only about 80 kpa, which is why I have that as the top row before it gets into boost. Labeling your rows and columns is important, you want to place these strategically depending on engine characteristics. For example, peak torque. You want to have a column at that RPM to best tailor your map to what the engine needs. That's an inflection point.

For now, I think you need to get fueling sorted out. That's the most likely cause of your issues. Make sure there aren't any unwanted, spontaneous enrichments. Turn off EAE, check your time based accel enrichment settings, make sure the thresholds are high enough that it's not triggering off of noise. Make sure the settings aren't excessive in terms of pulsewidths or accel time. Take some datalogs and see what it's doing. Get the idle stable and you should be able to tune from there.
Thank you that helped a lot with understanding ignition timing! I'll read up a bit more and spend the weekend tuning the car
Ju@n
Posts: 702
Joined: Apr 27, 2013 1:11 PM
Location: Uruguay

Re: Megasquirt Base Tune on NA M30B35

Post by Ju@n »

hp1310 wrote: Mar 24, 2023 6:18 PM
Ju@n wrote: Mar 23, 2023 9:28 AM I would start with a standard timing table and go from there, you can get the timing table from the original ECU.
If not, you can get a generated timing table, top right 34, top left 10, bottom right 40, bottom left ~15.
Disable everything you can, acceleration enrichment, adv corrections, afr compensation, (in a megasquirt we tune with VE, so go to your AFR table and set everything to 13.8 or thereabouts to start), and every other type of thing that could be changing fuel/timing.
After that, if you keep on having issues with idle or with acceleration (if your wideband reads correct values), I'd look at the engine, usually issues with an engine only running too rich are tied up with really unbalanced injectors.
Do you know where or how to source the timing table from the original ECU? I got the paid version of tunerstudio now so I'll adjust my settings and try out VE analyzer once my idle is smooth!
Sure, you'll need tunerpro, the file for the ecu definition and a bin, although I might add I'm not sure those files are "up" anymore.
I seem to recall cek had a thread for his M30B35 with a ton of screenshots of spark tables.
Image
viewtopic.php?f=3&t=116484&hilit=spark&start=625
Post Reply