Injector PWM Modification
Injector PWM Modification
Abstract: - The paper presents the hardware and the software structure of an electronic module which is used
inside of an automobile. The function of this module is to modify the pulse width for each of the four PWM
signals which control the fuel injectors. This facility is used to increase the amount of injected fuel when the
engine uses fuel mixtures. The most important element of this module is the PIC24FJ32GA002 microcontroller.
Experimental results that prove the functionality of the designed module in the laboratory and inside the
automobile are presented.
ISBN: 978-1-61804-085-5 71
Recent Researches in Circuits, Systems, Multimedia and Automatic Control
that the module has four inputs and four outputs. However, the reference ground of the attenuator’s
The four PWM signals from ECU are applied to the output signal is fixed by the DC-DC converter from
four inputs while the four outputs are applied to the Power block, how will be presented in one of the
four injectors. The module is powered by DC 12 V following paragraphs. Furthermore, the attenuator
battery in the automobile. inverts the PWM signal, that is, when the input is
Because all the four injectors are opened at the low, the output is high and reverse. Because the
same time, it follows that the four input PWM attenuator contains a 18 Ω resistor connected to the
signals are identically. Therefore, only one of them ground, the ECU has the same load on each of its
is used to further processing. Each of the other three four outputs.
is connected to the ground by one 18 Ω resistor, see The PIC24F microcontroller measures the time
Fig. 1. This value was chosen regarding the interval when the signal received from the
impedance of an injector. In this way, the ECU has attenuator is on the low level. For this purpose, the
the same load like prior to the introducing of this capture function of the Timer module is used. Then,
module. The function of the attenuator block, Fig. 2 using the output compare function of the same
is to reduce the amplitude of the PWM signal, where Timer, the PIC24F microcontroller generates a
the low level is 0 V and the high level is 12 V, to the PWM signal whose width of the high level is equal
levels 0 V and 3.3 V which are accepted by the PIC with that previously measured, multiplied by a gain.
microcontroller. This attenuator also contains an This gain factor is proportional with the DC value
optocoupler, U4 in Fig. 2. In this way an electrical established by the potentiometer in Gain Selection
isolation between the high amplitude signal from the block and is presented on the Gain Display block,
ECU and the PIC microcontroller is accomplished. Fig. 1.
To the four
Injectors
From the
ECU ×3
1.65 Power
Gain Display
Gain Selection
ISBN: 978-1-61804-085-5 72
Recent Researches in Circuits, Systems, Multimedia and Automatic Control
ISBN: 978-1-61804-085-5 73
Recent Researches in Circuits, Systems, Multimedia and Automatic Control
measured pulse, multiplied by the gain, is generated. Display();}// Display the gain
Fig. 4 presents this idea, where N1, N2 N3 and N4 } // The end of the infinite loop
represent four successive captured values and W } //The end of the Main Program
the pulse width. It can be seen that actually the
rising edge of the output signal has a short delay in The structure of the ISR:
comparison with the input signal. This delay is {
equal with 5 periods of TMR2 and is necessary to Clear the Input Capture Interrupt Flag
allow the first instructions of the ISR to be executed If Interrupt on the falling edge is enabled:
(that part of the ISR which is executed when the {Fall_edge=IC1BUF;
interrupts on the falling edge are enabled). Thus, New_Pulse_width=Pulse_width×gain;
when the instruction OC1CON=0x0004, which OC1R=Fall_edge+5;
enables generating the output signal is executed, the OC1RS=OC1R+New_Pulse_width;
current content of the time base TMR2 have to be OC1CON=0x0004; //Enable to generate the output
lower than the content of the OC1R register. signal
The DC value which imposes the gain is IC1CON=0x83;//Enable Input Capture on Rising
measured by ADC module of the PIC24F. Edge
The basic structure of the main program and the }
ISR are presented in the following: If interrupt on the rising edge is enabled:
The Main Program {Ris_edge=IC1BUF;
{Enable pin RP7 as channel 1Input Capture Pulse_width=Ris_Edge– Fall_edge;
Enable pin RP15 as channel 1 Output Compare If Pulse_width<0, Pulse_width = Pulse_width +
Enable Input Capture Interrupts 65536; // Correction the result if an overflow has
Enable Captures on the falling edge on channel 1 occured
Initialize ADC module IC1CON=0x82;//Enable Input Capture on Falling
Edge
Infinite Loop }
{ADC_result=ADC1_Get_Sample(2); //the decimal }
10-bit result of analog to digital conversion
gain=0.5+((float)ADC_result/100);
TMR2
values
OC1RS
N4
OC1R
N3
N2
N1
time
IC1 pin
W=N2–N1 W=N4–N3
time
OC1 pin
gain×W
time
OC1R=N3+5; OC1RS=OC1R+ gain×W
Fig.4 The principle of modifying the pulse width
ISBN: 978-1-61804-085-5 74
Recent Researches in Circuits, Systems, Multimedia and Automatic Control
4 Experimental Results
The following steps were performed to implement
and test our module:
1. Simulation and validation of the hardware and
software structures using the MikroC and Proteus
environments.
2. Design the Printed Circuit Board (PCB) for the
hardware structure using the Orcad environment.
3. Execute the PCB and soldering the components.
The finished module is presented in Fig.5.
4. Download the executable code obtained using the
MikroC environment into the Flash Memory of the
PIC microcontroller by using the PIC Kit2
Emulation Programmer.
The obtained module was first tested in the Fig. 6 The input and output signals
laboratory. For this purpose a Hameg HM8131
Function Generator was used in “pulse” function to
apply the input signal. Then, the four output signals
were visualized using a Tektronix TDS210
Oscilloscope. These measurements were performed
for different values of the factor. The input signal
had the period in the range 10-75 ms and the duty
cycle in the range 0.05-0.2. The results were as
expected, that is the output signals had their pulse
width multiplied by the gain factor.
The second test was performed inside the
automobile. The module was connected as in the
Fig. 1. That is, the cables which connect the four
outputs of the ECU to the four injectors were
disconnected and were connected to the inputs of
our module. Then, the cables from the four outputs Fig. 7 A detail from the signals from Fig.4
of our module were connected to the four injectors.
Also the power of the module was connected to the of the four input signals and one of the four output
DC 12 V battery of the automobile. The gain was signals for different values of the gain. Fig. 6 and 7
adjusted to value 1. Then, the key of the automobile presents two captures of the oscilloscope screen. It
was connected. The first sign about the functionality can be seen a gain of about 1.3 in the width of the
of the module was the fact that the engine worked as pulses. The negative peaks are caused by the
before our module was connected. That is, the noise inductive reactance of the injectors.
of the engine was the same. Then we visualized one
5. Conclusions
This paper presents an electronic module which is
used to enhance injection timings of the fuel system
of an automobile. The gain which multiplies the
pulse width can be adjusted by a potentiometer and
is presented on a display. The module was tested
inside the automobile and worked as expected. As a
future work, the gain should be automatically
established by a suitable algorithm depending on
some parameters like the temperature of the engine
or the amount of oxygen in the exhaust.
ISBN: 978-1-61804-085-5 75
Recent Researches in Circuits, Systems, Multimedia and Automatic Control
References:
[1] O. Volpato, Termal Modeling of Heated [4] A. Irimescu, Fuel conversion efficiency of a
Injectors, SAE Techical Papers, port injection engine fuelled with gasoline-
http://papers.sae.org/2011-36-0087, april 2011 isobutanol blends, Energy, volume 36, No. 5,
[2] A. White, J. Choi, R. Nagamune, G. Zhu, May 2011, pp. 3030-3035.
Gain-scheduling control of port-fuel-injection [5] http://www.alcoflex.com.br/alcoflex1/alcoflex_
processes, Control Engineering Practice, ingles/recomenda.htm
volume 19, no. 4, april 2011, pp 380-394. [6] *** PIC24FJ32GA004 Family Data Sheet,
[3] D. Snyder, G. Adi, M. Bunce, C. Satkoski and www.microchip.com
G. Shaver, Fuel blend fraction estimation for [7] R. Gaonkar, The Fundamentals of
fuel-flexible combustion control: Uncertainty Microcontrollers and Applications in
analysis, Control Engineering Practice, volume Embedded Systems with PIC, Delmar Thomson
18, no.4, April 2010, pp. 418-432. Learning, 2007
ISBN: 978-1-61804-085-5 76