When you tune your car what your actually changing. An inside look. - Ford Mustang Forum
Reply
 
LinkBack Thread Tools
post #1 of 26 (permalink) Old 05-02-2014 Thread Starter
Apprentice
 
ZeroAviation's Avatar
 
Joined: Mar 2013
Location: Olathe
Posts: 211
           
When you tune your car what your actually changing. An inside look.

When you load a tune on your car, what exactly are you changing?
This is another popular question i'll try to answer But first I want to go into some of the Major parts of the PCM. This post will stay high level on just what a tune changes. I'm going to write about how the PCM thinks next week

Most all Electronic Engine Control units have 3 BIG parts where all the computation happens.
1. MCU (Microcontroller) - Some people may call this the processor, or Similar.

2. RAM (Memory or Random Access Memory) - This is volatile memory where the application is loaded and executed. (This is a whole post in its own.)

3. FLASH (Persistent storage) - This is non-volatile memory, and where everything is stored. Such as, The bootloader (1 and 2), the O/S (In the case of Copperhead its a RTOS), codes, Engineer console, and most important the calibration (or parts called the "tune").

When a EEC is first powered on, there is some initialization that happens in the processor (such as clocks), then the bootloader is loaded into RAM. The bootloader then calls on the main() for the RTOS. Once the o/s is initialized, the calibration is loaded into memory and computation starts. (This can vary, and is not concrete)

So lets talk specifically about the Tune itself.

When you plug a tuner into your car and start the tuning process it does the following things. (Specific to the PCM, it does other things as well that will be covered in another post).
1. Identifies the PCM - This way the tuner knows what PCM unlocking algorithm, security hash, and memory sections.

2. Unlocks the PCM - Since about 1996, the EEC has to be unlocked to prevent un-auhtorized access by rouge modules. Unfortunately, over the years, this has been quiet easy for folks to reverse engineer.

3. Downloads the stock tune - It starts a session with the PCM asking either to download the entire calibration (rarely used) or queries sections of memory to download. In the case of a SCT, most (meaning 90%) of the time its downloading certains sections, not always in concurrency. This will make more sense soon why you would only download sections and not all of it.

4. Uploads the modified tune - Now here is where the modified tune starts to be uploaded to your PCM. The device may choose whether to upload all of the tune, or again only certain sections. (Sections that have been modified).

5. The PCM/TCM is reset

All tunes start from the Factory Calibration.

Which is a image of the calibration portion of flash memory. Typically this is handled as a HEX type, but sometimes Intel bin is used. Personally, I prefer to deal with hex, as they contain a better mapping as well.

So for this example i'm going to use a make believe portion of memory here to adjust High Speed Fan on ECT. In this example I'm going to use a PCM with a tear tag of CDC2.

Each part of the calibration has a address. So each setting and change is stored at an address (much like your home address). So lets say in this example that High Speed Fan on ECT is located at an address of 0x000CABC5.

So a stock hex file could look like this

Offset(h). 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
000CABC0 43 60 00 00 43 64 00 00 43 64 00 00 40 A0 00 00

After modify the stock setting to say 200F it could look like this

Offset(h). 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
000CABC0 43 60 00 00 43 48 00 00 43 64 00 00 40 A0 00 00

Notice that row 05 changed from 64 to 48. That one byte controls the C temperature of the HSF cut on.

