Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Development of Custom-made Engine Control

Unit for a Research Engine


Jeeva Ba*, Swapnil Awateb, Rajesh Jc, Arindrajit Chowdhuryd, Sreedhara Sheshadrie
Department of Mechanical Engineering, Indian Institute of Technology Bombay,
Email*: jeevmech@gmail.com, Ph: +917022359860.

Abstract according to the IEC1499 international standard.


In this paper, hardware development, software Gonzalez et al., [4] developed a simulation design of an
coding using embedded C programming language for an ECU for an Otto cycle engine with electronic fuel
Arduino ATMEGA microcontroller, calibration of injection using Simulink and state flow modules of
electronic control unit (ECU) was tested for a research MATLAB software.
engine to control the fuel injection flow rate with respect to ECU functions were developed for the following
the suction top dead center (TDC) of the engine. The system functions like spark advance control, pulse width
could control the fuel flow rate with a variable reluctance modulator (PWM) depending on throttle plate angle and
sensor, an Arduino microcontroller and a solenoid operated engine speeds, PWM depending on ambient air
injector in a closed loop domain with a varying pulse width temperature, closed loop control based on exhaust gas
modulator controlled exclusively by the engine operator. oxygen sensor, and fault tolerance for EGR sensor
The injection flow rates were measured and failure, cooling fan failure and fuel stoppage in case of
calibrated with the calculated fuel flow rates for different failure of speed and throttle sensors. Similarly Vijay et
equivalence ratios (Ø) of the engine. The results showed a al., [5] simulated an ECU for controlling the vehicle
very close match between the measured fuel flow rates after speed by actuating electronic fuel injector and provided
calibration and the calculated fuel flow rates at 1500 RPM. safety to the driver by avoiding the collision using infra-
The gasoline mass flow rate error was reduced from 40% to red sensor and deployment of the air bags using micro
3.25% by compensating the ON/OFF time of the pulse electro mechanical system (MEMS) accelerometer in the
width. case of emergency using adaptive cruise control (ACC)
system. Surapa et al., [6] explored the use of explicit-
Keywords: Pulse width modulation (PWM), Arduino state model checker [mc] square to verify and analyze the
microcontroller, variable reluctance sensor, solenoid embedded software for piezo controlled carburetor (PCC)
operated injector, equivalence ratio (Ø). system to improve the quality of the ECU software.
Vong et al., [7] implemented case based
I. Introduction and Background reasoning (CBR) for calibrating ECUs. With case based
All modern automotive engines are controlled by reasoning (CBR) and case based adaptation (CBA), the
an ECU. ECU calibration or tune-up significantly affects calibration of ECUs were enhanced with low cost and
the engine performance, combustion and emission lesser time for calibration instead of traditional methods
characteristics. Hosoda et al., [1] utilizing with trial error approach. Sarkar et al., [8] developed an
microcomputers, developed a universal control unit electronic control system for varying the fuel injection
(UCU), a data acquisition unit (DAU) and an engine timing and fuel flow rate for a port injected gasoline 3-
simulation unit (ESU) for an overall engine control cylinder engine for a 4-wheeler . However, many of the
development system. The system was versatile for testing details like controller details, algorithms, calibration were
hardware and software of engine control units. Yoshida not discussed. The carburetted 3- cylinder engine was
et al., [2] worked on the programming of ECU by C converted to a port injection engine with increase in
programming language by using 16 bit proprietary thermal and volumetric efficiencies and decrease in HC
microprocessor. Only the software architecture was and CO emissions. Manivannan et al., [9] developed an
defined by four layers, consisting of hardware definition ECU using dSPACE micro auto box controller with
layer, input/output layer, interrupt layer and application Simulink as a graphical programming language for a 2-
layer. The basic structure with generalized algorithm was wheeler engine. The 2-wheeler engine was converted
only published. While the programming algorithm and from carburettor design to a single cylinder port injection
ECU calibrations were not discussed. engine design with reductions in CO, HC, specific fuel
Glielmo et al., [3] proposed a hierarchical consumption and NOx.
structure for the tasks of the electronic control unit A. Motivation
comprising driver interpreter, engine controller and Port-injection HCCI engines are in the
actuator controller for a single cylinder engine designed developmental stages from last two decades. These

