a91what

SendMeUrDataLog
Mod Dude
Apr 6, 2011
10,751
6,964
214
Hillsborough county
This is where I will be posting tech articles. I will try to be as detailed as possible with these writeups so that you can understand the what and how of MegaSquirt/Tuner Studio. I hope to do one writeup a week detailing a specific area of the software and I will include some hardware writeup as well if needed or asked.
I would like to keep this thread clutter free so if you have questions please post them in the help thread.
https://www.stangnet.com/mustang-fo...tudio-help-thread.888730/page-38#post-9071638
 
Last edited:
  • Like
Reactions: 1 user
  • Sponsors (?)


MAT/CLT CORRECTION Battling the Dreaded Heat Soak

This information pertains to the issue that many users often refer to as "HEAT SOAK". However this has nothing to do with the sensor itself and everything to do with the environment that it is placed in. No matter where you place the IAT/MAT sensor it will skew the reading, this is because at low load/rpm the air in the manifold can easily achieve the same temperature as the CLT[coolant/ engine temp].

Why This is Important
The air density correction table uses the MAT/IAT temp sensor for the fuel trim correction. Basically the hotter the air the less oxygen it has in it and vice versa, this trim table will adjust for fuel based on the air temperature. Where this comes into play is when you have a car at idle or cruise, without the MAT/CLT correction your MAT density correction will be skewed. Some of you who do not use ego correction at idle will notice a lean or rich condition even though the ve table has not changed. Taking some time to get this worked out will pay off in the long run.


The Table that needs adjustment
Under the Basic/Load Settings Tab you will find a trim table called MAT/CLT Correction, once in this tab you will need to click on the settings box in the upper left corner of the table [it is denoted with 3 small dots in the box] it is located next to the notes bubble. Once you have that open autoscale the Y and X values this makes the table much easier to look at.
Once you are done take a look at the graph, it will look like a flat line with no Y axis values. This is where you will start to plug values in, at low load/rpm values you will want more blending with the table quickly leveling out to 0 at high load/rpm values... I would start with a maximum of 80% or so and go from there, here is a picture of the table i will be using.

matclt3capture.png

This is a nonlinear blend curve for the MAT/IAT correction...

**UPDATE** I have moved to a method that flattens the end of the MAT correction curve while its not the "right way" it does work well if you cant get the car to be repeatable otherwise. **

I have attached a copy of the Dialog settings for this table simply download the file and save it in your tunerstudio folder, once you have the MAT/CLT correction table open select File and load the dialog settings i have supplied.

I hope that this has been informative for a detailed explanation of other settings or tables please ask.

Steve
 

Attachments

  • matclt_curve_2017-09-05_11.28.50.msqpart
    1.5 KB · Views: 701
Last edited:
  • Like
Reactions: 1 user
INJECTOR DEAD TIME

Under Fuel settings the injector dead time is often an overlooked setting. Most of us don't even know where to get the settings from or how to begin looking for this information. While the car will run without adjusting these settings it will affect the tune. If you notice increasing ve table numbers below the idle range or at low MAP levels it is likely that your DEAD TIME settings are incorrect.

Things to know
changing the dead time after the car has been tuned will affect the entire fuel table be warned some slight tuning and tweaking is ahead of you. nothing that VE analyzer cant handle.

The Info
Courtesy of injector-rehab.com they do not want there table copied so here is a link.

http://injector-rehab.com/shop/lag.html

This is Courtesy of EFIdynotuning.com
This is the preferred table it has the most common Ford and GM injectors

http://www.efidynotuning.com/injdata.htm

Example- Using the Dead time Chart
93-95 Cobra 24LB injectors Blue(Stock)
then hit load.....
capture-png-injector-dead-time-png.592726.png

In TunerStudio only 2 parameters matter, Deadtime and voltage correction. Dead time is based off of 13.2v so a bit of math is involved.......
13v-.59
14v-.50

.59-.50=.09 .09/10=.009 .009*2=.018 .59-.018=.572

So at 13.2v we have a dead time of .572

For the correction voltage it is ms/v so to do this we will take a mean correction from 12-14v

.81-.59=.22 .59-.50=.09 .22+.09=.31 .31/2=.155

This method of correction is not perfect of course because older style injectors are not as linear as the newer ones are. so the mean method will give you the lowest error. If you do not have heavy electrical loads you may be able to get away with using only positivecorrection numbers for the voltage correction.
In this instance i would go with a correction of .100


Example 2- adjusting the ve table
For this portion we will need a datalog with the uncorrected Dead time. We will chart out a few parameters in the log.
Rpm
Pw1
Pw2
Map

Let's assume in the log file at 800rpm we have a pw of 2.5 at idle with the Dead time set at 1ms. We are correcting the Dead time for the injectors used in the example above, .572ms there will of course be some math involved.

Uncorrected Dead time pw
Deadtime- 1ms
Idle Pw-2.5ms
High rpm pw(assumed)- 16ms


Corrected Dead time pw
Deadtime- .572ms
Idle pw-2.028ms
High rpm pw- 15.572

