Franks' Electronic Fuel Injection and Ignition Thoughts

My ideas on an EFI and Ignition system for my bmw K75 motorcycle.
The bike is a water cooled 3 cylinder fitted with a Bosch Jetronic fuel injection system and a separate Ignition system. I want to combine the systems, reduce weight, increase reliability and fault tolerance.


Most of the initial fuel injection information comes from EFI 332 (links to EFI links click on 332) and my under standing of the BMW/Bosch systems in use on their motorcycles. The EFI332 site shows how to calculate the values from measured quantities or make approximations that should function to obtain a working system that can be fine tuned for best consumption/power/air fuel mixture. I recommend you read it, most importantly the algorithms. You should also look at the later MEGASQUIRT (links to EFI links click on MEGASQUIRT) it has later componentry.
The following has been modified to

Where as EFI332 takes the raw input values and calculates what these are in real units (eg temperature in ° rather than the ADC output number) this system only modifies the raw data if required, not going through any intermediate steps. If you need the data in actual values then that can be converted once transfered to a PC.

     Click on a topic, or scroll through.
Fuel Injection Pulse width    Fuel Injection Timing     Time for air to travel to cylinder     Time for fuel to travel to cylinder    
Ignition Timing     Coil 'ON' time     Advance time    
Determining the Factors    
K75 Details     Current K75 ignition system     Current K75 fuel system    
New system Overview     New K75 Ignition system     New K75 Fuel system     Calculating engine speed/period     CPU Units to use     Determining Faulty sensors     Fuel Pressure and flow rates    


 

Fuel Pulse width:

 

This is the time during which the fuel injector supplies fuel to the engine.
Most carby systems supply fuel based on

Additionally some carbys resopond to Some carbys have chokes that enrich the mixture for cold starts. Other factors that determine optimum fuel are Additional factors that come from the fuel injectors are The fuel injection system can improve the motors ease of starting by providing a rich mixture at starting, and tapering off as the motors' combustion chamber reaches normal temperature in ralation to the sensed engine temperature.
The calculation of air flow in fuel injection systems has been done with
I hope to reverse engineer some of the new EFI from the old system. I can use the old brain and bench test it to find the relationships between the Fuel Pulse width and On road/track/or dyno testing will have to be used to find the relationshinp between throttle position (this will have to be fitted in conjunction with the Throttle position switch.) and engine speed.

 

Fuel Injection Timing:

 

This is the start point of the injection of fuel into the inlet tract and is called InjFire. For sequential injection there is only one injection per cylinder every 720 ° (2 revolutions). Batch injection injects at any time during the cycle, which is fine if the air flow is more or less constant over the cycle. This occurs at high engine speeds, but at low speeds the air flow pulses making sequential injection preferred at these speeds. At higher speeds the sequential injection may not give enough fuel, so a combination of sequential injection at low speeds and batch mode at higher speeds may be the best way to achieve good fuel injection. Sequentially the timing should

  1. inject fuel as soon as possible after intake opens [at TDC for the K75?],
  2. avoid injecting during intake/exhaust overlap period (avoid fuel going straight out the exhaust port [the K75 does not have exhaust over lap, so this is not a concern?]),
  3. above all, avoid injecting fuel on closing intake valve (avoids fuel buildup on the intake valve surface causing burnt valves).
  4. ensure a rich mixture around the spark plug in the combustion chamber (ensures firing of the mixture - a lean mixture will propergate the flame front once it has been established - by the richer mixture around the spark plug)

The proceeding leads to the following logic:


For the short injection period the optimum point could be dertermined using a dyno; opertaing the engine at a fixed rpm adjusting the fireing point for maximum power. Simply injecting at a particular point may not be the best solution for that particular motor! Combustion chamber shape and air inlet shapes determine the flow - in particular which part of the air inlet flow ends up near the spark plug will be different from one moptor to another. As a starting point around the last half may be adopted. But yu should not just acept that as final.

The problem is when the injection period is long. The fuel can get to the valve in two ways, either directly from the injection or by being carried in the air stream. We calculate the air carry method.

Time for air to travel:

The Time for air to travel through the cylinder port can be obtained by dividing the volume flow by the area of the port (=air speed), and dividing this speed into the length of the port. The equations are:

air speed = (one cylinder capacity / port area) (/ intake angle * 720) * rpm/2

The first term calculates the length of inlet air.
The middle term calculates the ratio that the inlet valve is open for each cycle. (about 25%)
The last terms calculate the time for each cycle.
This will vary as the rpm varies.
Time to reach valve = length from injector to cylinder port / air speed
The time for the air to travel from injector to port will vary, but if seen as an angle it is a fixed value.

Time for fuel to travel:

The Time for fuel to travel to the cylinder port can be obtained by dividing the volume flow by the area of the injector port (=fuel speed), and dividing this speed into the length of the port. A small correction is required for the angle that the fuel is injected into the port. The equations are:

