copyright 1998-2010 by Mark Verboom, hosted by Stichting Nerdnet, sponsored by Open Peering
RSS Feed Schakel naar Nederlands

Mark's blog

Categories: [All] Cars Humor Linux Music TheRest 
 

Tuesday, 9 March, 2010

Chiptuning, the basics

This is a first introduction to chiptuning for the 2.2L z22se ecotec engine in the Opel Speedster and Vauxhall vx220.

How a engine management works

There are lots of stories about "chiptuning", lots of different claims about power, torque, driveability etc. Based on all the experience I've got with the engine management on the 2.2L engine in the Opel Speedster I wrote this article on how this engine management works.

The engine management is nothing else then a computer with lots of connections. Just like a PC it can't do anything without software. On a PC commonly software like Windows or Linux (the operating system) is used combined with different applications. An engine management doesn't need to have such broad features as a PC. Almost all functionality that is available in a PC is redundant for an engine management. But the basic idea remains the same. The engine management has an operating system, just like a PC. But it is not written to be used with all kinds of different applications. There are different software modules though which can be added, depending on the kind of car the engine management is in (for example ABS, ESP, cruise control etc.).

The engine managements software is not stored on a hard disk like with a PC, but is stored on a chip. Often it is possible to install a new version of the software on this chip (for example to fix bugs). This isn't as easy as with a PC, it usually requires some dedicated equipment, often available only at dealers.

The way the software in the engine management works can be the same for a range of different engines, for example a 1.6, 1.8 and 2.0. But the way the engine management needs to control these engine is of course different. To prevent each engine of having a specific version of the software, the changes are stored in tables. This tables for example have information on the amount of fuel the engine management needs to add depending on the engine RPM and the throttle position. The content of these tables differ from engine to engine, as the amount of fuel needed to keep a 1.6 engine running is different from a 2.0. Changing these tables is a lot easier and safer then having to make different versions of the software. And this is exactly what chiptuners do, they change the values in these tables. A different term for table is of course map, hence the term remapping.

What happens during chiptuning

The goal with chiptuning is often to get more power from the engine. To be able to get more power from an engine, you need to add something which can provide this power. With a combustion engine this is fuel, in case of the 2.2L engine, gasoline. To be able to burn the gas, oxygen is needed contained in the air. To be able to get the most powerful combustion an engine needs a specific ratio of air and fuel. So just adding more fuel will not help, more air needs to be added too. With a turbo engine this is a relatively easy job for the tuner. On modern turbo engine the engine management controls the turbo pressure. By raising the turbo pressure, the amount of air is increased. By adding more fuel, more energy is released during combustion and the engine delivers more power. This explains the difference in claimed power increases between normal (atmospheric) and turbo engines.

But even with an engine like the 2.2L, it is possible to get more power by making sure that the engine is effectively running the best air fuel ratio to provide maximum power. The engine maker usually is on the safe side with the air fuel ratio because of the world wide different conditions the engine has to perform in. By further optimising the air fuel ratio some power can be gained.

What happens when changing the engine

An example of a popular change for the 2.2L engine is to change the intake manifold for a better one. The standard intake manifold is a restriction for this engine, it does not deliver enough air. By changing the intake manifold the engine will be able to suck in more air, thereby adding more fuel and delivering more power.

But there are different results when placing a different intake manifold (discarding the difference in intake manifolds being used). This can be explained by the way the engine management works.

Making the mixture

Lets assume 1 simple table in the engine management which contains the throttle valve position on the y-axis and the engine RPM on the x-axis. Each cell in this table contains a value. These values indicate the amount of fuel the engine management needs to add for this specific combination of throttle and RPM.

After changing the intake manifold, the same throttle position will allow in a different amount of air. So if the same amount if fuel is still used, the air to fuel ratio will not be correct anymore. The least this will impair the engine performance, but in extreme cases it can damage the eninge.

There are of course more subtle situations where the amount of oxygen entering the engine for a specific throttle position is different. Think about changes in the air temperature and pressure, but also engine wear. To be able to compensate for these kind of situations a special mechanism is built into the engine management. This mechanism uses an oxygen sensor (also known as a lambda sensor) in the exhaust system. Through this sensor the engine management is able to determine the amount of oxygen left in the exhaust gases. If the ratio between air and fuel is optimal, the amount of oxygen left in the exhaust gases will be minimal. For gasoline the optimal ratio between fuel and air is 1 to 14.7. The sensor in the exhaust will indicate to the engine management if the ratio was lower then 1:14.7 (too much fuel for the amount of air) or lower then 1:14.7 (too little fuel for the amount of air). How much the ratio differs from 1:14.7 can not be determined by the signal from this sensor.

