DEVELOPMENT OF A PORTABLE MOTOR VEHICLE EMISSION TEST SYSTEM BASED ON ARDUINO WITH ANDROID INTERFACE

This study takes a comprehensive approach by proposing the design of an innovative emission test tool for motorized vehicles. The primary objective of this tool's design is to establish an alternative emission testing apparatus based on Arduino AT-Mega 2560, proficient in capturing vehicle exhaust emissions. The underlying methodology involves an in-depth investigation of various components, including the MQ2 and MQ7 sensors, microcontrollers, and supplementary sensors. This meticulous observational process aims to unravel the fundamental principles that govern the functionality of these components. Subsequently, the study advances to the prototyping phase, manifesting in the creation of an Android-based emission test system. This system capitalizes on the integration of Arduino programming and App Inventor technology. The integrated system is devised to facilitate sensor data acquisition. The empirical results of the tests indicate that the developed tool effectively measures hydrocarbon gas and carbon monoxide gas concentrations, yielding readings of 6.31% and 3.73%, respectively, under engine conditions ranging from 1500 to 3000 rpm with error in regions 1.4% and 5.1% compared to a commercial instrument. However, during the testing phase, certain challenges surfaced. Notably, the presence of water particles within the tool, coupled with the generation of heat due to the accommodated exhaust gases, increased the temperature within the tool's enclosure. Consequently, the sensors' temperature escalated, resulting in erratic sensor behavior and unstable readings. Nonetheless, a significant advantage of the proposed tool lies in its real-time data visualization capability, which is particularly accessible through Android smartphones. This feature enhances the immediacy of test results, facilitating prompt analysis and decision-making. In conclusion, this study lays the groundwork for an innovative emission testing tool that demonstrates promise in addressing the air quality degradation stemming from vehicular emissions.


Introduction
One of the main causes of the decline in air quality has been identified as the transportation sector's ongoing expansion.One significant reason causing the air quality to decrease is the transportation sector's rising production of motorized vehicles [1].Vehicle emissions of air pollutants, especially carbon monoxide (CO) gas, have increased, raising the possibility of increased mortality as well as a number of health issues [2].The introduction of motorized vehicle emission tests has been essential in reducing the negative impacts on air quality [3].However, there is still a need for improvement in terms of accessibility and availability, as seen by the current state of concern regarding emission testing accessibility [3].
The government of Indonesia has implemented several measures to address pollution, including the creation of laws governing the exhaust emissions of motorized vehicles.Government Regulation No. 61/2011 on Air Pollution Control for Motor Vehicles is an embodiment of this endeavor.This rule requires motorized vehicles to be tested for exhaust emissions using certain procedures, and the findings show the amounts of emissions [4], [5].Nonetheless, a number of limiting variables make vehicle emission tests at authorized repair shops less effective.These difficulties include outmoded testing apparatus, expensive testing, and a lack of testing facilities [6].To further increase overall costs, emission testing equipment is frequently heavy and difficult to move.The costs of emission testing are further increased by the comparatively high cost of measuring instruments [7].Innovation is critically needed to address these issues and enable the regulation's successful implementation.More specifically, there is great potential for the creation of affordable, portable emission testing apparatus.These creative ideas have the potential to greatly improve emission testing's affordability and accessibility, increasing its usefulness and effectiveness.These obstacles should be removed with the advent of portable and reasonably priced emission monitoring equipment, which will ultimately help these significant environmental laws succeed.
In a prior study conducted by Wibawa et al. [8], an exhaust gas decor test was devised, incorporating a USB communication interface.This design leveraged Arduino technology in conjunction with MQ-4, MQ-7, and MQ-135 sensors.The sensitivity of these sensors played a pivotal role in enhancing the instrument's accuracy.Another noteworthy development in sensor technology involved the introduction of the MQ-7 sensor, which demonstrated superior sensitivity to CO gas when compared to the MQ-9 sensor [9].Furthermore, researchers have undertaken efforts to embed emission testing equipment within four-wheeled vehicles manufactured before the year 2010 [10].The primary objective of this research is to create an emission testing tool for motorized vehicles utilizing Arduinobased technology.The affordability of the Arduino platform significantly reduces the financial burden on users conducting vehicle emission tests.The advantages of this innovative design are multifaceted.It streamlines the process of measuring exhaust emissions from motorized vehicles, ensuring easy accessibility to emission testing for vehicle owners.Additionally, it enhances efficiency and timeeffectiveness in the assessment of pollution levels emanating from motorized vehicles.Moreover, the resultant emission testing tools are compact and lightweight, further enhancing their usability.
In this study, an exhaust emission measuring instrument was employed to gauge emissions from motorcycle vehicles, specifically targeting hydrocarbons (HC) and carbon monoxide (CO).The gas reader sensors utilized in this context are the MQ2 and MQ7, which are compatible with the Arduino AT-Mega 2560 platform.It is important to note that the primary emphasis of this study lies in the development of an Arduino-based emissions testing tool system.Detailed discussions regarding the external design of the tool are beyond the scope of this research.

