0% found this document useful (0 votes)
5 views

Arduino-Based Automotive Diagnostic Tester

This document presents an Arduino-based automotive diagnostic tester that connects to the Engine Control Unit (ECU) via the OBDII port, utilizing a Bluetooth module for data transmission to an LCD display. The system captures and displays various vehicle parameters, allowing for error detection and rectification through comparison with stored values in the ECU. The implementation includes components like the Arduino Uno, Bluetooth HC-05, and ELM327 adapter, with practical tests conducted on different vehicle models to validate the system's performance.

Uploaded by

Ahmed Elewa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Arduino-Based Automotive Diagnostic Tester

This document presents an Arduino-based automotive diagnostic tester that connects to the Engine Control Unit (ECU) via the OBDII port, utilizing a Bluetooth module for data transmission to an LCD display. The system captures and displays various vehicle parameters, allowing for error detection and rectification through comparison with stored values in the ECU. The implementation includes components like the Arduino Uno, Bluetooth HC-05, and ELM327 adapter, with practical tests conducted on different vehicle models to validate the system's performance.

Uploaded by

Ahmed Elewa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

DOI: 10.

2478/sbeef-2024-0006

ARDUINO-BASED AUTOMOTIVE DIAGNOSTIC TESTER

A.A. MARIN, G. PREDUȘCĂ, C. STĂNESCU


Valahia University of Targoviste, Faculty of Electrical Engineering, Electronics, and Information Technology
E-mail: [email protected], [email protected], [email protected]

Abstract. The work presented introduces a system that operational principles align with the 'IPO - Introduction
encompasses general notions about the dashboard computer Processing Cutting' principle [1].
and Arduino platform, used to create an automotive
diagnostic tool through the OBDII port. This involves To capture values, the ECU relies on sensors measuring
establishing a connection between the Arduino platform, a
Bluetooth module, and a Bluetooth adapter that
variables such as speed, pressure, temperature, etc. These
communicates with the Engine Control Unit (ECU), values are then either calculated or compared with stored
transmitting information displayed on an LCD screen. To values within the electronic control unit. If the measured
highlight the system's performance, a comparison of results values deviate, the command centre adjusts them through
was conducted with an authorized automotive tester from an a physical process, ensuring synchronization with the
auto service, using two different vehicle models. values stored in the ECU (refer to Figure 2).

Keywords: Arduino, ELM327, HC-05, ECU, OBDII, Launch


Tech Tester

1. DASHBOARD COMPUTER OR ELECTRONIC


CONTROL UNIT (ECU)

The Electronic Control Unit, also known as the ECU or


dashboard computer, acts as a central command hub,
overseeing specific control and command functions
where needed. Widely applied in automotive electronics,
it governs the electronic steering of vehicles, industrial
installations, and various other applications. Its primary
role lies in the precise control of ignition in vehicle
engines (see Figure 1).

Figure 2. The sensors from which the dashboard computer


receives information.

Modern ECUs boast embedded intelligence, effectively


functioning as a separate computer in the form of an
embedded system. The size of this computer varies based
on the complexity of its tasks, ranging from a
microprocessor-based integrated circuit to a
multifunctional system with graphic production
capabilities [2].

The dashboard computer can connect to specific interface


systems such as Controller Area Network (CAN), Local
Figure 1. Electronic Control Unit Interconnect Network (LIN), Flex Ray, and MOST
(Media Oriented Systems Transport). Through these
Originally introduced in internal combustion engines, it interfaces, connections to On-Board Diagnostics (OBD)
progressively replaced mechanical control systems. Since can be established, allowing the dashboard computer to
1987, this dashboard computer has found utility in diesel exchange information regarding the vehicle's status and
engines as well. operating conditions (refer to Figure 3).

In the automotive domain, ECUs are essential not only


for engine ignition but also for critical functions like
starting systems, climate control, cruise control, anti-lock
braking systems (ABS), airbag control, and more. Its