During operation of the engine, the engine management will continuously try to get the lambda sensor as close to 1:14.7 as possible. The engine management read the fuel value from the main fuel table, and checks the last reading from the lambda sensor. If the signal indicates too little fuel, an extra addition will be made and vice versa. This way the engine management continuously tries to optimise the air to fuel ratio. These changes in the ratio are called trims. As these trims are taking place quite quickly, they are known as short term fuel trims (SFT). This changes take place in a loop like process, which is known as closed loop operation.

The process of trying to optimise the value from the base fuel table is not optimal. The changes are reactive, the loop needs to be traversed a couple of times to get the changes right, and this takes time. To save time and have a better initial air to fuel ratio the engine management creates a temprary table in memory. Depending on engine operating conditions the engine management will fill this table with deviations on the base fuel table. The advantage of this setup is that the amount of fuel will now directly be corrected without having to look at the lambda sensor first. This table contains fuel trims that are collected over a longer period of time. Therefor it is called a long term fuel trim (LFT).

The engine management in our engine has a luxury LFT. It consists of a table with multiple cells. This table isn't as large as the base fuel table. But there are also engine managements which work with only 1 LFT value for all operating conditions. For a standard engine this isn't much of a problem. For variations in weather and engine wear such a table adequate to compensate the changes in fueling. The engines character is still the same, and this character is what is embedded in the fueling information stored in the base fuel table.

The difference with the base fuel table is pretty clear. The base fuel table has over 350 cells. The LFT table only has 18 cells.

Now the situation where the intake manifold is placed. This gives a significant change in the character of the engine. The flow of the intake manifold differs with RPM's. The trim mechanism in the engine management will of course still work, but due to the character change in the engine it is very difficult to fit all these changes in the small LFT table. Especially the cells in the LFT table that account for a large operating range of the engine will change often, because one of those cells needs to compensate for a whole range of different fuelings. Basically, the values in the LFT table are never correct.

More power

To get the engine to deliver maximum power a different fuel to air ratio is needed then 1:14.7. More fuel needs to be added to make maximum power. For the engine management this is quite straight forward. The engine management has been programmed that on full throttle (so delivering maximum power) it needs to deliver an air to fuel ratio of 12.6:1. Because the engine management knows how to make an air to fuel ratio of 14.7:1 (through the base fuel table and all the trims) it can calculate how much fuel needs to be added to make a ratio of 12.6:1. This type of air to fuel ratio is also know as a target air to fuel ratio or a target AFR. The word target indicates that the engine management can't be sure the AFR is correct. The lambda sensor in the exhaust isn't able to indicated the engine management how far the air fuel ratio is below 14.7:1. So there is no way for the engine management to verify. No loop is active anymore to verify and control the exact air to fuel ratio, so this mode of operation is also know as open loop.

From the information above it is quite clear that it is very important that the engine management accurately knows how to make a 14.7:1 air fuel ratio. When changing the intake manifold, this will no longer be the case. The LFT table contains a cell which covers almost half of the RPM range on full throttle. The chance this cell contains the correct value for this whole operating range is 0. Therefor the engine mana gent will not be able to make the required target AFR and so the engine will not deliver full power.

Below a power graph can be seen for an Opel Speedster. The lower graph is for a target AFR of 12.7:1, the higher graph is for an AFR of 12.9:1.

Such tiny changes in AFR give a reproducible change in engine performance and signifies the importance of an accurate target AFR.

Conclusion

An engine management has a compensation mechanism that is able to compensate for weather influences and engine wear for an engine which has the same character as the engine management was calibrated for. This compensation can be done with a table which is much coarser then the base table.

When changing the engine's character, the LFT table is too coarse to compensate for the character changes. The cells in the table are too large.

This causes the engine to not operate optimally and in extreme cases can lead to damage. The performance for the engine will not be optimal. Depending on the current values in the LFT table, the performance can be different from measurement to measurement and can be quite significant.