Experimental and Procedure Design
This research employs a prototyping approach to design the software, hardware, and mechanical components of a vehicle exhaust gas monitoring system.The primary objective is to develop a comprehensive plan that enhances the functionality of emission testing equipment [11].Subsequently, attention is directed toward the exhaust gas level monitoring system, which is primarily based on the Euro emissions standards [12].Once the system is constructed, it undergoes testing by introducing input in the form of combustion exhaust to assess the proper functioning of the MQ2 and MQ7 sensors.If all components of the gas monitoring system perform effectively, the subsequent phase involves employing experimental methods to gather data on the gas monitor's design and performance.

Sensors Specification
The tools employed to facilitate vehicle emission test equipment encompass a multimeter, a set of screwdrivers, a laptop, Arduino IDE software, and APP INVENTOR software.The materials under examination in this test include the emission test equipment itself, along with MQ2 and MQ7 exhaust emission gas sensors.
The MQ2 sensor is known for its wide detection scope, making it suitable for use in gas leakage detectors.It can effectively detect a range of gases, including LPG, i-butane, propane, methane, alcohol, hydrogen, smoke, and other combustible gases.This sensor is manufactured by Hanwei Electronics Co., Ltd.Its composition includes a gas sensing layer made of Tin Dioxide (SnO2) compacted inside an Al2O3 tubular ceramic structure.Moreover, the MQ-7 sensor, also from the same manufacturer, was employed to create a carbon monoxide sensor.The MQ-7 sensor shares a construction similar to that of the MQ-2 sensor, highlighting the versatility and adaptability of these sensors in the field of gas detection [14], [15].

Sensor Voltage Test
The sensor voltage is measured using a digital multimeter.In this context, we utilize the 10-bit Analog-to-Digital Converter (ADC) available on the microcontroller.The test parameters include a Reference Voltage of 5V, a Microcontroller ADC set to 10 bits (equivalent to 1023 maximum value), and measurement conditions at engine speeds ranging from 100 to 1200 rpm.The variables being measured are the Sensor Output Voltage and the Gas Sensor ADC.
In the conducted tests, certain variables are held constant, including the reference voltage value and the ADC setting on the microcontroller.Conversely, other variables are not predetermined, specifically, the sensor output voltage and the gas sensor ADC, which serve as the measured variables.These results are derived from varying the engine speed, generating gas around the sensor, and subsequently interpreting the gas's impact on the sensor's output.This interpretation results in a voltage value generated by the sensor, which is reflected in the ADC data.The equation for determining the sensor output voltage value is rooted in the conversion of the ADC value [13], as detailed in Equation 1.
Where Vin is the voltage on the selected input pin, and Vref is the voltage reference.

Overall System Test
The primary objective of this test is to acquire data using the designated tool.It involves the retrieval of data from the instrument, specifically CO and HC emission levels, which are subsequently calibrated using a standard tool.Certain variables in this test are held constant, including reference voltage values, room temperature, and humidity.These constants are dictated by limitations in available tools and space, making it challenging to attain the ideal conditions recommended in each sensor datasheet.This test is specifically geared towards motorcycle vehicles produced after 2010, and it is exemplified through the use of a Honda Versa 150 Motorcycle (year 2014) as a representative model.Nonetheless, one variable remains dynamic throughout the testing process: the performance of the MQ2 and MQ7 gas sensors.These sensors function as a measurement variable and are tested under idle or stable engine conditions.
The test configuration encompasses specific settings, including a reference voltage of 5V, controlled room temperature, and humidity conditions, vehicles manufactured in 2010 or later, and engine operations at 1500, 2000, and 3000 rpm.The parameters measured include hydrocarbon gas levels using the MQ2 sensor (expressed in parts per million, PPM) and carbon monoxide gas levels using the MQ7 sensor (expressed as a percentage, %).
HC and CO reading error percentages (%) are calculated by using the following equation.

%𝐸𝑟𝑟𝑜𝑟 = 𝑁𝑅−𝑁𝑆 𝑁𝑆
(2) It's essential to understand that NR represents the value determined by the design tool, while NS represents the default value.
The design of this tool comprises three key components.Firstly, there are input devices in the form of gas sensors MQ2 and MQ7, which function as detectors for hydrocarbon gases and carbon monoxide.Secondly, as depicted in Figure 1, the processing device utilized is the Arduino ATMega 2560.Lastly, the Bluetooth sensor serves as an output device, facilitating the transmission of data to a smartphone.The arrangement and interaction of these devices can be observed in Fig. 1.

Results of Sensor Output Voltage Test
Sensor voltage is quantified through the utilization of a digital multimeter, utilizing the microcontroller's 10-bit Analog-to-Digital Converter (ADC).The recorded sensor output voltage readings are presented in both Table 1 and Table 2.