31
Scientific Bulletin of the Electrical Engineering Faculty – Year 24 No.1 (50) ISSN 2286-2455

Figure 4. Bluetooth module HC05

Some technical features of the HC-05 module include:


• Bluetooth V2.0 operation.
Figure 3. Connecting the dashboard computer through • ZS-040 baseboard.
OBD to an automotive tester.
• Operates in Master or Slave mode.
• Power: 3,6-6V [6].
OBD can identify errors recorded by the dashboard
computer or errors indicated by certain linked sensors.
2.3 Bluetooth Adapter OBDII ELM327
This capability facilitates error rectification or the
replacement of defective sensors to ensure the proper
It is a scanner reader for car diagnostics, compatible with
functioning of the vehicle [3-4].
iOS, Android, Windows, and Linux (see Figure 5).
2. DESCRIPTION OF EQUIPMENT USED IN
THE PRACTICAL IMPLEMENTATION

2.1 Arduino Uno R3 Mini Platform

The Arduino Uno R3 is a microcontroller board based on


the ATmega328 and compatible with Arduino Uno. It Figure 5. Bluetooth Adapter OBDII ELM327
features 14 digital I/O pins, 6 analog inputs, a 12 MHz
crystal oscillator, a USB connection, a power jack, and a It is very easy to set up: connect the device to the car's
reset button. It contains everything needed to support the OBD2 port, start the vehicle, activate Bluetooth on the
microcontroller; simply connect it to a computer using a phone, computer, or tablet, search for the OBD2 device,
Mini USB cable or power it with an AC-DC adapter or and pair it (using pin 1234 or 0000). Run the
battery to get started (not supplied). downloaded application on the device and wait for a
successful connection to the car's Engine Control Unit
Some technical specifications of this platform include: (ECU). It works with all OBDII vehicles (from 1996
• Recommended input voltage range: 7V to 12V. onward) and EOBD vehicles (gasoline cars from 2001
• Flash memory: 32 KB. onward) as well as diesel cars from 2003/2004 in
• Continuous current per I/O pin: 40 mA. Europe.
• SRAM: 2KB.
To use this ELM327 device, you need a suitable
• EEPROM: 1KB.
application that can be downloaded from the Android or
• Mini USB to serial CH340G [5].
iOS app store [7].
2.2 Bluetooth Module HC-05
2.4 Launch Tech Tester
The HC-05 (ZS-040) is a serial-to-Bluetooth module that
The Launch X431 Euro Pro 5 Lite is a professional
enables wireless communication between two
diagnostic device (see Figure 6) based on the latest
microcontrollers or between a microcontroller and a
Android version.
Bluetooth-enabled Android phone, laptop, or desktop,
facilitating Bluetooth connectivity. The HC-05 (ZS-040)
can be used as both a slave and a master device (see
Figure 4).

Bluetooth is designed for short-range point-to-point


wireless communication. The maximum range is
typically around 9 meters and may be shorter depending
on obstacles.

Figure 6. Launch Tech Tester

32
Scientific Bulletin of the Electrical Engineering Faculty – Year 24 No.1 (50) ISSN 2286-2455

Some functions of the Launch X431 V4.0 automotive 3. SIMULATION AND IMPLEMENTATION OF
tester include: THE PROPOSED SYSTEM
• Brake reset.
• Service/oil light reset. 3.1 Simulation
• Steering angle.
• TPMS reset. The Proteus Design Suite is a software tool suite
• DPF regeneration. primarily used for automating electronic design. The
• Adaptive Front Light System (AFS) reset. software is mainly employed by engineers and
technicians in electronic design to create electronic
• Crankshaft position finding.
schematics used in the fabrication of printed circuit
• Automatic gearbox adaptation.
boards. More recently, a dedicated IDE for simulation
• Immobilizer.
was added in 2011, and MCAD import/export was
• Injector coding. included in 2015. High-speed design support was added
• Throttle reset. in 2017. Product feature releases are typically biannual,
• Suspension height adjustment, etc. while maintenance-based service packs are released as
needed [10].
Diagnostic Trouble Codes (DTCs) are clearly displayed
with a comprehensive description, and with a single The proposed circuit designed for implementation and
click, error code information can be shown in various analysis is depicted in Figure 8.
alternate languages.