When you use your tuner you are uploading a version of the stock calibration slightly modified as described above. That is a single change there, things like spark, maf, etc require 2 and 3 dimensional arrays and can cover many bytes of memory. (I'm not going to cover this here, but can if requested. Its for someone who understands coding or matlab).

So when you return your vehicles PCM back to stock your changing the memory map values back to their downloaded values. This is how Ford cannot detect that there was an aftermarket calibration or what the calibration that previously was on it was. They have had to resort to other methods of tracking these changes. There are a few PID's out there that were supposed to stay secret to show the Flash count for many areas of memory.

Tuners like SCT, Diablo, HP, have spent many countless hours reverse engineering these tables and mapping out the EEC memory. However, Ford has started to work with some major companies to share this information. If you had plenty of time and knowledge you could build your own tuning software and tuners. (I'm personally considering it)

I hope I did a decent job at explaining this. I look forward to comments and questions. As most of you know i'm a huge supporter of OSHW and OSSW. Putting the knowledge in the peoples hands is they it should be, we buy these cars and should know how they work, and if we want to make changes we should be able to. (I wish our government practiced same logic).

Cheers all,
-Matt


I'm not a "tuner", I am a ecu software engineer. Its different.

2011 GT500 = It gets me from A to B

If you want good technical help. Put your Year, trim, engine, and PCM code in your post! Its easier that way
ZeroAviation is offline  
Sponsored Links
Advertisement
 
post #2 of 26 (permalink) Old 05-02-2014
PONY Member
 
TheWhiteLight's Avatar
 
Joined: Mar 2014
Location: Houston
Posts: 625
 
I like your threads, very informative.


MY RIDES
2013 Performance White GT Premium: Tune, CAI, Flowmasters
1970 Mustang 351 Cleveland: MANY mods and improvements
2012 Ford Focus: Rims, Steeda CAI & Tune, Steeda Pro Springs, Steeda Front & Rear Swaybar, Steeda Rear Toe End Link, Magnaflow Catback Exhaust
TheWhiteLight is offline  
post #3 of 26 (permalink) Old 05-02-2014
GT Member
 
scott_0's Avatar
 
Joined: Jun 2011
Location: oxFORD
Posts: 1,870
 
great info!! thanks for sharing your knowledge

sent from my S4 using autoguide

2016 DIB GT Premium A6, Borla S-type axle backs, Rovos Pretoria wheels 20x8.5/20x10, Nitto N555G2 tires 255/35/20 and 275/35/20, Koni yellows, BMR springs
scott_0 is offline  
 
post #4 of 26 (permalink) Old 05-04-2014
Rookie
 
Rich_S's Avatar
 
Joined: Dec 2010
Location: Columbu
Posts: 42
 
Great post.

Can you comment specific to Coyote tuning - from what I've heard there is little to nothing to be gained by altering AF ratio or ignition timing, that most of the gains from a Coyote tune come from either the TiVCT timing or getting rid of the torque management.
Rich_S is offline  
post #5 of 26 (permalink) Old 05-06-2014
PONY Member
 
1972mach1's Avatar
 
Joined: Oct 2010
Location: Kingston
Posts: 937
 
Cool thread.

2014 Sterling Grey 5.0 Brembo
* ROUSH Axle-Back Exhaust
* JLT Oil Separator (Passenger)
* RAXIOM Tail Light Sequencer
* ARAID Race CAI
* BAMA Tune (91-Perf / 93-Race)
* 20% Tint

1972mach1 is offline  
post #6 of 26 (permalink) Old 05-06-2014
Apprentice
 
FSU logan's Avatar
 
Joined: Apr 2013
Location: Tallahassee
Posts: 155
 
What kind of code are the tunes written in?

2007 v6 Premium Pony Pkg Satin Silver Mustang | Go 'Noles
Dual 12" Subwoofers | Aftermarket System (Pioneer AVH-X8500BHS) | Magnaflow 16605 Cat-back Dual Exhaust | JLT CAI | SF3 Tuner | BBK 70mm TB | Sequential Lights
Sold!
2014 GT/CS Black Mustang
Borla S-Type AB

FSU logan is offline  
post #7 of 26 (permalink) Old 05-08-2014
GT Member
 
solidhadriel's Avatar
 
Joined: Dec 2010
Location: Inland Empire
Posts: 1,502
 
Pretty cool.

I know zip, zero, zilch about tuning, but I'm a programmer by trade and understand hex fairly well. I've always wanted to learn how to tune, but I've not had the balls to try it on my own cars. lol

Past: 2011 3.7 6AT SG
Current: 2014 5.0 6MT Black
solidhadriel is offline  
post #8 of 26 (permalink) Old 05-09-2014
SITE ADMINISTRATOR
Mustang II Member
V6 Member
4.6L Member
5.0L Member
S197 Member
 
kenv's Avatar
 
Joined: Jan 2007
Location: Levittown
Posts: 13,198
                     
Quote:
Originally Posted by TheWhiteLight View Post
I like your threads, very informative.

2013 GT CONVERTIBLE GHIG
2015 F-150 King Ranch crew cab

Dogs are not our whole lives, but they make our lives whole.
Saving one dog will not change the world, but surely for that one dog, the world will change forever.
AFM SITE ADMINISTRATOR

U.S. Navy veteran 1964-1968
kenv is offline  
post #9 of 26 (permalink) Old 05-10-2014
Rookie
 
r3ap3r911's Avatar
 
Joined: Jun 2013
Location: ottawa
Posts: 10
 
undo

Is there a way to put back the ford counter to whatever it came from the factory so they cant see it has been tuned?
r3ap3r911 is offline  
Apprentice
 
BullittSS's Avatar
 
Joined: Oct 2013
Location: Alpharetta
Posts: 117
 
So I'm about to purchase a canned tune, but a little hesitant about driving it out west in higher altitudes. Does the stock tune adjust air/fuel ratios for change in altitudes? How about 'canned' tune vendors? Also, thanks for the very informative post!

2014 Mustang GT California Special/Deep Impact Blue/ 6-Speed Manual/3:73/Ordered 10-5-2013/Built 10-28-2013/Delivered 11-7-2013
Ford Racing ProCal Tune/K&N FRPP Air Filter/GT500 MGTCA1 Mufflers/JLT Oil Separator/Sound Tube Delete/BF Goodrich g-Force Sport COMP-2 275/40/19's (all 4 corners on stock 8 1/2" rims)
BullittSS is offline  
post #11 of 26 (permalink) Old 05-11-2014 Thread Starter
Apprentice
 
ZeroAviation's Avatar
 
Joined: Mar 2013
Location: Olathe
Posts: 211
           
Quote:
Originally Posted by FSU logan View Post
What kind of code are the tunes written in?
The firmware itself is written in C/C++/ASM, with a Ford built RTOS.

Quote:
Originally Posted by solidhadriel View Post
I've always wanted to learn how to tune, but I've not had the balls to try it on my own cars. lol
You gotta start somewhere! I'm hoping the Admins of this thread will create a tuning section.

If you have any questions, let me know how I can help!

Quote:
Originally Posted by r3ap3r911 View Post
Is there a way to put back the ford counter to whatever it came from the factory so they cant see it has been tuned?
Yes, however, this is a pretty good kept secret by Ford. If someone had enough time and knowledge, they could find it fairly quickly.

Quote:
Originally Posted by BullittSS View Post
So I'm about to purchase a canned tune, but a little hesitant about driving it out west in higher altitudes. Does the stock tune adjust air/fuel ratios for change in altitudes? How about 'canned' tune vendors? Also, thanks for the very informative post!
Yes, any tune will adjust for any altitude. The MAF meters the incoming air and makes proper adjustments.

Also, the O2 sensors are a great indicator to the PCM as well...

-Matt

I'm not a "tuner", I am a ecu software engineer. Its different.

2011 GT500 = It gets me from A to B

If you want good technical help. Put your Year, trim, engine, and PCM code in your post! Its easier that way
ZeroAviation is offline  
GT Member
 
jlee910's Avatar
 
Joined: Apr 2014
Location: Birmingham
Posts: 1,932
   
That's a great write up, and as I'm about to be hitting matlab classes in engineering at my university, I may end up turning to the Mustang community if I'm ever stumped on a program. Thanks for another great post ZeroAviation!

Current:
2007 Mustang GT 302 Stroker, 6060 swap, 3.73 gears, Barton Short Throw, JBA LTs, Borla Touring Axle Back, Lito tuned SCT X4. H&R Race Springs, Bilsteins, J&M CC plates, J&M LCAs, BMR goodies. 4 Piston Brembos
DOB GT450 with VMP Gen II 2.3 TVS | DOB HE & IWP | GT500 hat & DW340s | FRPP 52lb | CMS Stage 2 Blower Cams | Comp 113 Springs & Retainers | 8 rib conversion | Track Spec GT500 Vents | PTFE Heat Barriers
jlee910 is offline  
SITE ADMINISTRATOR
Mustang II Member
V6 Member
4.6L Member
5.0L Member
S197 Member
 
kenv's Avatar
 
Joined: Jan 2007
Location: Levittown
Posts: 13,198
                     
I don`t know about a tuning section, but I can make this thread a sticky if enough folks are interested, & then it can be added to.

2013 GT CONVERTIBLE GHIG
2015 F-150 King Ranch crew cab

Dogs are not our whole lives, but they make our lives whole.
Saving one dog will not change the world, but surely for that one dog, the world will change forever.
AFM SITE ADMINISTRATOR

U.S. Navy veteran 1964-1968
kenv is offline  
BOSS Member
 
Thereaper's Avatar
 
Joined: Jul 2007
Location: Mobile
Posts: 4,571
 
Garage
Matt,

Did you work with Doug or for AM ?

Shadow Black 2018 GT 10R80-355
Thereaper is offline  
GT Member
Classic Member
S197 Member
 
65sohc's Avatar
 
Joined: Mar 2004
Location: Fresno
Posts: 1,299
 
Why "Ecocrap?"


2016 GT350, tech pack, JLT intake, Lund flex tune
65sohc is offline  
Sponsored Links
Advertisement
 
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the Ford Mustang Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a VALID email address for yourself, otherwise you will not receive the necessary confirmation email needed to confirm, validate and activate your new AFM member account.

Failure to provide a VALID email address, will result in the cancellation of your new AFM member account registration.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome
 


Search Engine Friendly URLs by vBSEO 3.6.1