Result of Gas Sensor Test
To determine the gas concentration detected by the MQ2 and MQ7 sensors, calibration is essential.This calibration process involves creating a linear curve of sensor sensitivity to various gases, as specified in the datasheet.For the MQ-2 sensor, the target gas for detection is Hydrocarbon (HC) gas, while for the MQ7 sensor, it's Carbon monoxide.
To calculate the gas concentration accurately, the gas concentration value, along with the Ro (sensor resistance in clean air) and Rs (sensor resistance in the presence of the target gas) values from the sensor, is utilized to measure the Rs readings [14], [15].This calculation is carried out using Equation 3.

RS
Where RS represents the resistance of the sensor, VC denotes the applied voltage in the circuit, VRL signifies the voltage across the load resistance, and RL represents the load resistance.Furthermore, the reading results were presented in Table 3 and 4.

Result of Bluetooth Sensor Test
Tests were carried out to assess the compatibility and communication capabilities of the HC-05 Bluetooth module with Android devices, as shown in Fig. 2 and 3.The HC-05 sensor utilizes specific pins, including Serial RXD, TXD, VCC, and GND, for its operation.Additionally, it incorporates a built-in LED indicator to signify the status of Bluetooth connectivity.In this test, a 5V voltage is applied to the Bluetooth module, and it is subsequently scanned using an Android device.Once the Android device detects the Bluetooth module, the name of the Bluetooth sensor, "HC-05," appears in the list of available devices.To establish the connection, you simply select it.Following selection, a device dialogue box will appear, prompting the user to enter a PIN.The default PIN for the HC-05 sensor is either "0000" or "1234" to establish a connection with the Android device.

Result of Viewer Application Test
The purpose of the test was to assess the functionality of the developed application in establishing a connection with the microcontroller and presenting the readings from the MQ2 and MQ7 gas sensors, specifically measuring carbon monoxide and hydrocarbon gas levels.The user interface of the Android application is illustrated in Figure 4 (a).Fig. 4(b) displays several key elements, including a Bluetooth connection button, a disconnect button, a text box for displaying sensor readings, and a label.Establishing the connection through the Android application involves selecting a Bluetooth connection from the list of previously paired devices on the Android device.As depicted in Fig. 4 (c), a visual indicator shows the transition from red to green on the button, confirming a successful Bluetooth connection.Simultaneously, the text box displays the results obtained from the carbon monoxide and hydrocarbon gas sensor readings.

Result of Overall System Test
The purpose of this testing phase is to assess the functionality of the system and confirm that its features operate as intended.Additionally, this testing phase is instrumental in data acquisition.The data collected primarily consists of carbon monoxide (CO) and hydrocarbon (HC) gas emission values.These acquired data points undergo calibration using standardized equipment for accuracy.
To ensure precise calibration and validation, the equipment is compared to a reference instrument located at the Planet Ban Motorcycle Service Station in Kebon Jeruk, Jakarta.This reference instrument serves to validate the prototype's readings.The recorded readings are based on a five-minute interval, measuring gas concentration readings from the sensor.Subsequently, an average value is computed for each dataset.
The measurements are conducted on motorized vehicles manufactured after 2010, with tests conducted at engine speeds of 1500, 2000, and 3000 RPM.The detailed results of these measurements are documented in Table 5.
The experimentation conducted on the tool demonstrated discrepancies in the measured gas values between the two devices.These inconsistencies indicate the presence of a data presentation issue.During the experimental phase, it was noted that the average gas sensor readings exhibited a variance of 6.31% for hydrocarbon gas (HC) sensors and 3.73% for carbon monoxide (CO) The observed variations in sensor measurements can be ascribed to the existence of impurities, such as particulate matter and moisture, originating from the combustion process within the engine.The presence of these pollutants possesses the capacity to impact the performance of sensors, hence resulting in mistakes in the recorded measurements.

Conclusions
Design and testing of an Arduino AT-Mega 2560 based automotive pollution testing instrument with an Android UI yielded excellent results.This novel method for detecting motorized vehicle CO and HC emissions has worked across a wide range of engine speeds, from 600 to 3000 rpm, and voltage spectrums.MQ2 and MQ7 sensors read 2.68 V to 4.41 V and 1.02 V to 4.60 V, respectively.The equipment accurately monitors motorized vehicle exhaust emissions, including HC and CO.However, the readings differ slightly from normal equipment.Carbon monoxide gas readings on a 2014 Honda Versa 150 test vehicle varied by 6.31%.Several factors affected sensor readings during testing.Water and heat were found in the tool.Handled exhaust gases raised the tool enclosure's temperature.Thus, the sensor temperature rose, causing occasional inaccuracies and slightly unsteady readings.

Table 5 .
Measurement testing on motorcycle