Tunable Engine Management System on a turboed B234F engine in a Volvo 740 Wagon
(I hope to post the pictures for this writeup soon.)
This project was performed as the project component of an Olin Self-Study course in engine management for gasoline internal combustion engines. The project involved learning about engine management systems and then researching the MegaSquirt fuel injection and spark control computer. Information relayed in this website includes my experiences while replacing the engine management system in my vehicle and summarize my activites and accomplishments. I have omitted a number of technical details that are MegaSquirt specific because the number of variables I have learned in conjunction with this project will confuse a reader more than they will help. Please contact me via e-mail if you have questions regarding specific system variables and values. This page will be updated as the project progresses and changes.
Current Project Outcomes
To date, I have managed to learn about the history and current state of engine management systems, including fuel injection methods, spark delivery and timing methods, and tuning. I have gained a great deal of knowledge regarding the theoretical and practical application of engine management systems the use volumetric efficiency to run an engine effectively. I have specifically learned many technical details about the MegaSquirt fuel system and the MegaSquirt'n'Spark firmware. I have successfully installed the system on my car, worked to obtain an acceptable idle, and have obtained reasonable driveability of the vehicle in low-load, slow-acceleration states. The following provides greater depth primarily to the project component of my OSS.
The Vehicle
A 1990 Volvo 740 station wagon with a B234F block (2.3 litre I-4 w/ 16 valve head) was chosen to receive the new fuel injection system. A turbocharger has been added to the car using Europe-only Volvo parts, resulting an engine that was never produced. Previously, the car was controlled using a set of stock Volvo Bosch LH 2.4 fuel and spark computers. The fuel computer was obtained from a turboed, 8 valve model of the engine (the B230FT) while the spark computer was sourced from a non-turboed B234F. These computers use an air-mass based fuel calcuation to determine the engine state, as well as knock sensing and a narrow-band exhaust gas sensor to assist with spark retard and fuel enrichment. This system is robust because it can handle the addition of a turbo to the engine with reasonable results. However, because the fuel computer is specifically tuned for an engine with an 8-valve head, it is tuned for a lower air mass entering the engine for a given engine state. The spark computer has no provisions for a boosted engine and therefore does not advance and retard the ignition appropriately for this application, particularly in boost. The computers can function together because Bosch included a provision for the fuel computer to communicate with spark computer, allowing the output of the two to be corrected. It was therefore decided that the fuel and spark computers should be replaced by a more tunable option that will fit the nature of the car.
The System
A Megasquirt V3.0 fuel and spark computer running the MSnS-e 029t firmware was chosen. The system is responsible for controlling the fuel injectors and spark timing utilitzing the car's stock injectors (Bosch 29 lb/hr "green tops" common in late 80s to early 90s turbocharged 4-cylinder engines), coil, and distributor. The computer uses an on-board circuit that is responsible for firing the ignition coil, which negates the need for an external ignition module as was previously used by the LH2.4 system. Every parameter in the system can be tuned using either Megatune, the original Windows-based tuning software, or Megatunix, an open-source Megasquirt tuning software that is available for Windows, Linux, and MacOS. The firmware chosen is called MegaSquirt'n'Spark-extra because it handles fuel, spark, and a number of other functions including boost control, electric fan activation, and even launch control. For non-standard applications, firmwares can be rewirtten to meet the needs of each user. Because the system is highly tunable, configurable, is the least-expensive aftermarket fuel/spark upgrade option, and has a large community of knowlegable users, it appears to be the ideal system to place in a project car that is constrained by a budget.
Installation
To implement this system in my vehicle, I chose to integrate the fuel computer into my car using a self-built "plug-and-play" harness, that allows me to use the stock wiring harness from the original fuel injection and spark computers. This design choice was made because I wanted to ensure that I had a working system to fall back on while I performed this project. I worried that my inexperience with this system and lack of a physically present mentor with specific Megasquirt experience might prevent me from producing a completely working system in the given timeframe. The wiring harness does require a few non-plug-and-play additions in order to function, including an air temperature sensor, coil control wire, and O2 sensor power wires that were not available in the stock wiring harness. In addition to the MegaSquirt computer, a wideband oxygen sensor, which provides very high resolution when examining the oxygen content of the exhaust gas, was installed in place of the original narrow-band sensor. A potentiometer-type throttle position sensor also replaced the "switch-type" TPS originally used on the car. To provide a manifold air pressure reading to the fuel computer, a T-fitting and hose were placed in line with a hose controlling the turbo pressure gauge in the dashboard. No other hardware changes to the vehicle were necessary.
Below: Bosch LH 2.4 to MegaSquirt adapter shown next to stock fuel injection computer (to the left of the passenger foorwell)
Below: Bosch EZK-117 to Megasquirt adapter harness shown connected to stock spark controller harness (under steering column)
Below: Innovate LC-1 Wideband O2 controller and sensor placement in exhaust downpipe
Below: Nissan Throttle Position sensor modified to fit Volvo throttle valve. This throttle position sensor does not have a large enough range and will be replaced by a different type.
Initial Testing/Startup
After installation, the system was tested for functionality by checking its startup behavior, including fuel pump and injector priming, as well as controller communications with a laptop PC. After these functions were verified, base fuel and spark maps with settings known to work in a 2.3 8-valve Volvo engine similar to mine were chosen. On the first startup attempt, the engine did start, ran very roughly, and was only run for about 15 seconds. During the second tuning session, the same settings were used. On startup, the car idled poorly and careful modulation of the gas pedal was needed to prevent stalling. It was discovered that the REQ_FUEL value, the value that states how much fuel is needed by the engine for one combustion event, was set to be approximated 33% above the suggested value, because the car that provided the base settings was non-turbo, and therefore had correspondingly smaller injectors. This value was enough to cause a serious rich condition that resulted in a large cloud of smoke and a poor idle. After this value was appropriately reduced, the car idled without issue. This also eliminated the rich condition. The idle of the car after this change improved significantly over the idle of the stock fuel management system; the car now smoothly idles at approximately 1000 RPM without a rich mixture, a noticable difference from the very rough and rich 750 RPM idle produced by the Bosch computers.
After the initial startup, the fuel table was slightly modified and the car was driven to test its performance. The engine was kept in a state of vacuum because the tables were only tuned up to atmospheric pressure. This testing revalead a few areas in need of attention, including the throttle position sensor, which only works over half of the range of the throttle valve. This will be dealt with using a new, known-working throttle position sensor and adapter plate. The car ran fine, but any attempts at fast acceleration resulted in bucking. However, very gradual throttle increase led to smooth performance up to 3000 rpm with the engine lightly loaded. Additional explanation is provided on the tuning explanation page.
Fuel/Spark Table Tuning
Tuning that I have thus far performed first includes setting my idle and startup parameters and modifying portion of my base fuel map that relates to idle. As stated in many tuning resources, the car should be tuned to have the lowest manifold air pressure possible at my idle RPM. This is essentially the point when the air to fuel ratio is set so that the least amount of total fuel is required while still protecting the engine at idle. This is evidenced by the fact that the least air is entering the engine when, for a given engine speed and throttle position, the pressure between the intake and the cylinder is the lowest. The goal also includes tuning the AFR to fall between 14.0 and 13.2 to 1. This is still slightly richer than stoichiometric, but will lead to cooler, more controlled burn to prevent valve and piston damage.
While this method of tuning is perfect for most engines, I took a slightly different approach to my idle tuning. I chose to tune for the smoothest idle first, and then optimize to get the lowest manifold air pressure afterward. This choice was made on comfort and drivability concerns. Before the installation of the MegaSquirt system when the engine in my car idled at a low RPM, it had a tendency to shake and buck. This is mostly the result of a highly rich condition at idle caused by the Bosch LH system running in open loop (not using the oxygen sensor to determine the proper air-to-fuel ratio) and employing presets that were determined for an engine different from the one in my car. To begin tuning, I chose to first find a reliable idle, regardless of air pressure in the intake manifold. I started by using settings from a non-turboed Volvo B23F engine, which is an 8-valve 2.3 litre engine similar to mine. The initial fuel map in the area of idle seemed to work well, as did the spark settings, but the engine still idled rough and ran rich. To improve this, I decreased the fuel multplier (REQ_FUEL) that relates the injector size to the amount of fuel that is injected. By reducing the REQ_FUEL value to one more appropriate for my injectors, I obtained an idle that is significantly smoother than the previous fuel computer.
To assist in tuning efforts, a fuel map from a similarly built vehicle was obtained. Differences between the two vehicles include a different ignition system and differently sized injectors. To minimize difficulties, the fuel and spark tables, as well as air:fuel ratio targets and wideband oxygen sensor values were the only parameters used, because these tables are mostly independent of other system variables. Additionally, most of the currently chosen values appear to function well. It is true that the buildup of tolerance causes the tables to be somewhat vehicle specific, but the table in question is from a dynomometer-tuned vehicle, which means that the tables are likely to produce positive results even if the values are not perfect for my engine.
The initial use of these maps produced an even smoother idle of the car and smooth operation through the RPM band while the engine was unloaded. The system did produce a miss when it was revved quickly, but this is likely because the chosen throttle position sensor was not connected. Because the system bases its acceleration enrichment off of the TPS, this part must be properly installed before other causes of the fast-acceleration miss can be investigated.
Quantitatively, the leaner fuel mixture at idle has caused an approximate 200 RPM idle increase while still decreasing the manifold air pressure. The exact value of this decrease was not recorded before a bad serial communication corrupted the MegaSquirt computer, preventing the car from starting. Once the firmware has been reflashed and the system reinstalled, the exact MAP value will be determined.
Additionally, the car was shortly driven off boost to determine the state of a small portion of the VE and spark tables. It was found that throttle response with two separate and very different sets of fuel/spark maps was poor, indicating that another factor besides tables needed to be considered. Once the throttle position sensor is reinstalled on the car, this issue will be investigated further.
The new fuel injection system also increased the performance of the engine by decreasing the time required for the engine RPM to decrease after the gas is released. The previous response time for the unloaded engine to decrease from 3000 to 2000 RPM was approximately 3 seconds. After implementation of the MegaSquirt, this time has dropped to about 2 seconds, indicating that the settings have improved the response time of the engine.
As I continue with tuning, I will perform tests to ensure that most of the volumetric efficiency and spark timing tables are appropriately tuned and then tune the acceleration enrichment settings to improve fast throttle response.
Below: A photo of me modifying parameters with Megatune
Problems
As with most older cars, a number of unexpected features were encountered during these modifications. First, it was discovered that the expected pinout of the fuel computer connector was slightly different than expected. This is partially due to the semi-standardization of these fuel computers, and partially due to poor documentation. Second, the +5v power wire to the throttle position sensor was some how non-continuous at a firewall junction. This problem was remedied by bringing a supplemental wire through the firewall to bridge the gap.
More importantly, during the most recent tuning session, I attempted to flash a new set of values to the controller, which resulted in nonsense bits being written to the Megasquirt computer. This occurance prevents the car from starting and does not allow communications to occur properly. To fix this problem, the firmware will be reflashed and the values reloaded so that testing can resume.
Future
This project has been performed on a vehicle that is most appropriately known as a "project car," implying that it is not finished and will continue to be improved and modified. As such, the fuel injection and spark system, though it is installed and, for the most part, functional, this project is far from complete. Although tuning the engine is an important aspect, the system will be used to control other additions to the car, including the electric radiator fan, on-board diagnostics, and turbo boost control.
The fuel injection is the centerpiece of my ability to continue modifying the vehicle because the function of the engine is directly related to the performance of spark and fuel delivery. As the engine is changed, the fuel system can be tuned to best use these changes for a performance or efficiency gain. Immediately performable modifications include new, larger fuel injectors that will increase the maximum theoretical horsepower support of the fuel system. Additionally, the ignition system will be modified to use "coil on plug," a type of ignition that completely removes the mechanical components responsible for spark by placing an individual coil on sparkplugs. This will increase reliability and tunability of the engine.
Update: 2009-10-12 - To include miscellaneous settings that I am using. I will include fuel maps when they become better.
Settings
Trigger Settings
Wheel Decoder Base teeth: 60
Missing Teeth: -1
Trigger pos A: 5
Trigger pos A return: 13
Trigger pos B: 35
Trigger pos B return: 43
all others: 0
Req Fuel: 12.6
Cranking/Priming Table
Pulse Widths (need tuning but it starts every time after a few cranks)
0 F = 8
20 F = 7
40 F = 6
60 F = 6
80 F = 4.6
100 F = 3.3
130 F = 3.0
160 F = 3.0
CLT Temp settings (stock B234F CLT, for EasyTherm, these values aren't perfect but are at least functional)
-25*C = 20000 ohms
50*C = 800 ohms
120*C = 110 ohms
IAT Temp settings (GM IAT)
-18*C = 12000
18*C = 2315
94*C = 250
Spark Settings
Trigger angle = 63
Trigger angle addition = 0
Other Materials
A thread about ignition settings on T-Bricks - http://forums.turbobricks.com/showthread.php?t=183560&highlight=trigger
The Basics of Fuel Injection, Spark Control, and Tuning - A short description of how fuel injection, spark control, and engine tuning work for gasoline internal combustion engines
LH2.4 Partial Plug-and-Play harness pinout - WARNING - The notes in this file were meant for my eyes. A revised version with more specific comments will be posted when I am sure that my wiring harness is complete for this portion of the project.
Current MSQ File - Contains currently required settings (for MSnS-e 029t firmware) to run my Volvo B234F+t engine, currently on stock internals, stock intake manifold, B204FT exhaust manifold, (unknown type) turbo, Volvo 850 throttle position sensor, Innovate Wideband O2 Sensor, Bosch "Green-top" 29 lb/hr fuel injectors, stock Volvo ignition coil and distributor, stock in-tank and in-line fuel pumps, and a 2.5 bar fuel pressure regulator.
Helpful Online Resources and References:
Wikipedia - Fuel Injection: http://en.wikipedia.org/wiki/Fuel_injection
Wikipedia - Ignition Systems: http://en.wikipedia.org/wiki/Ignition_system
DIYAutoTune - Street Tuning your Megasquirt EMS - http://www.diyautotune.com/tech_articles/street_tuning_your_megasquirt_ems.htm
Megasquirt homepage - http://www.megasquirt.info
Megasquirt forums - http:;//www.msefi.com
Turbobricks Aftermarket Engine Management Forums - http://forums.turbobricks.com/forumdisplay.php?f=21