100% found this document useful (1 vote)
355 views6 pages

Injector PWM Modification

This document describes an electronic module that modifies the pulse width of signals controlling automobile fuel injectors. The module contains a PIC24F microcontroller that measures the width of input pulses from the engine control unit (ECU) using a timer capture function. It then generates output pulses of the same width multiplied by a gain factor set by a potentiometer. This allows increasing fuel injection for engines using fuel mixtures. The module provides electrical isolation and translates signal levels for compatibility with the ECU and injectors. Experimental results showed the module successfully modified pulse widths inside an automobile.

Uploaded by

pablo j vargas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
355 views6 pages

Injector PWM Modification

This document describes an electronic module that modifies the pulse width of signals controlling automobile fuel injectors. The module contains a PIC24F microcontroller that measures the width of input pulses from the engine control unit (ECU) using a timer capture function. It then generates output pulses of the same width multiplied by a gain factor set by a potentiometer. This allows increasing fuel injection for engines using fuel mixtures. The module provides electrical isolation and translates signal levels for compatibility with the ECU and injectors. Experimental results showed the module successfully modified pulse widths inside an automobile.

Uploaded by

pablo j vargas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Recent Researches in Circuits, Systems, Multimedia and Automatic Control

On using PIC24F microcontroller to modify the pulse


width of the signals which control electronic fuel injectors
GABRIEL VASIU and SEPTIMIU MISCHIE
Faculty of Electronics and Telecommunications
Politehnica University of Timisoara
Vasile Parvan 2, 300223 Timisoara
ROMANIA
[email protected], [email protected] http://www.etc.upt.ro

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.

Key-Words: - PIC Microcontroller, Timer, Interrupts, automobile, engine, injector.

1 Introduction proposed module can modify the pulse width in the


The engine control unit (ECU) of an automobile range 0.5-10, by means of a multi resolution
generates four PWM (Pulse Width Modulator) potentiometer. This value is displayed on a three-
signals to control the four electronic fuel injectors of digit display. The main component of our module is
the engine. During the pulse of the PWM signal, the a PIC24FJ32GA002 microcontroller. The module
voltage is applied to the injector’s solenoid and the was introduced inside the automobile and was tested
injector is opened to inject pressurized fuel into and good results have been obtained.
internal combustion engine. This time interval The paper is organized as follows. In section 2,
(called pulse width) is proportional to the amount of the hardware of the proposed module is presented.
the fuel desired. When the engine uses fuel In section 3, the software structure is presented.
mixtures, for instance alcohol with gasoline, the Experimental results are presented in Section 4
pulse width should be modified (increased, while the conclusions are drawn in Section 5.
especially) [1]-[3]. This increasing depends on the
ratio between the amounts of alcohol and gasoline. 2 The hardware structure of the
ECU of an automobile can increase the pulse width proposed module
by maximum 15% [4], but this is not enough. To The PWM signals which are generated by the ECU
allow a larger range, one possibility should be of an automobile have the following parameters: the
modifying the ECU software, but this is a difficult period, between 75 ms and 10 ms (these values
task. Therefore, a simpler solution is to design an correspond to the engine speed: 800 revolutions/
electronic module. This module must be inserted minute and 6000 revolutions/minute) and the
between the outputs of the ECU and the inputs of amplitude, about 12 V. The pulse width has values
the fuel injectors in such a way that the ECU is not between 2 ms and 10 ms, but this value depends on
damaged. The function of this module is to modify the period of the PWM signal, such the duty cycle
the pulse width of the four input signals by a gain has values in the range 0.05 to 0.2. The duty cycle
factor. Thus, the four output signals are generated represents the ratio between the pulse width and the
accordingly. There are modules which implement period. The ground reference of the PWM signals is
this function [5]. However these devices have some different to the ground reference of the DC 12 V
drawbacks: the increasing of the pulse width has a battery of the automobile. The solenoid of the
small range, 30-50% and this value can not be injector has the following electrical parameters: a
exactly known. resistance of 16 Ω and an inductance of 14 mH.
In this paper we present a new solution to modify The hardware structure of the proposed module
the pulse width of the PWM signals, which is was designed regarding the previously presented
designed to work inside an automobile. The parameters and is presented in Fig. 1. It can be seen

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.

Attenuator PIC24F Amplifier

To the four
Injectors
From the
ECU ×3
1.65 Power

Gain Display
Gain Selection

From the automobile’s battery


Fig. 1 The structure of the proposed module

Fig.2 The structure of the attenuator

ISBN: 978-1-61804-085-5 72
Recent Researches in Circuits, Systems, Multimedia and Automatic Control

Fig.3 The structure of the amplifier

The PWM signal generated by the PIC 3 The software structure


microcontroller is then applied to the amplifier The task of the software algorithm executed by the
block, Fig. 3. This block contains the transistor Q8, PIC24F microcontroller is to modify (increase or
which controls four circuits identically with that decrease) the pulse width of the PWM signal
presented in Fig.3. In this way, four identically generated by Attenuator block by a gain factor
output PWM signals are generated. Each of these between 0.5 and 10 which is chosen by the
four circuits contains an optocoupler and a power potentiometer. The new pulse must be generated by
transistor (U7 and Q7 in the first circuit, in Fig.3). one of the output pins of the PIC microcontroller.
In this way, an electrical isolation is accomplished The software also displays the gain factor on the 7
and the levels of the signal are translated from 0 V segment LED display. Two features of the PIC [6]
and 3.3 V to 0 V and 12V. The function of the Q8 is are used to allow the increasing of the pulse width:
to allow a sufficient current for the four LEDs of the input capture on rising (falling) edge and dual
optocouplers. The function of Q7 is to allow compare match mode with single output pulse.
generating the current of about 1 A which is The input capture interrupts are enabled all the
necessary to control the solenoid of the injector. time. Each time an input capture occurs, an interrupt
Transistors Q8 and Q7 performs the inversion of request is generated, but only one type of input
their input signals such the output PWM signal has capture (either on the rising edge or on the falling
the same phase like the input of amplifier block and edge) is enabled at a time.
the output of ECU. Both input capture and output compare use the
The Power block (Fig. 1) receives at its input the same time base, TMR2 [6]. The time interval when
DC 12 V from the battery of the automobile. This the input pulse is on the low level is measured using
block contains the following three circuits: a 5 V two values of TMR2: the first is captured on a
linear regulator, an isolated DC-DC converter (from falling edge of the input signal and the second is
5V to 5V) and a 3.3 V linear regulator. The last captured on the next rising edge. The Interrupt
voltage supplies the PIC24F microcontroller. Service Routine (ISR) determines which capture is
The designed electronic module has three ground enabled at the time of its execution and enables the
signals. First one, denoted GND1, connects the other type of edge for capture at its end.
ground of the four input signals with the second In order to generate the output signal, the Output
terminal of the four 18 Ω resistors. The second Compare Block has two registers, OC1R and
ground, denoted by GND2 is used for the PIC24F OC1RS. When the content of TMR2 matches the
microcontroller and is obtained using the DC-DC OC1R, the output pin is driven high. When the
converter of the Power block. The third one, GND3, content of TMR2 matches the OC1RS, the output
which is the ground of the DC 12 V battery of the pin is driven low.
automobile, is used to allow generating the output Each time a capture on a falling edge occurred, a
PWM signals. pulse whose width is equal with that of the previous

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.

Fig. 5 The module

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

You might also like