Disabling perfect gas law

Hello ! ECUMASTER like most other ecu’s calculates injection time including Intake Air Temperature. The problem is it alters fuel injection time invisibly because of the ideal gas law (like every other ECU) because of the Intake temperature, which is different than the extra IAT enrichment ECUMASTER has (again like most other ECU).
What i would like to have is

  • An option altering or disabling the IAT from the internal calculation because even when every IAT correction Table is ZERO, intake air temp alters my injection pulse. This is most obesrvable on idle and in Traffic that creates a situation where the heat soaked manifold shows e.x. 55-60celsius. The AFR goes lean, when you roll and temps cool down, drop it to idle again, now AFR is good again, and that makes people go crazy by the incosistent AFR. Megasquirt has a different table for that and they call it MAT AIR DENSITY TABLE

HKS on older aftermarket ECU’s had an IAT 3D correction MAP. Like the charge Temp ECUMASTER has, but HKS had Axis of IAT vs LOAD. so you could make your IAT correction more neutral in IDLE and more enrichment on high load situations where you know IAT can and would be more Substantially affect your final AFR

I understand the problem, but the proposed solution is not good.

Disabling the air density calculation will “fix” the heat-soak issue but will generate an issue with wrong fueling when IAT has actually changed.

In fact, I don’t know of any simple solution that can be done with tuning alone. Keep in mind that engine load is not a deciding factor. You can have a light load while cruising, and there will be no heat soak. Doing the same while driving slowly in traffic is an entirely different situation.

The real factors of heat soak are engine rpm, vehicle speed, and time. There is no easy way to include time in the heat-soak correction model.

The real solution to this problem is mechanical. Move the intake air temperature sensor. It’s much better to put it further away from the engine head and limit the possibility of heat soak than try to compensate for it in the tune. Think about the fact that OEM never puts an IAT sensor in the intake manifold if it’s made from metal. You can often find IAT sensors before the throttle, for example. It’s also easier to compensate for the sensor being further away with the charge temperature correction.

Check also my answer below the picture, HKS ecu had a 3D map IAT vs LOAD, also Megasquirt tries to tackle the problem by letting you decide what do you want it to do with the fuel calculation and AIR Temperature…
Currently as is with no options i can only rely on Short term Fuel Trim from a wideband… Moving the Sensor around on a turbo system is not easy, especially when there is so many OEM setups. Nobody is going to start drilling holes and guessing a good placement ( was tuning a Ford Fiesta Mk5 Turbo this weekend and the engine bay was cooking everywhere).
PS: Also a 3D table for Ignition IAT vs Load would be nice.

Yes, I read that, and this is still not a very good solution. You just change when the issue will show up. Let’s say you have a low load and high IAT. How do you know it’s heat soak and not the actual working conditions? If you use that method, you are “fixing” the heat soak by introducing errors in different places that you don’t immediately see. That is a bad workaround, not a fix.

Anyway, you can do it now without any updates. Use custom fuel correction and set IAT and MAP as the axes.

There is no need to guess. Do you have a picture of the actual setup? From my experience, the heat soak is only an actual problem if you have the sensor mounted in a metal intake without heat isolation between the manifold and the head. Just move the sensor away to the first plastic/rubber/silicone part of the intake. Hot air in the engine bay is not an issue. The problem comes from direct heat conduction between the engine and the sensor body.

I have zeroed out the perfect gas law from the Megasquirt ECUs in multiple plug and play and non, and it solved all my weird IDLE AFR problems. Thats why im doing the request. I had also similar problem on an older link ECU if i remember correctly i couldnt zero out the IAT and after 3 minutes on idle it started leaning out. A good way to know if IAT is Messing up your AFR with any aftermarket ECU is just unplugging the IAT connector and let it sit to fault temp…
Its a reoccuring theme that i have always to make up for it. Since Ecumaster devs are so active it would be delightful to have something for remedy.