Idle pw correction- 2.5/2.028= 1.23

High rpm pw correction- 16/15.572= 1.027

Here is how this breaks down, after doing the math in the example above we can see lowering the Dead time lowers the pw(pulse width) on the injectors. This will lean the fuel out because we just cut the amount of time the injectors are open down so we need to richen the ve table to compensate. In the idle region of the table the pw change caused the fuel to be 23% lean the math shows we need to increase this area by multiplying by 1.23
The same goes for The high rpm range which was affected much less due to higher pw numbers, the correction here was only 2.7%. We will multiply the high rpm range by 1.027 then blend the idle and high rpm 've map together for a smooth table.


This information is courtesy of @Blown88GT and seijirou thank you for your effort in putting this together

No Math needed if you use the manufacturer's data from Ford's website & the Google spreadsheet that he developed (with my input). Good for MS2 & MS3.
EFIDynoTuning doesn't do any calculations. He's only inputted the Ford data. The smaller injectors he lists at 55psi were never tested at that pressure.

Scroll down for Calibration Summaries.
https://performanceparts.ford.com/part/M-9593-LU47

This is the Google spreadsheet that calculates dead time & battery correction voltage.


View: https://docs.google.com/spreadsheets/d/10c8Iy5SUUmVkLgrrrDhnDFFpDzghk93XajWRFWStqG4/edit#gid=302838282
 
Last edited:
  • Like
Reactions: 1 users
TinyIOx can-bus expansion board