Technical specifications of the X431 V4.0 automotive


tester include:
• WiFi-Fi and Bluetooth V5.0.
• Full live data functions.
• Numerous reset and service functions.
• CPU: 1.8GHz with 8 cores.
• Internal memory: 3 GB.
• Storage: 32 GB with a 32 GB micro-SD card.
• Display: 10.1 1920X1200 IPS full HD.
• WiFi-Fi: 2,4 and 5 GHz.
• PRO 5 model diagnostic connector.
• Voltage: 12V – 18V [8].
Figure 8. Connecting the Components
2.7 LCD Display 1602 IIC/I2C
The circuit testing is performed as follows: we write the
The blue LCD1602 I2C 16x2 LCD screen provides a 16- code in the Arduino IDE for the Arduino platform.
character by 2-line LCD with an I2C interface for easy Partial code can be found in Figure 9.
control by a microcontroller (see Figure 7).

The display features a blue backlight and white


characters. Each character is composed of a 5 x 8 dot
matrix for a clear representation of characters. The
backlight includes a potentiometer for adjusting the
display contrast for optimal viewing. If the potentiometer
is turned too far in one direction or the other, the display
may appear blank, or solid squares may appear instead of
characters [9].

Figure 9. The Arduino codes.

Figure 7. LCD Display 1602 IIC/I2C

33
Scientific Bulletin of the Electrical Engineering Faculty – Year 24 No.1 (50) ISSN 2286-2455

We need to program the Arduino platform with this code Case 2 – If the temperature sensor detects over 90
by selecting and uploading the file with the extension degrees Celsius, the oil pressure sensor detects over 90
.ino.hex (see Figure 10): pounds per square inch (psi), and the water level sensor
indicates that the water level is 'Empty,' then the LCD
will display 'High Oil Pressure,' 'High Water
Temperature,' 'Water Level: Empty.' LEDs D1 (for the
temperature sensor), D2 (for the oil pressure sensor), and
D3 (for the water level sensor) will be turned on, as all
sensors detect abnormal parameters. This is evident in
Figures 13 and 14:

Figure 10. Arduino platform programming

The analysis was conducted for two cases:

Case 1 – When the temperature sensor detects 90


degrees Celsius, the oil pressure sensor detects 90
pounds per square inch (psi), and the water level sensor
indicates that the water level is "At Level," then the LCD
will display "Normal Oil Pressure," "Normal Water
Temperature," "Water Level: At Level." LEDs D1 (for
the temperature sensor), D2 (for the oil pressure sensor),
and D3 (for the water level sensor) will be turned off
since all sensors detect normal parameters. This can be
observed in Figures 11 and 12: Figure 13. System simulation – case 2

Figure 11. System simulation – case 1 Figure 14. System simulation – case 2

In this case, both the water level sensor and the water
temperature sensor could have the same issue, as the
water tank being empty would cause the water
temperature to rise. This problem can be addressed by
filling the water tank and checking the pipes and hoses to
prevent future liquid (water) losses.

The oil pressure sensor indicating high pressure could be


due to various reasons:
- Defective pressure relief valve (The role of the
pressure relief valve is to prevent damage to pipes
and vessels due to high pressure. If the oil pressure
is not at the recommended level after driving the
car, there is a high chance that the issue is related to
Figure 12. System simulation – case 1 the pressure relief valve).

34
Scientific Bulletin of the Electrical Engineering Faculty – Year 24 No.1 (50) ISSN 2286-2455