PS: My next request will be for AFR trim per gear. More gear ratio Load changes AFR. Had this for ages on stock MAF and MAP equiped cars with or without aftermarket ECU and with or without Turbo :slight_smile:

You can use function Idle and set custom fuel correction table for IAT when Idle is active, it works very good:-)


I dont disagree that you can find many ways to sorta “correct” the problem. But why not have the direct option to alter directly the heart of the problem, with that thinking i could put a carburator and not use EFI at all xD.
If there would be a lot of effort to change the ideal gas law, we could get 3D tables for Fuel vs IAT vs Load and add 3D Ignition Table as a bonus ( with the same axis descriptors)

The heart of the problem is not the calculation method, it is a mechanical issue. U are too focused on one of many possible workarounds.
I like the ecumaster products cause they try to make a smart software. Pushing them to implement options, which makes the ECU dumb is not a nice view in the future.

derUltraTT Since you threw me under the bus three times. Here you go:

  • You are ruining the post with your lack of experience and surplus of soap opera arguments…
    Do you want to see the calculation of heatsoak and fuel film build up from your previous 20 year old Motronic ME7.5 ? No you dont, because for you "its a mechanical ISSUE. 20 years later bosch made their ECU’s even more complicated ! Oh no they made their ECUs dumber… They were too focused according to you in wrong things…
  • I see you struggling with some ecumaster options, i think when you say Smart Software you literally mean dumb software for newbies, and when you say dumb software you mean you dont want expert options that confuse you personally.
    I dont want you to answer to my post i will ask from the moderator to delete your usless post which adds confusion and hinders competition and evolution against other brands. If you want progress start adressing any problems you find, the guys at ECUMASTER love to troubleshoot and become better and thats what i like about them.

EDIT: [quote=“derUltraTT, post:9, topic:1618”]
Pushing them to implement options, which makes the ECU dumb is not a nice view in the future.

I guess the ECU moves forward and smarter not Dumber, by taking up valuable time and space for pops and Bangs for the V3 firmware :rofl:

No need to take it personal…cool down man.
U should accept that ur suggestion is not good and as already said, not a solution. U request a workaround for a problem, where already workarounds are possible with the current SW. U are focused on one (bad) way…thats what i wanted to underline with my post.
Open ur mind…use the informations u got here and go on.

Stop being condescending, and start being technical you dont know what you are talking about… You are a hobbyist as you declare and you havent used 10-15 other brand name ecus on 200+ cars like other people have. Having fake confidence like you are displaying, with low skills, is called narcisism btw… You added nothing to the conversation. *Search on the web for a bosch function graph and start reading… You have been to nefmoto website but you opted out for an aftermarket ecu

I am working as an application engineer for a vehicle OEM.
And as a hobby i also do SW/EE/engine stuff on my and my friends cars.
So in terms of vehicle application i am professional…so stop make guesses on me since u don’t know me. Who i am and who u are doesn’t change the facts of this topic. Stop pull this on a personal level.
I started on my engines with the OEM SW and then switched to ECUmaster a few years ago. I ran into ur problem very early and first workarounded it via SW and then moved the IATsensor away from the engine, which solved it.
So i am a few steps ahead of u.
I know the ME7.5 SW and also the complex model for combustion chamber temperature calculation. It is embarrasing that u compare ur suggestion with that.
Back to the technical facts:

  • removing IAT from the fuel calculation model reduces the precision of it in any other condition than in ur problem case. E.g. in summer and winter ur fueling will behave different.
  • ur suggestion doesn’t solve the problem…since u are just removing a faulty variable in one situation and make it more neutra. But the situation is still faulty.

Better use one one of the following methods:

  • iat fueling correction in idle with custom fuel correction
  • move the IAT sensor to a more neutral place
  • Use alpha/n strat (=similar to ur suggestion)
  • get emu pro and use MAF sensor

So you say
Better use one one of the following methods:

  • iat fueling correction in idle with custom fuel correction