978-1-4799-6986-9/14/$31.00©2014 IEEE
research engines require an efficient yet simple engine program, as well as pulse width calculation methodology
control unit for operation in the homogeeneous charge for the specific engine.
compression ignition (HCCI) mode. Manny researchers A. ECU hardware design with w sensor, solenoid-
[10-24] demonstrated port- injection HCC CI for different injector interfaces
fuels like gasoline, diesel, di methoxy metthane (DMM), The camshaft was provided with
w a missing gear tooth
n-heptane, hydrogen, liquefied petroleum m gas (LPG), (50-1 toothed gear) to trigger thhe initiation of injection.
ethanol, di ethyl ether (DEE), iso -octane, aacetylene, pure To sense the longer delay perio od, a variable reluctance
bioethanol, wet ethanol, etc. (VR) sensor was in front of the tooothed gear used. Figure
From the literature surveyed, it is cclear that none 1 shows the schematic view of th he hardware components
of the studies published the entire devellopment of an with the arduino controller. The AC output of 1.2 V to 4
ECU from the initial stages to the final coompletion. The V from the VR-sensor was con nverted to a DC signal
previous researchers [10-24] who workked on port- using a LM741 preamplifier. Th he DC signal output with
injection HCCI engines did not explain thee ECU system positive and negative cycles is further filtered by a
in detail. Additionally, it was evident thhat researchers LM324 quad-operational amplifier. Only positive DC
were working exclusively on softwaree architecture, signal output cycles from the qu uad-operational amplifier
hierarchical architecture of ECU, univversal control are fed to the microcontroller. A reference voltage of 2.2
system development, ECU programming using C with V was set through the PCB moun nt trimmer potentiometer
microprocessor, simulation of ECU using state flow and (trim pot) as voltage divider.
Simulink modules of MATLAB sofftware, ECU The Arduino microcontrolleer requires a 5V supply
development using dSPACE controllerr for engine for operation which was provideed from a laptop through
application without focusing specially on aany algorithms a USB port. The output signal from the Arduino
and details of ECU hardware componennts. Hence an microcontroller is processed to o the Darlington driver
integration of all activities of developmentt of ECU for a which is a current amplifier that acts as a solenoid driver
simple control system is required for better understanding for the solenoid-operated injectoor. The other terminal of
of the control system. the solenoid injector is supplied with 12 V power supply
Although port-injection gasoline engines with from a regulated DC power source. Based on the
ECU have been used extensively in the few w decades, the different on times of off timees for the injector for
understanding of the development activitties of engine achieving different equivalen nce ratios of engine
control unit is still not clear for the researcch community. condition, the root mean squaree (RMS) voltage varies
ECU’s are typically used as black boxes inn practice with across the injector. Figure 2 showws the screen shot of the
no coding available for any modificationns for research circuit drawing for the hardwaare system using Eagle
activities. For research activities, one has tto test the fuel software.
injection duration, injection timing for new w design of fuel
injection system, at different process condditions for the
engine. In such cases the ECU has to be redesigned so
that the changes can be incorporated foor preliminary
testing and calibration in a laboratory. Heence a flexible
control unit is required for research enginess.
These factors motivated us to work in the
direction of developing an engine contrrol unit for a
gasoline port-injected HCCI engine.
B. Present work
The present work involves developm ment of an ECU
for varying the fuel flow rate by pulse widdth modulation
achieved by an Arduino micro-controllerr and the fuel
injection timing is triggered by the variaable reluctance
sensor connected to the engine camshaft.
II. Experimental set up
The ECU was tested and calibrated ussing a variable
reluctance sensor attached to the engine annd the resultant
injection behavior was tested independentlyy of the engine
at 1500 RPM. The ECU development comprises of
hardware design with the sensor- injectorr interface and
PCB drawings, software algorithm aand complete
Figure 1 ECU hardware design with
w sensor interfaces.
The Synchronization of injection setting timing ii. Algorithm for code
and the quantity of fuel injection was peerformed after A. Detect the highest time delay in the system and
detecting the longer delay period due to thee missing tooth inject the gasoline when n delay period is higher
and the fuel was injected at the suctionn TDC of the than the regular delay y period between two
engine cycle using Embedded C program foor the Arduino successive gear teeth.
micro-controller, the specifications for whhich are shown B. The total injection cyclee duration is 80 ms hence
in Table 1. pulse width modulation n is incorporated in the
code with ON time of 5 ms and OFF time of 75
ms.
iii. Program for the microcontrolller
Figure 3 shows the flow wchart for the program.
When the voltage is low (0V) and when i>25 in the
flowchart (higher delay period), the flag is set to 1. After
detection of the high voltage (5V V) at the raising edge of
the pulse width modulation, the flag
f is checked for flag=1
and then injection starts. Figuree 4 shows the complete
embedded C language program for the microcontroller.
The void set up ( ) comm mand in the Arduino
microcontroller ensures the entire while loop operates
continuously, therefore injectin ng the fuel from the
Figure 2 Circuit drawing for the hardware system
solenoid injector.
Table 1 Arduino AT mega microcontroller speecification