- Poor-quality oil (Another reason for inadequate oil Case 1 – testing with the implemented system. System
pressure could be the use of very low-quality initialization and the cars are with the engine off (data
engine oil). reading in cold conditions with the ignition on, see
- Contaminated oil filter (The oil filter is crucial, Figures 17-20):
ensuring that clean oil reaches the engine. Over
time, the oil filter can become dirty, with dust
depositing on it, causing a decrease in the quality of
oil reaching the engine. Therefore, the issue could
be related to the oil filter).

3.2 Arduino

Arduino, a company renowned for its microcontroller-


based development boards, also offers the accompanying
software for programming and operation. These boards
feature powerful microcontrollers ready for
programming, acting as intermediaries between personal
computers and various sensors. Programming is
Figure 17. Data acquisitions from a Peugeot car
facilitated using the C and C++ languages through a
standardized API known as the Arduino language.
ATZ – It is an identification command (performs device
Derived from the Processing language, this language
reset and returns the ELM327 identification).
uses a modified version of the Processing IDE. In
Parameter IDs – These are codes used to request data
addition to traditional compiler toolchains, Arduino
from a vehicle, serving as diagnostic tools, and they are
provides a user-friendly IDE and a command-line tool
as follows:
developed in Go [3-4, 11-14].
• 0100 – is a command for connecting the ELM327
to the ECU (essentially, if the response to the 0100
3.3 Implementation of the Proposed System
command is 0100, then we know that the ELM327
has connected to the ECU, and we can
The proposed and implemented system consists of the
communicate with it. If there is no response to the
following components: Arduino UNO platform, HC-05
0100 command, then we know that the ELM327
Modules, ELM327 adapter, I2C_LCD 16002 display
cannot connect to the ECU).
(see Figure 15).
• 0105 – is a command to request data from the
vehicle (the response to this command is the engine
coolant temperature).
• 0104 – is a command to request data from the
vehicle (the response to this command is the engine
load).
• 010B – is a command to request data from the
vehicle (the response to this command is the intake
pressure).
• 010C – is a command to request data from the
vehicle (the response to this command is the engine
Figure 15. Assembling the components RPM).

Communication between the Arduino platform and the For each of the codes above, 01 is the code for accessing
vehicle was established through the ELM327 connected real-time parameters. Then we have 05, 04, 0B, and 0C,
to the OBD II interface (see Figure 16). which are IDs, as each requested parameter also needs an
ID or PID (Parameter ID), to know where to retrieve the
information. For example,

Code 0105 0104 010B 010C


Hexadecimal 64 7F 50 0F A0
Decimal 100 127 80 15 160
Figure 16. Connecting ELM 327 to OBDII
For the code 0100, things are different. 01 is the code for
The conducted tests are further presented on two cars: accessing real-time parameters, and 00 is the code for
- Toyota Avensis from 2006, 2.2 diesel engine, 180 hp. accepting PIDs from 01 to 20, where 00 represents the
- Peugeot Boxer from 2015, 2.2 diesel engine, 130 hp. first PID.

35
Scientific Bulletin of the Electrical Engineering Faculty – Year 24 No.1 (50) ISSN 2286-2455

For the code 0105, the response is 41 05 64. The


response consists of two bytes identifying it as a
response to request 01 (real-time parameters), PID 05
(41 05), and an additional byte with the value 'Engine
coolant temperature.' To obtain the actual value, we
convert the hexadecimal number to decimal and subtract
40 from the obtained value:

64H = 100(10)
100 – 40 = 60 0C

For the code 0104, the response is 41 04 7F. The Figure 19. Data acquisitions from a Toyota car
response consists of two bytes identifying it as a
response to request 01 (real-time parameters), PID 04
(41 04), and an additional byte with the value 'Engine
load.' To obtain the actual value, we convert the
hexadecimal number to decimal, divide it by 255, and
multiply it by 100%:

7FH = 127(10)
(127 / 255) * 100 % = 0.498 * 100 % = 49.8%

For the code 010B, the response is 41 0B 50. The


