Megasquirt/tuner Studio Tech Thread

a91what

SendMeUrDataLog
Mod Dude
Apr 6, 2011
7,682
4,397
204
30
Hillsborough county
#1
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:
  • Sponsors (?)

a91what

SendMeUrDataLog
Mod Dude
Apr 6, 2011
7,682
4,397
204
30
Hillsborough county
#2
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
 

Attachments

Last edited:

a91what

SendMeUrDataLog
Mod Dude
Apr 6, 2011
7,682
4,397
204
30
Hillsborough county
#3
For all those using a MSPNP2

The wot relay for the a.c. control coming from the ecu is pulled to ground causing the a.c. to not function.
This has been fixed in the new v1.2 mspnp2 board.

HOW TO FIX IT.

Permanent fix is to use an output for the relay, ALED or WLED are both good candidates for this. Disconnect the factory wiring from either the relay(pin85) or the ecu plug(pin54). Then wire it to the output of your choice, I would use tps% of 85% as the trigger point with a 10% hysteresis. These outputs are found on your expansion plug refer to the mspnp2 manual for plug number.

Temporary fix (leaving it this way can damage the a.c. system if run at wot for extended periods of time)/disclaimer.

Simply removing the wiring from pin 85 of the wot relay or pin 54 of the ecu will make the a.c. function, this however disables the wot relay.


I hope this info helps those of you who are dealing with this issue now.
@AUBURN1111 @FoxMustangLvr (not sure if issue with stinger pimp) @90sickfox (can't remember if you built yours)
Tag anyone I may have missed for this if you would.
 

a91what

SendMeUrDataLog
Mod Dude
Apr 6, 2011
7,682
4,397
204
30
Hillsborough county
#4
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:

Blown88GT

Founding Member
Nov 13, 1999
1,213
154
104
Palm Beach Gardens, FL
#6
Better study this, too. Be aware he's a Quarterhorse/EEC guy, not a Megasquirt guy. Really knows all the Ford EEC's.
http://www.efidynotuning.com/maf101.htm
You will need the data from someone who has actually flowed the meter (housing) on a flow bench.
His transfer curves don't appear to do this. They are directed more towards modifying the factory Ford EEC's.

Every manufacturer of meter housings supplied the flow curves.
Abaco went out of business, didn't last very long.
PMAS is current, but you can get the data directly from them.
BTW, I have all the C&L's; found them on the Internet a couple years ago.
When I was talking to C&L, never thought to ask him for them, since didn't need them at the time.
He sold the business to MAC & retired soon after.
I will attach them here. All Excel files with well labeled file names.
Calibration tube color doesn't need to match the injector size if using Megasquirt.
Use the curve for the color tube you have.
 

Attachments

a91what

SendMeUrDataLog
Mod Dude
Apr 6, 2011
7,682
4,397
204
30
Hillsborough county
#7
Better study this, too. Be aware he's a Quarterhorse/EEC guy, not a Megasquirt guy. Really knows all the Ford EEC's.
http://www.efidynotuning.com/maf101.htm
You will need the data from someone who has actually flowed the meter (housing) on a flow bench.
His transfer curves don't appear to do this. They are directed more towards modifying the factory Ford EEC's.

Every manufacturer of meter housings supplied the flow curves.
Abaco went out of business, didn't last very long.
PMAS is current, but you can get the data directly from them.
BTW, I have all the C&L's; found them on the Internet a couple years ago.
When I was talking to C&L, never thought to ask him for them, since didn't need them at the time.
He sold the business to MAC & retired soon after.
I will attach them here. All Excel files with well labeled file names.
Calibration tube color doesn't need to match the injector size if using Megasquirt.
Use the curve for the color tube you have.
Thank you I appreciate the link and transfer curve file. FYI I will be deleting this post once I do my write article, it may be fairly vague so if I need some assistance with the subject matter I may hit you up for a review/edit.

I am trying to keep this thread conversation free so please don't be offended if I delete your posts in here.:D
 

a91what

SendMeUrDataLog
Mod Dude
Apr 6, 2011
7,682
4,397
204
30
Hillsborough county
#9
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

Last edited:

a91what

SendMeUrDataLog
Mod Dude
Apr 6, 2011
7,682
4,397
204
30
Hillsborough county
#10
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