Sl. Description Deetails


No
1 Microcontroller ATmegga328
2 Operating Voltage 5V
3 Input Voltage 7-12V
(recommended)
4 Input Voltage (limits) 6-20V
5 Digital I/O Pins 14 (of which 6
providde
PWMM output)
6 Analog Input Pins 6
7 DC Current per I/O Pin 40 mAA
8 DC Current for 3.3V Pin 50 mAA
9 Flash Memory 32 KB
10 Static rom access memory 2 KB
(SRAM) (ATmeega328)
11 Electrically Erasable 1 KB
Programmable Read-Only (ATmeega328)
Memory EEPROM
12 Clock Speed 16 MH
Hz

m
B. Software algorithm, flowchart program

i. Objective of the coding


A. To inject gasoline at suction TD DC with signal Figure 3 Flow chart forr the program
from VR sensor (i.e. to sense thee point in time
with higher time delay in the misssing gear tooth C. Pulse width calculation meth
hodology for the engine.
when the engine is in operation).
B. 80 ms is the duration cycle at 15000 RPM, hence The fuel-air equivalence ratio is defined by ‘Ø’ and was
after detection of gasoline injection the injection calculated using (1)
should be ON for 5 ms and OFF for 75 ms for
A
achieving an equivalence ratio of 00.1. Ø (1)
S
C. Only gasoline flow variation and fixed point of
injection is to be considered.
The stoichiometric fuel to air ratio for gasoline is 14.7. A. VR sensor output characteristiics
With the mass flow rate of air (ma) beingg 7.2 *10-3kg/s Figure 5 shows the AC C signal output of the
and simulating the calculations for differennt equivalence variable reluctance sensor from the 50-1 toothed gear. 4
ratio (Ø), actual air-fuel ratio was obtained. By V AC voltage was detected fro om the sensor for 1500
converting the mass flow rate of air and ffuel to suction RPM speed of the engine.
strokes of the 4-stroke engine, mass flow rrate of the fuel
was obtained in (kg/suction strokes). With the mass flow
rate of fuel in kg/s and mass flow rate of fuuel (kg/suction
strokes) the ON time of the injection timingg was obtained
in milliseconds. With the 4-stroke engine ruunning at 1500
rpm, 80 ms is the total duration of a singlee cycle. Hence
ON/OFF time values were simulated for ddifferent fuel–
air equivalence ratio (Ø) based on this concept. The
ON/OFF time must be implemented maanually in the
program for obtaining required operatinng range with
respect to Ø for the research engine.

Figure 5 Variable reluctancce sensor output


(Voltage Vs. tiime)
B. Synchronization of signal condditioned VR sensor
signal output and PWM signal off the microcontroller
From the VR signal output, the AC signal is
converted to a square pulse signal which has several
square pulses separated by equaal delays, with a longer
delay period in the signal whicch signifies the missing
gear tooth. The pulse width modu ulation is a square pulsed
signal from the microcontroller. Both the signals needed
to be synchronized to initiate thee injection of the fuel at
suction TDC. Hence the synchro onization has to be done
from the end point of zero leveel voltage (longer delay
period) of the signal condition ned VR signal with the
rising edge of the PWM signal. This synchronization is
done by using flag=1 in the proggram. Figure 6 shows the
synchronized signal of the PWM M output (top side) and
VR sensor signal (below).

Figure 4 Embedded program for ECU devellopment

III. Results and discussion