response consists of two bytes identifying it as a
response to request 01 (real-time parameters), PID 0B
(41 0B), and an additional byte with the value 'Intake
pressure.' To obtain the actual value, we convert the Figure 20. Chart of data acquisitions from Toyota car
hexadecimal number to decimal:
The obtained results using the Auto tester from the
50H= 80(10) = 80kPa service, under identical conditions - cold start with the
ignition on and the engine off - are showcased in Figures
For the code 010C, the response is 41 0C 0F A0. The 21-23.
response consists of two bytes identifying it as a
response to request 01 (real-time parameters), PID 0C
(41 0C), and two additional bytes with the coded RPM
value (1/4 RPM per bit). To obtain the actual RPM
value, we convert the hexadecimal numbers to decimal,
multiply the first one by 256, add them together, and
then divide the result by four:

0FH = 15(10)
A0H = 160(10)
((15 * 256) + 160 ) / 4 = (3840 + 160) / 4 = 4000 / 4 =
1000 rpm Figure 21. Values for Peugeot

Figure 22. Reading Toyota Avensis values


Figure 18. Graph of data purchases from Peugeot car

36
Scientific Bulletin of the Electrical Engineering Faculty – Year 24 No.1 (50) ISSN 2286-2455

Figure 23. Reading Toyota Avensis graphics

Case 2 – testing with the implemented system - system


initialization, the cars have the engine running, and data
reading under warm conditions is depicted in Figures 24-
27.

Figure 25. Peugeot car data acquisition graphs – hot

Figure 24. Data acquisitions from the Peugeot car

Figure 26. Data acquisitions from a Toyota car

37
Scientific Bulletin of the Electrical Engineering Faculty – Year 24 No.1 (50) ISSN 2286-2455

Figure 27. Toyota car data acquisition graphs – hot

The results obtained with the Auto tester from the


service under the same warm conditions with the engine Figure 29. Graph for Peugeot engine load
running are presented in Figures 28-32.

Figure 30. Peugeot Coolant Temperature Chart

Figure 28. Graph for atmospheric pressure Peugeot

38
Scientific Bulletin of the Electrical Engineering Faculty – Year 24 No.1 (50) ISSN 2286-2455

automotive mechanics. By creating this diagnostic tool, a


window opens to precise monitoring and a deep
understanding of the vehicle's operation, thereby
contributing to its efficiency and reliability.

To highlight the performance of the implemented


system, a comparison was conducted with results
obtained from an authorized auto tester in an auto
service, using two car models. The outcomes for the
tested vehicles (Peugeot, Toyota) are documented in
Table 1.

Table 1. Results obtained.


Case 1
System created Tester Service
Cold Cold
Peugeot Toyota Peugeot Toyota
Coolant
temperature 42 52 40 48
(0C)
RPM 0 0 0 0
Figure 31. The graph for the RPM of the Peugeot engine.
Intake
0 0 96 98
Pressure (kPa)
Engine Load
0 0 0 0
(%)
Case 2
System created Tester Service
Hot Hot
Peugeot Toyota Peugeot Toyota
Coolant
temperature 45 58 39 48
(0C)
RPM 1250 1216 840 796
Intake
70 76 96 98
Pressure (kPa)
Figure 32. Reading Toyota Avensis values Engine Load
28.24 29.80 40 32.94
(%)
4. REZULTATE ȘI CONCLUZII
Upon scrutinizing the results outlined in Table 1,
This project explores a sophisticated system that discernible variations emerge between the values
integrates fundamental knowledge about the dashboard exhibited by the devised system and those retrieved from
computer and the Arduino platform. The main objective the automotive service tester. These disparities stem
of this initiative is to create an advanced automotive from nuanced differences: the service tester adheres to a
diagnostic tool using the OBDII port. The essential distinct protocol compared to the OBD II adapter
interconnection occurs between the Arduino platform, a (ELM327) employed in our system. Additionally, the
Bluetooth modulator, and a Bluetooth adapter that connections established by thin wires may not ensure
communicates with the Electronic Control Unit (ECU). optimal contact, and the platform along with the adapter
The transmitted data is then displayed on an LCD screen, utilized deviate from the original equipment.
providing the user with access to vital information about
the vehicle's condition. A comprehensive examination of the data (Table 1 and
figures 17, 19, 24, 26) reveals that the implemented
By utilizing OBDII technology, this system allows system effectively showcases the connection code and
efficient monitoring and diagnosis of various aspects of the values gleaned from the corresponding sensors. The
the vehicle, from engine parameters to the overall status discerned differences emphasize the importance of
of systems. The Arduino platform serves as the heart of acknowledging the unique characteristics of each
the system, facilitating interaction with various modules diagnostic tool and considering potential variations in
and sensors. The Bluetooth modulator and adapter add a protocols, connection quality, and hardware
level of wireless connectivity, enabling data transfer to compatibility. While these disparities exist, the created
and from the ECU. system successfully captures and displays crucial
diagnostic information, marking a commendable
Essentially, this project represents a synergistic blend of achievement in the realm of automotive diagnostics.
cutting-edge technology and advanced knowledge of