fuel speed = (injector port area / injector flow rate) * Cos theta * length of cylinder port

The first term calculates the inverted speed of fuel flow.
The middle term corrects the fuel flow rate for the injection angle into the inlet port.
The last terms converts inverted speed into time by multiplying by distance.
This is a fixed time and can be entered as a constant into the program.

From above it can be seen that the start of fuel injection relative to a cylinder cycle is:


 

Ignition Timing:

 

The ignition timing is calculated from the engine position sensor, TPS, engine temperature, engine period.
If the Engine position sensor sends the TDC signal and the ignition has not fired yet, then the ignition is triggered. This establishes the minimum ignition point. Other inputs advance the timing from this minimum point.

Coil 'ON' time:

Old Kettering ignition systems used a coil on/off ratio of 50% ON and 50% off. This achieved maximum energy in the spark at maximum engine speed. But at low speeds the coil gets very hot. When the coil is first connected to the battery no current flows. As time passes the current incre3ases to a maximum value, once this maximum value is reached no more energy is stored in the coils magnetic field (later used to fire the spark plug) the following energy is simply dissipated as heat. The new systems use a fixed ON time that still achieves maximum spark energy at maximum engine speed but does not waste energy at lesser speeds. The coil On time can be determined by measuring the current into the coil over time, or measuring the inductance and resistance of the coil. The time can be calculated by Time On = 5 * L / R (Five times the time constant = 99% of the maximum energy).
A rough calculation would be based on the maximum engine speed of 9,000 rpm and a 50% duty cycle resulting a coil 'ON' time of 3 milliseconds.

Advance time:

This can be determined by the engine speed (old mechanical advance), TPS (old vacuum advance) and engine temperature (anti knock).
Probably the easiest way is to have a similar look up table (array) to determine the advance with respect to engine speed and TPS. The engine temperature is a small correction on this.
AdvanceTime = IgnAdF[TPS,engPerod] * engTemperature

So IgnFire = EnginePeriod - AdvanceTime {With respect to the previous engine sense TDC}


 

Determining the Factors:

 

You probably already have a working system, either by carby or an old injection system. You can use the presently operating system to obtain the initial factors as the system is used.
Place on the current system all the sensors that you will be using with the new system. Some sensors may be shared and you will need to be careful with loading effects. It will be difficult to mount some sensors with the current system, but you should find a way eg using the current sensor and then doing a comparison of the two sensors so you can correct the factors resulting calculation for the different sensor characteristic.
In a carby based system you will have to determine the present fuel rate usage for every operational condition measured. For an injection system, provided you use the same injectors you don't need to determine the fuel flow rate except to determine the fuel injection time delay for the port length (and you'll have to do that too for the carby system anyway).
I would make the new system initially a data logging system such that the injector and coil outputs are used as inputs. After competing the data logging (try to do this over may varied conditions [temperature, pressure and driving conditions]), the system can then be changed into the EFI&I system, the old system removed and the new system run. The new system should run straight away, but no improvement should be noticeable at this stage. Fine tuning of the new system should then commence using an external PC to monitor the system and give the user data in understandable units. Hopefully the calculated fuel can be reduced, particularly at low throttle settings where the ignition can be retarded to enable lean running without pinging. Optimising the maximum power is best done on a dyno and is an iterative process.


 

K75 details:

 

Specifics of the K75 so you get the real details.
The electrical plug of the motronic brain showing sensor connections.

Resistance readings of the fuel injection connector.



Pin NoResistance ohms to chaisedescription
1Not testedIgnition Pulses from ignition module
2580 - infinity with throttle raisedThrottle position switch; sense
3infinity Throttle position switch; supply?
4Not testedStarter relay
51Chaise
6No Pin
784=20°C,90 =12°C,Air temperature
8363Air flow
9561+ve supply
10>20k =20°C,1M5 =12°C,Engine Temperature
11No Pin
12561Injector output
131Chaise


Other pins not used.




Current System Inputs.

Current System Outputs

 

Current K75 ignition system:

 

The current ignition system uses the engine position sensors (2off, one at TDC cylinder 1, the other TDC cylinder 2) to calculate engine speed (period), the third cylinders TDC point and from this the ignition point of each cylinder. The sensor shield has 2 gaps - this can be used to find TDC of cylinder 3.
There is no TPS, vacuum advance ... just the equivalent of the old mechanical advance. The system does drive the 3 coils directly and has a wasted spark as the engine position sensors are on the crank shaft so the system cannot tell if this is a power stroke or an exhaust stroke.
The starter motor button position has an input, but what it does to the ignition system I don't know.
The specification is; Ignition timing 6 ° BTDC, advance starts at 1,300 rpm and goes to 30 ° BTDC (24 ° range) at 8,650 rpm, retarding starts at 8,777 rpm.

 