Based on the developments of the ECU, the
results section consists of VR seensor output
characteristics, synchronization between pulse width
modulations provided to injector and signal conditioned
Figure 6 synchronization of signal condittioned VR sensor and PWM of
VR sensor output, and calibration of ECU. microcontroller (Voltage Vs. time)
Table 3 Calibrated gasoline flow raate (ON/OFF) calculation
C. Calibration of ECU Ø ON/ Injector Caal. Meas. Error
Gasoline fuel flow rate was measureed by filling a OFF Voltage flo
ow flow (%)
duration (V) (E
E-6* (E-6*
graduated cylinder up to 10 ml with a consttant voltage of kgg/s) kg/s)
12 V supplied by a DC power supply byy operating the
engine with diesel fuel at 1500 RPM. Onnly the suction 0.1 5/75 0.31 37
7 35.8 3.25
TDC point was sensed and flow rate w was measured
0.2 11/69 0.87 73.9 71.8 2.90
outside the engine, while being operated iin diesel mode
of operation. Table 2 shows the gasolinne flow rates 0.3 16/64 1.29 111 110 0.65
injected through ECU with the measured vaalues deviating
0.4 22/58 1.8 14
48 152 -2.66
significantly from the calculated values. The deviation
was more severe for increasing equivalencce ratio. Hence 0.5 27/53 2.22 18
85 183 1.03
the ON/OFF time was corrected to reduuce the error.
Table 3 shows the gasoline flow ratte with ECU
IV. Conclusion
calibration.
The hardware -based desiggn of an ECU developed
Table 2 and Table 3 show the voltage value
in this work is able to achieve fuel flow variation with
available at the injector vary with respecct to the pulse
fixed fuel injection timing and for
f constant air flow rate
width modulation ON/OFF time whichh is a very
conditions. An Arduino ATMEG GA microcontroller was
significant factor for calibration of ECU. F
Figure 7 shows
used for pulse width modulation. This portable system is
the flow rates comparison of measuredd (Meas.) and
applied for research purpose. Thee ECU was calibrated by
calculated (Cal.) cases, for both caalibrated and
compensating the ON/OFF tim me of the pulse width
uncalibrated scenarios. It is evident that the calibrated
modulation at 1500 RPM of th he engine within 3.25%
mass flow rates are in good agreem ment with the
error margin.
calculated mass flow rates.
Acknowledgements
The present research work is funded by
Department of Science and Techn nology (DST), India.
The Authors are grateful to Mr Katta
K Sudheer and Mr. R.
Arumuga Nainar for their supporrt.