First you need a few files from this site.
http://forum.jbperf.com/viewtopic.php?f=2&t=1282#p8356
The full detailed instructions on how to use the port scanner are within. I will say this little program makes it very easy to update firmware and you can also change the CAN ID on any device that the port scanner can see. All your CAN devices will show up in the port scanner. BTW you have to have TS closed for this to work.
Step 1: use the link and follow the instructions, the newest firmware version is v2.0
Step 2: now that the TinyIOx has its firmware installed and the CAN ID set [i used ID #4 default] we can move on to setting things up in Tuner studio. First we have to go in to our project properties and setup the TinyIOx make sure to give it a name you can easily identify it by I used TinyIO
?hash=4e0c8e2c52603662336071fb52b7e8af.png
Can device settings.PNG
You have to add the device to the list under [CAN Devices] it will automatically find a device you have connected, then name the device. Under Device Configuration File you need to hit the box with the three little dots, then select the same .ini file you used when burning the firmware they are in the same folder.
Step 3: Now we are connected you will see a box under the header bar that will allow you to switch between the MS and the TinyIOx but first we need to set the CAN parameters.
?hash=4e0c8e2c52603662336071fb52b7e8af.png
Can Parameters.PNG
These settings are important I will be using generic output IO and a few ADC inputs The CAN ID needs to match your TinyIOx the tables are all found in "7" and the offsets will vary depending on the io type. in this photo i do not have the ADC enabled but the ADC offset needs to be 76.
To use the outputs as a PWM we need to change some of the settings, on the right we can see where it says ":Remote port type" then there are 3 ports each port can be configured differently. When set to [Digital (8 signals)] that one port can support up to 8 digital switches, so you can fire 8 outputs from one port. I plan to use the boost control circuit as a PWM control for my water methonal system using a nitrous solenoid, here is how i would set that up. First i have to set Port 2 to single value [one signal] then go into the boost control settings and use port 2.
Port 2 settings.PNG
 

Attachments

  • Project properties.PNG
    Project properties.PNG
    944.7 KB · Views: 547
  • Can options.PNG
    Can options.PNG
    911.9 KB · Views: 383
Last edited:
using tinyiox outputs for pwm control.PNG

Now we have used an output over canbus to drive the pwm boost control circuit. These extra ports can be used to drive alot of functions, idle valve ect.
The Tinyiox even has a I2C bus for plugging in a LC1 directly.... thats right no need to wire the wideband in you just plug in the jack.

Now before we get to far ahead of ourselves we can't program any outputs to do anything until we assign the ports to actual cpu pins.
configuing ports for generic IO.PNG

Take notice that in the upper left hand of these two photos there are two seperate devices that are shown, in the top photo i have the MS selected and it is identified as Frankenstang, the lower photo the deivice is the TinyIOx.
This is where we will assign the cpu pins, the channels can still be programmed in the MS but without pins assigned to the channels they will do nothing.

I am still playing around with it and i only touched the surface of what you are able to do with this. it can even drive led displays with values of any sensor you have connected to any device. pretty cool.
 

Attachments

  • Can options.PNG
    Can options.PNG
    911.9 KB · Views: 387
Microsquirt PNP extra options

After doing some research for another member I realized that the Microsquirt PNP with the sealed case is not using all of its potential. There are 2 extra ADC inputs that EFI source has not populated for use.
PIN 5 and 29 are both unused with most installations. Usually pin 5 is connected to use as a second narrowband O2 input, this is pointless in most installs. Pin 29 was left un-populated [it has no wire in it]

Both of these inputs can be used as sensor inputs from a common 0-5v transducer [usually a 3 wire sensor] for pressure or can be used as an input for a MAF sensor. If you are willing to build some small circuits in heat shrink even a rheostat or potentiometer can be used as an input. [ think fuel level ]

Here is a very basic circuit you could use to get a fuel level input into the microsquirt..
630908

for this input you will only need a single 1/2W resistor to make it happen. The wiring for the fuel level sender can be brought into the factory ECU connector by jumping the pins as described in the picture, this will bring the fuel sender input to pin #17 on the stock harness. After that step its as simple as making a few splices! then creating a custom input.

I will update shortly with instructions on how to create the input, essentially this circuit above is just a simple voltage divider.
 
MAT/CLT CORRECTION Battling the Dreaded Heat Soak

This information pertains to the issue that many MegaSquirt users often refer to as "HEAT SOAK". However this has nothing to do with the sensor itself and everything to do with the environment that it is placed in. Many myths surround the "heat soak" that we all experience. One such myth is that the sensor made from X material is susceptible to the heating effect from its base material, this is a bogus claim. No matter where you place the IAT/MAT sensor it will skew the reading, this is because at low load/rpm the air in the manifold can easily achieve the same temperature as the CLT[coolant/ engine temp]. This is true regardless of what the manifold is constructed of......

Why This is Important
The air density correction table uses the MAT/IAT temp sensor for the fuel trim correction. Basically the hotter the air the less oxygen it has in it and vice versa, this trim table will adjust for fuel based on the air temperature. Where this comes into play is when you have a car at idle or cruise, without the MAT/CLT correction your MAT density correction will be skewed. Some of you who do not use ego correction at idle [I don't either and don't suggest it] will notice a lean or rich condition even though the ve table has not changed. This can and will throw off the VE auto tune as well. Taking some time to get this worked out will pay off in the long run.


The Table that needs adjustment
Under the Basic/Load Settings Tab you will find a trim table called MAT/CLT Correction, once in this tab you will need to click on the settings box in the upper left corner of the table [it is denoted with 3 small dots in the box] it is located next to the notes bubble. Once you have that open autoscale the Y and X values this makes the table much easier to look at.
Once you are done take a look at the graph, it will look like a flat line with no Y axis values. This is where you will start to plug values in, at low load/rpm values you will want more blending with the table quickly leveling out to 0 at high load/rpm values... I would start with a maximum of 80% or so and go from there, here is a picture of the table i will be using.
matclt3capture.png

This is a nonlinear blend curve for the MAT/IAT correction...


I have attached a copy of the Dialog settings for this table simply download the file and save it in your tunerstudio folder, once you have the MAT/CLT correction table open select File and load the dialog settings i have supplied.

I hope that this has been informative for a detailed explanation of other settings or tables please ask.

Steve

Doesnt the MLT/CLT Correction table and MAT air density table do the same thing , roughly?
 
First lets take a look at what I mentioned as "almost hitting targets"
what I look at is the difference between the AFR and the AFR target..
1625670301150.png

Above I have loaded your tune file and your log file into MLVHD, this program is not free but I use it for everything. The Z axis is the recorded AFR and the Z axis delta is the AFR target.. by subtracting the target from the AFR you can see the difference between the two values.
Lets take 95KPA and 4400RPM the value in the cell is 0.53 this means that the AFR is 0.53 points leaner than target. This allows use to quickly glance at the cells and see how far off the tune is, looking at raw cell data like this can be beneficial but its even better if we know how much we need to alter that VE value to achieve target...
1625670598794.png

Now this is not a stock field, I created this under "calculated fields"> custom field> Field = [AFR]/[AFR 1 Target]
this is a simple field that gives us a basic value that we can use to see how much each cell needs to be altered. The same cell we were looking at above needs to be multiplied by 1.04 ( increase of 4%) to reach its AFR target. This field allows us to see how far off the tune is as a percentage and in my opinion is more useful than a raw value.

Lets look at idle for a moment, I noticed that the idle sometimes oscillates before CL idle kicks in lets find out why.
1625671490094.png
I grabbed a snip from a point in the log file where the idle is relatively stable, take a moment and look at the fields I have on the 3 graphs. In general idle is controlled by the idle valve and timing.. the idle valve can be considered rpm over time and the amount of timing is immediate change to the idle speed.
Notice how the idle pwm value is very close to the needed value as it returns to idle, then you have an rpm dip and the idle pwm value has to increase to maintain the idle speed... this tells me that the initial values table in the idle settings needs to be increased for this RPM by 3-5% so that the idle comes in just above target and then ramps down to the target idle speed. Notice how much timing the idle advance value has to add to keep the idle from dropping below target speed.
Lets look at a point where the idle is upset.
1625671822185.png
Notice how the pwm valve has to open and it adds timing to stop it from dropping below target then the idle swing begins.. this snip shows how the settings are fighting each other to attempt to maintain idle speed. notice how the timing advance [yellow line bottom graph] drops off hard as it enters idle, this is normal when using the idle advance feature but the idle PWM value is not higher to compensate for the abrupt drop.

With these things in mind give the software some attention and focus on these parts. Im out of time today.