Current K75 EFI system:

 

The current EFI system uses the ignition system to obtain the engine speed (period), air mass sensor, air temperature sensor, engine temperature, TPS and the starter motor button position. The injectors all fire together 6 times per cycle? It does turn off the injection if the TPS sensor says the throttle is closed and the engine rpm is above 2,000. It also enriches the mixture 10% if the starter button is pressed (even if the engine is doing some speed). The TPS is only a switch to see if the throttle is closed. The air mass sensor is used to help set the fuel supplied. The starter motor is not allowed to be on if the motor is above 711 rpm.
The inlet valve opens at 5 ° BTDC and closes at 27 ° ATDC.
The exhaust valve opens at 28 ° BBDC and closes at 5 ° BTDC.
Fuel is shut off above 8,905 rpm.


 

New system Overview:

 

System inputs

System Outputs
The new system can check the fuel pump current for fuel blockage or leakage (over or under current).
The new system can check the cooling fan current for motor seasure or disconection (over or under current).
It will not let the starter motor be on if the motor is above 711 rpm. (same as old system)
It will signal faults by code to the error lamp (not just lighting it, but sending a code directly to the lamp).
It will use the warning lamp as a warning of temperature, fuel pump current, coolant fan current, battery voltage or position sensors outside the usual range.
It will use 2 engine position sensors but calculate one of the three if that goes faulty.
It will use default values for air pressure, temperature, Battery Voltage if these go outside the expected range.
Problem Areas.
It is not fault tolerant of the TPS sensor so this will need to be carried as a spare.
Similarly the engine temperature sensor should be carried to ease cold starts.
The brain itself could be duplicated within the same box, having duplicate connections on either end. If it fails the brain can be rotated to access the substitute brain.
The injectors, coils etc exist in 3s, so usually only one at a time fails leading to a limp to help possibility.
The engine position sensors are still on the crank shaft and cannot tell if it is a power of exhaust stroke, so the old wasted spark and 2nd injection are still present. If there is another air pressure sensor on one of the inlet track would be able to distinguish the inlet cycle. This would mean that the system can work with the standard bmw sensor plate in a limp home mode. The inlet air pressure sensor could be the same type as the one used for the air pressure, thus previding a spare if that fails.

 

The processor would need to have that many inputs and outputs, plus an RS232 port to communicate with an external computer. It also needs a number of timers to have events occur for required periods. The motorrola 68HC908GP32 looks to be the one to use and has been used in the MEGASQUIRT system -
I'd use a double sided board, to reduce costs, with one plane being the earth plane as much as possible. Use as much computational power as possible to reduce the component numbers (increasing reliability). Reduce clock speed to reduce RFI and heat (increased reliability). Use external components that are over rated for the job, thus reducing heat and increasing reliability.

I don't care about reliability to and from work (could take a Taxi), but when I am on holidays I want to stay on holidays and not work on the bike!
You can see a conflict in the reduction of clock speed (and a corresponding reduction in the number of calculations per second) and by doing as much as possible with in the CPU by software. The reduction in clock speed is of secondary importance.

 

New K75 Ignition system:

 

The new system will have available all the sensors of the fuel system, and shares the same processor! So the engine temperature, throttle position as well as speed can be used to optimise the timing for maximum economy and performance.
It can also distinguish between the cycles so the old wasted spark can be done away with - saving some energy, reducing the heat in both the coil and drive circuits.

 

New K75 Fuel system:

 

The new system is to use a TPS that is proportional to the throttle position and this and the engine speed are used to calculate the basic fuel supply, so the air mass sensor will be redundant!

 

Calculating engine speed/period:

 

The new system will use a timer to determine engine period. One timer is started at the last engine position sensor input. The timers' output is stored (and restarted) at the next engine position sensor input. At this point the identity of the sensors' cylinder is stored in a register, and compared with the previous sensors' cylinder.
If the cylinder numbers match then the timers' output should be divided by 3. [Two sensors faulty]!
If the cylinder numbers are two away from each other then the timers' output should be divided by 2 [one sensor faulty].
Otherwise the timers' output should stand [all OK].
Once this calculation is finished the sensor number is stored along with the calculation. The resulting timers' output is 60 ° of engine rotation.
The use of this for the next events assume that the engine is at a constant speed. What happens if the motor is accelerating or decelerating? The timing will be in error! Say the engine is at 1,000 rpm and accelerates linearly to 9,000 rpm in 2 seconds (ie the engine has no load). The engine period at 1,000 rpm is 60 milli seconds, at 9,000 rpm is 6.7 milli seconds. However the 3 sensors per revolution divide the periods by 3. So the engine sense period at 1,000 rpm is 20 milli seconds, at 9,000 rpm is 2.2 milli seconds. This results in the next sense period being 18.5 milliseconds, a change of 7% or 4.4 ° at the 60 degree point. A prediction based on the 2nd last engine period will reduce the error.
Say the last engine period was 20 milliseconds, the present one is 18.5 milliseconds, the next one should be 18.5 + (18.5 - 20) = 17 milliseconds. Should be close enough? By calculation 17.3, and error of 1.7% or 1 ° in 60. As this 1 ° erro could cause pinging maybe only take 0.8 the prediction = 18.5 + (18.5 - 20)* 0.8 = 17.3 milliseconds, probably close enough?
This assumes that the periods are sequential, ie all sensors working. If 2 sensors are not working then using the non predictive model (no acceleration/deceleration) the error at the 2nd failed sensor (120 °) would be around 4% or 3 °, could lead to some pinging. If the rate of change is less then the error is also less.
Cars have an easier job here with their mulitooth wheel giving shorter time between events thus engine speed changes don't amount to much error.

 