References
1. H. Hosoda, K. Ohtsuka and H. Sh himomura, “A Microcomputer-
based system for electronic engin ne control unit development”,
IEEE Transactions on Industrial Electronics,
E Vol. IE-30, No. 2,
May 1983, PP 96-102.
2. M. Yoshida, O. Tada, and J. Haashime, “Programming of the
engine control unit by the c language”, SAE paper No.
SAE960047, 1996, PP 1-6.
Figure 7 ECU calibration for gasoline mass fflow rate 3. L. Glielmo, F. Vasca and C. Rosssi, “Architecture for electronic
control unit tasks in automotive enngine control”, Proceedings of
Table 2 Gasoline flow rates without ECU caalibration 2000 IEEE International Symposium m on Computer-Aided Control
Ø ON/ Injector Cal. Meaas. Error System Design, Anchorage, Alaska, USA, September 25-27, 2000,
OFF voltage flow flow (%)
PP 42-47.
duration (V) (E-6* (E-6*
kg/s) kg//s) 4. G. Gonzalez, J. A. Florez and S. Arab, “Development of the
management strategies of the ECU U for an internal combustion
0.1 3/77 0.21 37 25.3 31.42
engine computer simulation”, Mechanical Systems and Signal
0.2 6/74 0.45 73.9 45.6 38.33 Processing Vol22, 2008, PP 1356–1373.
5. E .V. Vijay , C .V .R. Rao , E. V. Kumar and G. N. Swamy,
0.3 9/71 0.70 111 64.9 41.41
"Electronic control unit for an adap
ptive cruise control system and
0.4 12/68 0.98 148 85.4 42.24 engine management system in a vehicle using electronic fuel
injection", 2010 IEEE Internation nal Conference on Emerging
0.5 15/65 1.25 185 1004 43.49
Trends in Robotics Communication n Technologies (INTERACT),
INSPEC Accession Number: 11822 2592, Chennai, India, 3-5 Dec.
2010, PP 143-146.
6. R. Surapa and S. Grobosch, “Model checking and Verification 21. Megaritis, D. Yap and M. L. Wyszynski, “Effect of water blending
Method of Engine Control Units”, 2011 5th Malaysian Conference on bioethanol HCCI combustion with forced induction residual
in Software Engineering (MySEC), 13-14 Dec, 2011, PP 183-188. gas trapping”, Energy, Vol 32, 2007, PP 2396–2400.
7. Vong and P. Wong, “Case-based adaptation for automotive engine 22. J.H. Mack, S.M. Aceves and R.W. Dibble, “Demonstrating direct
electronic control unit calibration”, Expert Systems with use of wet ethanol in a homogeneous charge compression ignition
Applications Vol 37, 2010, PP 3184–3194. (HCCI) engine”, Energy Vol 34, 2009, PP 782–787.
8. S. K. Sarkar, P.V. Manivannan and A. Ramesh, “An Electronically 23. S. Swami Nathan, J.M. Mallikarjuna and A. Ramesh, “Effects of
controlled system for parametric studies on fuel injection in an charge temperature and exhaust gas re-circulation on combustion
automotive gasoline engine”, SAE INDIA 0301002, Proceedings and emission characteristics of an acetylene fuelled HCCI engine”,
of the First National Conference on Automotive Infotronics, 2003. Fuel, Vol 89, 2010, PP 515–521.
9. P .V. Manivannan, C. Paul and A. Ramesh, “Development of a 24. R.K. Maurya and A.K. Agarwal, “Experimental study of
system for control of air fuel ratio in a small two wheeler engine”, combustion and emission characteristics of ethanol fuelled port
SAE paper No. 2008 - 28 – 0054, 2008, PP 375-381. injected homogeneous charge compression ignition (HCCI)
10. T. W. Ryan III and T.J. Callahan, “Homogeneous charge combustion engine”, Applied Energy Vol 88, 2011, PP 1169–
compression ignition of diesel fuel”, SAE Paper No. 961160, PP 1180.
928-937.
11. C.S. Lee, K.H. Lee and D. S. Kim, “Experimental and numerical
study on the combustion characteristics of partially premixed
charge compression ignition engine with dual fuel”, Fuel, Vol 82,
2003, PP 553–560.
12. J. Fang, Z. Huang, X. Qiao, Y.Z. Hong and J. Song, “Study on a
pre-mixed charge compression ignition engine by
dimethoxymethane port injection” Proceedings of the Institution of
Mechanical Engineers, Part D: Journal of Automobile
Engineering, Vol 218, 2004, PP 549-555.
13. D.S. Kim, M.Y. Kim and C.S. Lee, “Combustion and emission
characteristics of partial homogeneous charge compression
ignition engine”, Combustion Science and Technology, Vol
177:1, 2005, PP 107-125.
14. K. Yeom, J. Jang and C. Bae, “Homogeneous charge compression
ignition of LPG and gasoline using variable valve timing in an
engine”, Fuel, Vol 86, 2007, PP 494–503.
15. J.M.G. Antunes, R. Mikalsen and A.P. Roskilly, “An investigation
of hydrogen-fuelled HCCI engine performance and operation”,
International Journal of Hydrogen Energy, Vol 33, 2008, PP
5823–5828.
16. J. Ma, X. Lu, L. Ji, Z. Huang, “An experimental study of HCCI-DI
combustion emissions in a diesel engine with dual fuel”,
International Journal of Thermal Sciences, Vol 47, 2008, PP
1235–1242.
17. Ganesh, G. Nagarajan and M.M. Ibrahim, “Study of performance,
combustion and emission characteristics of diesel homogeneous
charge compression ignition (HCCI) combustion with external
mixture formation”, Fuel, Vol 87, 2008, PP 3497–3503.
18. Cinar, O. Can, F. Sahin and H.S. Yucesu, “Effects of premixed
diethyl ether (DEE) on combustion and exhaust emissions in a
HCCI-DI diesel engine”, Applied Thermal Engineering, Vol 30,
2010, PP 360–365.
19. Yang, Z. Wang, J.X. Wang and S.X. Shuai, “Experimental study
of fuel stratification for HCCI high load extension”, Applied
Energy, Vol 88, 2011, PP 2949–2954.
20. B. Bahri, A.A. Aziz, M. Shahbakhti and M.F.M. Said,
“Understanding and detecting misfire in an HCCI engine fuelled
with ethanol”, Applied Energy Vol 108, 2013, PP 24–33.

You might also like