It has been over 6 months since I initially had the idea of tuning my own car. There are way more things and knowledge involved to properly tune a car than I anticipated.
A brief history of my car. It is a 2000 Honda S2000 with mileage around 100K. Its original engine F20 became seized after a trip to the track Road America. Detailed disassembly of the engine is here. A F22 from a 2004 AP2 S2000 was swapped into the car to be used with the original AP1 ECU. According to the internet, it should work just fine : ) Compression test and leak down test on the F22 all showed great results after the install. But the engine was not running right. At a typical 20-min track session, the oil temperature would go over 265F even with upgraded radiator and oil cooler. It will misfire from time to time. During a WOT dyno-pull, AFR is around 14:1. Other parts on the car tend to fall apart whenever I am pushing it on the track. The car spent more time sitting on the jack stands than running. Thus, I decided to learn on this car. The worst it can do is not running, which is what this car is good at.
I am using a AEM Infinity standalone ECU. The install is easy with plug and play adaptor harness. The most difficult part was to put everything in the tiny space behind driver side kicker panel. A fuel pressure sensor tapped on the fuel rail, oil pressure sensor and oil temperature sensor mounted on an oil filter sandwich plate are wired into the AEM, which give me more data about the engine. These data can also be used for failsafe protection thanks to the features of AEM. I also replaced all my old and tired ignition coils as they are suspected to be causing the misfire. They were the cause as confirmed later.
I tuned the engine based on VE mode, which is the most popular and the default mode on AEM Infinity. VE based tuning means airflow/air mass based tuning. The ECU calculates the fuel using this mode by looking at 3 main inputs from the engine. MAP (manifold absolute pressure), IAT(intake air temperature) and engine speed from either CKP(crankshaft position sensor) or CMP(camshaft position sensor).
I have notes on Fundamentals of Engine Tuning here. Following is a brief review of how ECU works. In order to have the engine running at a fuel-air mixture you want. You want to tell the engine what your target AFR is at different engine load and engine speed. ECU will use your target AFR and air mass it measured from the engine to calculate the fuel. According to the ideal gas law, PV=nRT=NKT(R,K are ideal gas law constant). Air mass “N”=PV/KT. In plain words, The air mass in the cylinder = pressure(MAP)*Volume of the Cylinders/temperature of the air* a constant. Thus, fuel needed to reach the target AFR = air/target AFR = PV/KT*target AFR. (V=volume of air=engine displacement*RPM/2) But, due to restrictions of the air intake path, NA engine usually cannot fill its cylinder completely with air particles. The actual air mass divided by its ideal amount is called Volumetric efficiency/ VE. Put both volume and VE into the calculation. Following equation is the core of VE mode.
Fuel=P*RPM /T*K*engine displacement/2 *VE* target AFR
Due to the dynamic nature of an engine, many compensations are used for calculating the actual amount of fuel to inject. Gasoline needs to burn to produce work, and it burns at a certain rate of speed. If you tell the ECU to ignition the mixture when the piston just went past the top dead center. The flame and in cylinder pressure will be chasing the piston as the piston going downwards. To have a higher in cylinder pressure, air-fuel mixture needs to be ignited before piston reaches the top of the cylinder. The goal is to have the highest in cylinder pressure when the piston has the most mechanical leverage. And you will have the most torque.
Following Tuning Notes will be broke up into different stages of tuning, because a really long essay can be really boring. Basic theories will be given and available adjustments in the AEM infinity. My setting and reasoning will be given after the basic theory.