CPU Units to use:

 

The object here is to minimise the calculation time and errors. Any constants should be calculated before loading into the program, any offsets can similarly be calculated before loading into the program. Any free time that the CPU has should be devoted to checking for faulty sensors, displaying faults, calculation lower priority things like the temperatures, battery voltage etc.
The units to use within the program are those readily available, ie the ADC numbers directly from the analog sensors and the 60 ° time calculated above. The start of the injection of petrol and charging of the ignition coil should be taken from the sensor point and the timing clock run from the sensor. A complication is if a sensor or two is faulty then the timing number increases due to the non resetting of the timer by the faulty sensor.
The difficulty with starting is that you have no previous history of engine speed! Firstly the spark plug can be made to fire at least when the engine position says it is TDC time. Secondly the injectors can supply an initial fuel supply based on the temperature, throttle being closed and the starter motor being on. We could assume a minimum speed for the starter motor at this temperature and this should be a good guess. This would only occur at the first 120 ° or less of initial engine movement.

 

Determining Faulty sensors:

 

Apart from the determination of faulty engine position sensors as described above the other sensors are simply checked against the maximum and minimum expected values. These values can be conservative, or taken as an extreme value. Possibly both, using the warning lamp for the conservative value?
Another possibility exists comparing the present and previous values and checking for any rapid changes, if too rapid then a fault could be assumed?

 

Fuel Pressure and flow rates:

 

The standard K75 fuel pump flows over 1.5 litres per minute at about 30 psi (sorry about the mixed units - but these are the ones I understand). The fuel not injected into the motor is returned to the fuel tank by the pressure regulator that keeps the fuel pressure at 30 psi. If the fuel flow rate drops below about 1 litre per minute then the fuel becomes so hot when the fuel tank is low and the weather is warm that the fuel boils in the fuel rail to the injectors.
Both the fuel pump and filter are mounted in the fuel tank, I would prefer these components to be mounted outside the tank for servicing. The fuel does work as a heat sink for the pump, but at the cost of heating the fuel. Swings and roundabout.
The fuel pressure regulator takes its reference point from cylinder no 3 inlet port. If it becomes faulty then cylinder no 3 runs rich! I'd rather see this taken from atmosphere, this way then you may notice the fuel drops on the road after parking, leading to earlier detection of the fault? I'd also move the regulator out of the still air spot and into the same place as the fuel pump and filter.
I've had the fuel filter block up so much that the flow rate dropped below 1 litre per minute causing rough running due to over heated fuel. Monitoring the fuel pump current should enable this to be identified before it becomes a problem. This is why the new system monitors the fuel pump current. It can check that the fuel pump current is between certain bounds, if too low then either there is a leak, the pump has some contact resistance or the sensor is faulty. If too high then the filter could be blocked, the regulator is blocked, some other blockage exists or the sensor is faulty.

     Click on a topic, or scroll through.
Fuel Injection Pulse width    Fuel Injection Timing     Time for air to travel to cylinder     Time for fuel to travel to cylinder    
Ignition Timing     Coil 'ON' time     Advance time    
Determining the Factors    
K75 Details     Current K75 ignition system     Current K75 fuel system    
New system Overview     New K75 Ignition system     New K75 Fuel system     Calculating engine speed/period     CPU Units to use     Determining Faulty sensors     Fuel Pressure and flow rates    


See my other pages on K75 G/S

  • Making a K75 G/S (76k) March 2002 Some ideas on making a K 75 G/S.
  • A K75 G/S (45k) September 2002 What I got as a K 75 G/S.
  • Improving a K75 G/S.
  • Photos only of K75 G/Ses (93k) April 2002.
  • (45k) April 2002 Some improvements for a K 75 G/S
    Comments? all welcome just e-mail me at Yahoo.

    If you quote me I would like an acknowledgment. Dated 1 October 2002.

     

    Back to my home page