39
Scientific Bulletin of the Electrical Engineering Faculty – Year 24 No.1 (50) ISSN 2286-2455

5. REFERENCES

[1] Wilfried Voss, Sae J1939 ECU Programming & Vehicle


Bus Simulation with Arduino, 2015.
[2] Vineet P. Aras, Design of Electronic Control Unit (ECU)
for Automobiles - Electronic Engine Management system,
2004.
[3] Rvmiller89, Arduino-based OBD-II (vehicle onboard
diagnostic) interface written in C,
https://github.com/rvmiller89/arduino_obd.
[4] A.R. Rodriguez, s.a. ,,Implementation of an OBD-II
diagnostics tool over CAN-BUS with Arduino,,
Sistemas&Telematica, vol.16, no.45, pp. 45-53, 2018.
[5] Arduino Uno R3 Mini USB compatible ATmega328
ATmega328P Board Brand,
https://buyhere22.co.uk/product/arduino-uno-r3-mini-usb-
compatible-atmega328-atmega328p-board-brand-new-uk/
[6] HC-05 (ZS-040) Bluetooth Module,
https://protosupplies.com/product/hc-05-zs-040-
bluetooth-module/
[7] Moonar Mini Elm327 Interface Bluetooth V2.1 Bluetooth
OBD-II OBD2 Auto Diagnostic Azul A,
https://www.amazon.co.uk/Moonar-ELM327-Interface-
bluetooth-
Diagnostic/dp/B00WU97RH8/ref=sr_1_5?keywords=elm
327&qid=1647974804&sr=8-5&th=1
[8] X-431 EURO TURBO II WITH 2YR SOFTWARE,
https://www.launchtech.co.uk/oem-level-vehicle-
diagnostics/x431-euro-pro-5-lite-1/
[9] LCD1602 16×2 I2C Blue LCD Display,
https://protosupplies.com/product/lcd1602-16x2-i2c-blue-
lcd-display/
[10] Labcenter Electronics, PROTEUS DESIGN SUITE
Getting Started Guide, https://www.labcenter.com/news/
[11] Arduino, https://docs.arduino.cc/
[12] Hans-Petter Halvorsen, Programming with Arduino, 2018.
[13] Dimitrios Rimpas, Andreas Papadakis, Maria Samarakou,
„OBD-II sensor diagnostics for monitoring vehicle
operation and consumption”, Energy reports, volume 6,
supplement 3, 2020, pp.55-63.
[14] A. Rodriguez, R. I. Rodriguez, J.R.V. Alvarez,
„Implementation of an OBD-II diagnostics tool over
CAN-BUS with Arduino”, Sistemas y Telematica 16(45),
2018.

40

You might also like