so you are basically saying i should counteract the implemented gas law by doing a custom IAT table to reverse the effects of the Ideal Gas calculation. Sounds counterintuitive… And something a bureaucrat would do as an excuse for the extra work he has to do…

  • move the IAT sensor to a more neutral place

more modification more time spent thats not possible in a tuning enviroment with time restrictions. Im considering that in my own car. I already have wiring guys call me and fighting over with the mechanic of why this X guy wants to move the IAT sensor outside the Manifold (just 2 days ago for a ford sierra cosworth)

  • Use alpha/n strat (=similar to ur suggestion)

I Usually work on turbo cars. Im not even sure if that will get rid of the IAT calculation out of the equation

  • get emu pro and use MAF sensor

Aftermarket guys try to run away from Maf sensors im not paying 1.5k for pro to use a maf sensor. Plus youngsters already avoiding complexity and extra expenses rightfuly so. 800euros for an EMU classic is already pulling their leg and heading to speeduino (which “fun fact” tunerstudio has a table to adjust gas law lol since the 2000’s when they saw it was needed to have one)

Let me suggest this. Just have a button that disables Intake Air temperature from the Fuel Calculation model, and let me adjust the IAT fuel from a 3D fuel table like EMU blacks CLT table.

PS: Fun Fact, ignition angle has IDLE IGNITION compensation vs CLT table already. Older ECUs had exclusive IDLE fuel tables.

PS: Fun Fact 2, i could unplug the IAT sensor or make calibrate it falsely since its one of the most useless sensors on the car except for judging the IC efficiency and amount of heat soak. Much like EGT sensor relativistic properties :sweat_smile:

Let me address something first.
You will not win an argument by trying to discredit someone.

We will also not add a feature just because you used it in other ECUs. That argument has zero value, especially when the examples you give are either low-budget or old ECUs.

I read everything here, and you didn’t convince me this is a good idea. But let me go over everything in detail.

You completely ignored what I wrote. Your argument is that you disabled IAT density correction and idle AFR is ok. You can even disconnect the sensor, and it works better. So why even use the IAT sensor?
Your plan is to disable the air density correction and then make a custom correction, which you will do your own way. So why not use the density correction and make a custom correction to change only the idle instead of making a general IAT correction for all conditions?

I’m sorry, but that description doesn’t make sense. What do you mean by “AFR trim”? Do you want to adjust the lambda target based on gear? How does that help with the “More gear ratio Load changes AFR”?

It also doesn’t make sense from a general point of view. Let’s assume a vehicle traveling at a constant speed (constant rpm, constant load) with the throttle at 50%. If we make an upshift, the working point of the engine will change. To keep a constant RPM, you have to drive at a higher speed, which means more throttle opening, which equals more load. To keep a constant load, you have to slow down, which means you are at different RPM.

If the engine is at the same RPM and load but different gear, the engine is breathing exactly the same. If you think I am wrong, show me the data with the proof.

This is not the heart of the problem. I explained to you how you are wrong, but you ignored it.

You missed the whole point. Do the correction based on IAT only in IDLE. You can do that in Black right now, and it’s much easier to tune than disabling the correction globally and making it by hand.

You want to correct an incorrectly built engine with software workarounds. That’s your decision, and you can do it currently with the EMU without any updates. We won’t be adding more confusing options just because you want to do something exactly the same way as in other ECUs. There are multiple ways to achieve what you want. We don’t need another one.

Lets do a reality check, i’m not the one that said that my car is broken and i dont know what the hell im doing because im too focused trying to make dumb ecus xD.
On the contrary mr derUltraTT that joined just a month ago, says on his profile hes a hobby car tuner that just tuned one of his own cars and wants to tune his second car when the DI system is available… But hes highly condenscening disrespectful and narcisistic, if you missed that then your reality is skewed because you agree that there is nothing to be changed everything is fine, and it happens to be also his opinion.