The solution for this is to modify the base fuel table in the engine management so each position in the table contains the correct amount of fuel for a 14.7:1 air to fuel ratio. This way the engine management will be able to make the target AFR and the engine will deliver optimal power.

When optimally chiptuning an engine management it is not possible to optimize the base fuel table on one engine and copy it to another engine. The base table is dependant on the state of the engine, including all modifications and will be different with different engine modifications.

Saturday, 27 February, 2010

Dell R210 Debian install

A quick jumpstart of a Dell R210 turned out to be a little bit of a problem. Dell uses Broadcome Netextreme II cards in these systems. They do netboot fine, but when booting a netinstall of Debian, the installer doesn't find the network cards.

The problem turned out to be two fold. The first part was the firmware that is required for these cards to work. It is no longer included in the Debian installer as the package has been moved to non-free. But there is plenty to find about this on the net, and it is an easy fix. Just update the initrd image with the non-free firmware package.

http://www.ducea.com/2009/05/19/debian-lenny-501-pxe-initrd-update/

But then the network cards are still not detected. The card has a PCI id of 14e4:163b, but the driver only recognises card with PCI id 14e4:163a. Ofcourse you can recompile the kernel to fix this, but there is also a quick and easy fix:

http://blog.akkaya.de/jpabel/2010/01/22/NetXtreme-II-BCM5716-on-Ubuntu-8-04

I didn't use the complete install hook here, just ran the patch on the bnx2.ko kernel module before generating the new initrd image for the netboot. Quite simple:

#!/bin/sh
sed -i 's/pci:v000014E4d0000163A/pci:v000014E4d0000163B/' bnx2.ko
sed -i 's/\xe4\x14\x00\x00\x3a\x16\x00\x00/\xe4\x14\x00\x00\x3b\x16\x00\x00/' bnx2.ko

As the systems needed to run OpenVZ, I used the same patch on the Debian supplied OpenVZ kernel, works like a charm.

Tuesday, 23 February, 2010

Mail from Down Under

I'm used to getting packages through the mail. And usually I know what should be in them. But today I recieved one that made me wonder..

But, as soon as I opened it, I knew immediatly whom it came from :D

From my neffue and his girlfriend! They are in Australia at this moment. Very cool, a fresh supply of Vegemite and a bunch of TimTam's! Great! Thank you very very much!!

Sunday, 21 February, 2010

Machine dreams

Recent de tweede CD van Little Dragon binnen gekregen (zie ook Little Dragon).

Wederom een erg goed album vind ik. Heb hem nu een paar keer kunnen luisteren. Momenteel is m'n favoriete track "My step". Zie hieronder voor een stukje op youtube.

Saturday, 20 February, 2010

Compcams timing verification

After the initial remap (see Compcam speedster remap) the owner returned for verification of the timing of the camshafts.

So we took off the valvecover and we saw this.

The 2nd cylinder seems to be missing a hydraulic lifter!

Looking a bit furter we found what happened to it..

This can very well explain the problems the engine has. Unfortunatly we couldn't source a new hydraulic lifter today. So we need to wait for parts and see if we can replace it. The exhaust cam seems to have some damage to the lobe, so that needs to be removed.

Using special tool KM6148 we checked the camshaft timing. The timing is spot on, so that doesn't seem to be a problem.

So again, to be continued..

Friday, 19 February, 2010

Shuttle x27d suspend/resume problems

I've had my shuttle x27d for a while now, and am very happy with it. It's a nice small box and quick enough for me to use as a workstation (running Debian/GNU Linux ofcourse). The only problem I've had with it is software suspend/resume with linux. It does work, but afterwards the ethernet connection seems to be broken. Most noticable is the ff:ff:ff:ff:ff:ff mac address which seems to be related to the driver being unable to read the eeprom information. Bringing the interface down and unloading the r8169 and mii modules before suspending seemed to help sometimes, but not consistently.

Finally discovered the BIOS was still at the initial release version. And update might help. So did some searching on how to run the awdflash utility from an USB stick. Recipe is actually quite simple.

sudo apt-get install makebootfat

As the utility downloaded from the Shuttle website (awdflash.exe) is a DOS command, you need freedos. So I got the following packages:

mkdir /tmp/download
cd /tmp/download
wget www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/kernels.zip
wget www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/commandx.zip
wget www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/unstablx.zip