Its the same concept why turbocars spool later in 2nd gear and sooner in 4th gear. Its the same concept why knocking starts to occur sooner in 4th Gear than 2nd…
Higher Gears show richer AFR with the same ms of injection for the same MAP load and RPM. AFR just shows oxygen content, higher reistance to engine makes combustion finish sooner before exhaust stroke.
Im suprised you havent noticed it, its easily noticeable even on N/A cars with AlphaN or speed density… But i dont care about that gear trim really everyone can work around it pretty easy. I just wanted to fish in the waters to see how knowledgable people are in general here.
Im suprised you didnt even thought of ignition trim per gear. As a tuner i have to choose between knocking in 4th or going slow in 1st 2nd and 3rd. i used a custom virtual input via Gear for a drag car for its final forth gear because of that as well… I guess you didnt know that as well ?

I read you pretty clearly, but you contradicted yourself. And you contradicted again with this statement.

  • You said my suggestion is gonna fix the heat soak issue but its not gonna know when heat soak is finished.
  • i asked for a 3D table for IAT vs Load like we have in CLT for black, and you propsed me to use the custom correction table to fix the issue.
  • So you completely agree with me but you want to do it with already available model…
  • You explained how i was right. not how i was wrong xD you just want it without changing anything :sweat_smile:
    PS: But you told me how all OEM cars with IAT on intake manifold are wrong and we have to change that

Megasquirt 3 is more expensive than black, all other ecus were more expensive than black except speeduino at the time as well they were just older. Ecumaster is almost approaching the 10year mark and it was the most affordable advanced with good internal map sensor and an option for bluetooth instead for screen and great support thats why it was prefered dont forget that.

  • Something that works in older ecus doesnt mean we have to abolish it.
  • Have you seen the S40 DTAs 20year old osciloscope for the crank sensor ? I dont see that detail in ECumaster. Also many tables in DTA are larger than ecumaster classic e.x. ASE. Megasquirt 3 also has other areas that are better than ecumaster.
  • the final goal is how to make a product that takes the best and implements it, not do as little as they can ry to sell it to their own followers like they are the only all-knowing prophets of ecus better thant the others…

Have you tried without it ? Some bmw with plug and play or Nissans dont have it because they used MAF with IAT that was discarded and i get no weird behaviours.
Im suprised you dont even know that many ECUmaster plug and play products sometimes dont have an IAT sensor. Really ? :rofl: Or do you think the guy from Manchester that just bought a plug and play wiil start drilling and welding bungs for IATs ? Theay barely know why their car wont start :rofl:

So All oem manufacturers that installed an IAT sensor on manifold are wrong … Ok whatever you say… You sound like the derUltraTT hobby guy above while you both agree that there is a heatsoak issue and IATs on idle… Again you contradicting yourself, OEMs dont know what they are doing ? And why you and the other dude accepted that there is a heat soak issue then ?
The job of an ECU company is not to blame the car. Especially when almost all OEMs are putting IAT on intake. On My Facebook post about the vbat oscillation are blaming the cars again… While they are showing logs of the same oscillation. Blaming the car is easy…

  • I would like to remind you is that the cost of an ECU is how complete and versatile is the software. The ECU hardware is not costing that much thats why an ecu BOM is 200$ to make and is sold for 900$. Its all about the effort put in the SW. Why do you think everyone started making ECU products like crazy nowdays and sell them from 300-600 range ?Starters have profits as well since chinese PCB manufacturing and Case CNC has dropped the prices. THey just have to copy or find some cracked firmware for their product and have the knowledge for some adjustments. Starting to becoma lazy after a while and overcharging the customer becomes a thing

So not even implementing a 3D IAT vs Load like we have for CLT ? I dont think anyone wants to consume their custom table for that function.

So to Summarize:

  • We all three agree that heatsoak indeed affects AFR because of the Ideal Gas Law correction implementing invisibly the Intake AIr temperature Value in the equation.
  • We all three agree that -IAT-Intake Air Temperature in most OEM locations is not working good for a simple ideal Gas law calculation like most aftermarket ECUs have
  • We all agree that you can mostly correct it, with “the use function Idle and set custom fuel correction table for IAT when Idle is active”

What we disagree Upon:

  • That ECUMASTER doesnt have to do anything else on this matter (because up until this point no one has mention it nobody cares or no one knew why their AFR suddenly goes 16.0:1 when in traffic and you get 5% Short term correction,if your setup has a wideband, while engine starts sputtering)
  • That “OEM IAT location is an incorrectly built engine with software workarounds” or “The heart of the problem is not the calculation method, it is a mechanical issue”
  • I disagree that i have to use the custom table for fixing a problem that should already have a 3D table for an IAT vs LOAD correction. Since the 2D IAT correction at this moment is useless

Highly disrespectful? Show me this disrepect, because I don’t see it. Your responses are more disrespectful in my opinion.

One of the examples where you went personal without any useful argument.

Turbo spooling speed at different gears has nothing to do with engine air flow. Turbo needs not only energy but also time to spool because of inertia. If you make a run in second gear, the RPM will rise faster than in fourth gear. With the second gear, the turbo will achieve the target at a higher RPM compared to the fourth gear. But if you look at the spool speed as actual time in seconds, you will see it’s almost identical. Spending more time at lower RPMs means you will spool the turbo at an overall lower RPM.

No, AFR doesn’t just show oxygen content. If that were the case, you wouldn’t be able to measure rich mixtures. At stoichiometry, there is zero oxygen left, exactly the same as for any rich mixture. You just proved you are talking with confidence about things you don’t fully understand.

The only thing that gears are changing is the acceleration rate. At low gear, you might go so fast through the rev range that it starts introducing transient effects. If you drive at the same RPM, at two different gears, you have basically the same piston speed. So why would anything behave differently?

That’s not what I said. I used the word “fixed” in quotes. I also said that you are fixing one problem but introducing others. You don’t remove the problem. You just move it to a different operating point.

Since you don’t want to fix the problem properly, I proposed the custom correction because it allows you to achieve what you want. It won’t really fix the problem, but I guess if the error is not at idle, all is good for you.

No. I didn’t agree with you.
I recommend reading things multiple times and really thinking about them.

We prefer to look at modern solutions from brands like Motec, Emtron, Haltech, and Bosch. The fact that you think the solution “works” doesn’t mean it’s a good solution.

I am not sure you understand that EMU Classic and Black are currently very limited by the hardware they use. We can’t just add as many options and tables as we want. That’s why we have to put big consideration if we will add something or not.

That’s my whole point. You say the IAT is needed, but then you want to disable it and make your own corrections that work ok at idle, but don’t work correctly in other situations. That is not a fix.

I never said that putting IAT in the intake manifold is always wrong. Can you stop putting words in my mouth?

Let’s discuss real-life examples. Show me a picture of this full OEM setup suffering from IAT heat soak. I am very interested.

We can’t blame the car? What about a situation where someone writes to me that our strategy is not working correctly and needs some changes, but in the end, it’s the car that is broken? You obviously have no idea how many times people have written stuff like that.

We won’t be blindly following every customer’s request.

I don’t agree with that. Most OEM setups use MAF sensors, and they don’t use IAT for air mass calculation. IAT in those setups is only for safety corrections (additional fuel for cooling or ignition retard). Most of the OEM setups that use IAT for air density have the IAT before the throttle or in the PLASTIC intake manifold, which doesn’t conduct heat into the sensor body.

I would be very interested in seeing an example of an OEM setup that doesn’t follow these rules.

Do you really think you are the first one with EMU who tried to solve this problem? Most people just move the IAT if they have that issue.

I am done discussing this topic in theory.
If you want to talk more, I want to look at data and pictures.
Real-world examples.