You need to collect a few files from the zips to install to the USB stick.

mkdir /tmp/root
cd /tmp/download
unzip -j -d /tmp/root commandx.zip bin/command.com
unzip -j -d /tmp/root unstablx.zip bin/kernel.sys
unzip -j -d /tmp/root kernels.zip source/ukernel/boot/fat12.bin source/ukernel/boot/fat16.bin source/ukernel/boot/fat32lba.bin
cp /usr/lib/syslinux/mbr.bin /tmp/root/

Download the BIOS and installation utility. Please check below URL's are ok, they were for me...

cd /tmp/root
wget -O FM27S205.BIN "http://image.shuttle.com/ResourceCenter/download_file.jsp?file_id=13854"
wget -O AWDFLASH.ZIP "http://image.shuttle.com/ResourceCenter/download_file.jsp?file_id=7526"
unzip AWDFLASH.ZIP

After inserting your USB stick you should end up with an extra device. BTW, make sure there is nothing important on the stick and you use the correct device, all will be erased! For me it was /dev/sda, so I used this command to setup the partition table and filesystem:

sudo makebootfat -o /dev/sda -E 255 -1 fat12.bin -2 fat16.bin -3 fat32lba.bin -m mbr.bin /tmp/root

Booted the system from this USB stick, started AWDFLASH.EXE and flashed the BIOS without a hitch. First resume was successfull and network was running without a problem. Hope it stays this way :)

Saturday, 13 February, 2010

Compcams speedster remap

Today we did a remap for a Speedster with stage 1 Compcams camshafts. After the camshafts were fitted the idle of the car wasn't very good and the engine didn't have very much power. So the owner came by Peter for a remap. I brought my exhaust gas tester with me, because the exhaust gasses weren't up to spec to make the MOT.

After flashing the ECU with Peter's software we made some initial adjustments.

Before changing the idle settings for the engine we did an exhaust gas test on idle and 2500rpm. The results look like this:

Idle
CO: 0.01% vol
HC: 165 ppm
CO2: 6.95% vol
O2: 11.40% vol
Lambda: 2.106

2500 rpm CO: 0.00% vol HC: 172 ppm CO2: 15.42% vol O2: 0.07% vol Lambda: 0.999

Lambda at idle is way off. So Peter started to ajust the idle tables and raising the idle RPM. In the end we ended up with a 1200rpm idle. Then we put the ECU into learning mode and the owner went for a drive to get the ECU calibrated. After 1.5 hours he returned. After finalising the ECU settings we did another exhaust gas test. This time the values were within MOT boundaries.

Ide (1200rpm)
CO: 0.04% vol
HC: 251 ppm
CO2: 14.70% vol
O2: 0.74% vol
Lambda: 1.026

2500 rpm CO: 0.03% vol HC: 248 ppm CO2: 15.25% vol O2: 0.00% vol Lambda: 0.993

Then Peter and the owner did a final calibration run to set the target AFR to optimal. Just like with all the other cars, 12.9 seems to be optimal. When deviating as little as 0.2 you loose power as can be seen in the graph below (lower curve is 12.7 target AFR).

Still the results were pretty disappointing. The car as a 2.4 inlet manifold (the correct one) and a good airfilter (original exhaust). So it should be at least the same power as Peter's car when he still had his original exhaust. But when comparing the graphs this isn't the case.

Something doesn't add up here. With the higher lift cams power should be higher. And it doesn't make sense that idle is so way off compared to normal. Also HC is still high even after calibration. Might be that the cams aren't installed correctly and the timing is off.

To be continued..

Saturday, 6 February, 2010

4-gas tester test

Na een proefritje met de speedster om te zien hoe de nieuwe stoelen bevallen hebben we de 4-gas tester nog even aangesloten om te zien of hij helemaal 100% werkt voor de tuning actie die voor komend weekend op de planning staat.

Eerst natuurlijk de sonde in de uitlaat stoppen.

Gelukkig zit er een vrij lange slang aan, erg praktisch.

Het gevolg van de lange slang is wel dat het even duurt voor de gassen in de 4-gas tester aankomen. Dus bij het veranderen van het toerental of het mengsel duurt het even voordat je iets ziet gebeuren op de display.

Een geslaagde test, dus helemaal klaar voor volgende week!