Already answered this go read what hes saying on his first post without adding nothing technical to the argument (although he says he is working on OEM Car software) he just uses personal attack about me “being focused” "doing workarounds and me making ecus dumber.

  • But me fighting back somehow makes me the bad guy WHILE i write my sweat and tears on this topic, he chills with 4liners…because his higher intelligence is bored explaining something rather than throwing accusations left and right… Ok then, but i pusehd him and that made it work didnt it ? Everyone needs a little push

Yes we do agree, describing the setup of the newer plastic+MAF OEM cars doesnt help your argument because i said quote: Intake Air Temperature in most OEM locations is not working good FOR a simple ideal Gas law calculations like most AFTERMARKET ECUs do.

Are we talking about installing an aftermarket ECU or are we gonna describe OEM lab grade installations ? Should i start casting plastic manifolds for my poor old Nissans Fiats and Fords ? Or should i start disasembling the car and start drilling holes for IAT placement because a software workaround is obsurd ? I bet you havent used an ECU with a 3D iat vs load, you just want to stick with what you have ?

EDIT : MAF sensors DO have IAT measurement compensation within the sensor. From the book “Gasoline Engine Management” By Bosch page 250

Certainly im the first to talk about it and argue about it for sure… Im sure many have find out but have their lips wide shut to have the edge? Can you comment about the VBAT oscillation as well in my other topic ? Whats your opinion on that ?

Fair enough, can we talk about it instead declaring something dumb or having “Mechanical issues”

Fair enough although the ATxmega192A3U black uses is nice with plenty of flash space. Maybe you could opt for a 256A3U so we can have bigger tables as well ?
Motronic 7’s from 2001 have lower speed and they have about 1000-1500maps and many more functions and diagnostics routines. Speaking of which, surely pops and bangs was a useful priority for implementation on the limited power of EMU black for V3 firmware, althought they could use the ALS function ?

  • derUltraTT Now thats what i call moving forward into making a smarter ECU and not dumber :rofl: :rofl:

Thats why im asking the ability for options so i can experiment with an “as is” mechanical setup with my clients. Some dudes on ecumaster facebook are tuning cars that are 10.000km away, how he can improve e.x. an IAT placement ?

You and the other dude were so sure that my issue is a mechanical issue, you didnt ask anything specific, yet you put everything in one basket because it was convenient to finish the argument. And now after the rushed first answer about mechanical issues you say i put words into your mouth ? You have better explained yourself then

Fair enough. Every one into the tuning world doesnt appreciate when he gets the silent treatment or treated like a low life dumb ignorant person. You gonna get kick back, explain, describe, inform. Dont you think we arent doing a great job for the past 6 years without a proper manual ? :rofl: Imagine if there was no internet or facebook for us poor lads helping each other out…

example e30 M42B18. Runs great even without having a maybe future 3D IAT table, this one needed quite the IAT correction, but he has a phone app so i couldnt screw around with his IAT value…
Sensor is plastic, element hanging mid-air. Before throttle body as per your commands. Metal pipes because…Boost.

There is a solution to this, that doesn’t need any new strategy added. Install an ambient temperature sensor, then use a fueling custom correction table, and set the ambient temperature at the X axxis, iat as Y axxis, then apply the necessary correction at the corresponding cell. You are essentially applying a correction based on the delta between ambient and iat. You know that when the delta gets very high, there is heatsoak. Further more, you can activate the table from a parametric or virtual output, if you only want it to act around the idle area.


Thanks Nick ! I was just suggesting that instead of wasting the custom table we’d use the current implementing an IAT table with 3D load axis like CLT already has… (Or maybe show up any used internal table for the gas correction they have (?)
But i guess there is not much juice for the ecu to handle some extra stuff.

The thing is from my experience real life air mass is not following the model. In General Gas model equations adding IAT has screwed my AFRs more than it helped them (yes even under load :rofl:) Its a mystery for me as well but thats what i have noticed in different engine ecu car combinations