Faizin et al. | Jurnal Teknik Mesin Indonesia | Vol. No. Oktober 2025, hal: 31 Design of safety distance driving based on a smart detection application Muhammad Faizin1. Muhammad Alfin A P1. Muhammad Bagus Laroybafih1 1Department of Mechanical Engineering. Jenderal Soedirman University Jl. Raya Mayjen Sungkono KM 5. Blater. Kalimanah. Purbalingga, 53371. Indonesia *Corresponding author: muhammad. faizin@unsoed. Received: 30 September 2025. Reviewed: 7 November 2025. Published: 21 March 2026 DOI: https://doi. org/10. 71452/g3a1f242 Abstrak. Peningkatan jumlah kendaraan roda empat diikuti oleh perilaku masyarakat yang sering mengabaikan peraturan lalu lintas di jalan raya, sehingga menyebabkan meningkatnya kasus kecelakaan dan pelanggaran lalu lintas. Berdasarkan kondisi tersebut, penulis tertarik untuk melakukan penelitian mengenai rancangan sistem yang dapat memberikan peringatan kepada pengemudi kendaraan roda Tujuan dari penelitian ini adalah untuk mengetahui bagaimana merancang sistem jarak aman berkendara berbasis komunikasi serial Android, mengetahui cara mendeteksi jarak aman pada sistem tersebut, serta memahami prinsip kerja sistem jarak aman berkendara berbasis komunikasi serial Android. Metode yang digunakan dalam penelitian ini adalah metode eksperimental dengan tiga indikator pengukuran, yaitu akurasi pengukuran jarak kendaraan terhadap objek di depannya, akurasi pembacaan data jarak kendaraan terhadap objek di depan melalui smartphone Android, dan tingkat kesalahan pengukuran yang terjadi pada sistem. Hasil pengujian diperoleh bahwa sensor ultrasonik dapat mendeteksi keberadaan kendaraan lain pada jarak kurang dari 2 m dan data tersebut dikirimkan ke smartphone melalui koneksi Bluetooth. Hasil uji validasi menunjukkan bahwa responden memberikan nilai dengan persentase 85 87,5% dalam kategori AuSangat BaikAy. Hal ini menunjukkan bahwa penerapan sistem yang diuji dapat menghasilkan detektor jarak yang terintegrasi dengan smartphone secara lebih efektif. Kata kunci: Android. Bluetooth. Jarak. Transportasi Abstract. The increase in the number of four-wheeled vehicles is followed by people ignoring traffic rules on the highway, leading to an increase in accidents and traffic violations. Given the conditions described, the authors are interested in conducting a study on the design of a system that provides warnings to four-wheeled vehicle drivers. The purpose of this study is to design a safe distance driving system based on Android serial communication, detect a safe distance in the system, and understand the working principle of a safe distance driving system based on Android serial communication. The method used in this study is an experimental method with 3 measuring indicators, including the accuracy of measuring the vehicle's distance to the object in front of it, the accuracy of reading the vehicle's distance data to the object in front of it on an Android smartphone, and measuring errors that occur in the system. From the test results, it was found that the ultrasonic sensor detects the presence of other vehicles at distances of less than 2 meters and transmits the information to a smartphone via Bluetooth. The results of the validation test showed that the respondents scored between 85% and 5% in the "Very Good" category. This shows that the system test above can produce a distance detector integrated with a smartphone, making it more effective. Keywords: Android. Bluetooth. Distance. Transportation INTRODUCTION Transport plays an important role in many aspects of society, including individual lifestyles, government operations, and social systems . The performance of the transport system is influenced by the region's sociodemographic conditions. Population density, in particular, significantly affects transport's ability to meet the community's needs . Urban areas tend to experience high population growth due to birth rates and urbanization. Urbanization leads to densely populated areas, which can directly or indirectly affect the efficiency of regional transportation . This complex problem is further exacerbated by population growth and the increasing number of four-wheelers that exceed the road network's capacity . The increase in the number of four-wheelers results in greater disregard for traffic regulations, leading to more accidents and traffic offenses . In Indonesia, for example, police data shows an average of three deaths per hour due to traffic accidents. The data also revealed that 61% of accidents are caused by human factors, such as drivers' lack of understanding of traffic signs and violations . This figure is expected to increase as more vehicles enter the road . In response to these challenges, developed countries continue to innovate to improve vehicle safety, including the integration of ultrasonic sensors to help maintain safe distances between vehicles, especially four-wheelers. One such innovation is the addition of a parking camera system complete with an LCD monitor . However, this technology remains relatively expensive and has not been widely adopted, especially on older vehicle models. addition, camera systems may have limitations, particularly in low-light conditions, as they require a sufficient light source to function effectively . To address these issues, it is necessary to develop costeffective solutions that can be widely applied in all types of vehicles, including older models. One potential approach is to design a safety-distance detection sensor system with a simple, affordable concept, aiming to achieve the same goal. This system can utilize ultrasonic sensors to measure the safe distance in front and behind the vehicle, with the measurement results displayed directly on an Android smartphone. Given these conditions, the author Faizin et al. | Jurnal Teknik Mesin Indonesia | Vol. No. Oktober 2025, hal: 32 is interested in conducting research on designing a system that provides warnings to drivers of four-wheeled vehicles. The developed system is based on Android serial communication and aims to design a safe, long-distance driving system using this technology. The goal is to detect the safe distance in the system and understand the working principle of the safe-distance driving system using Android serial communication. The main objective is to develop a distance-warning system for vehicles using Android This research aims to develop a safe stopdetection system for four-wheeled vehicles, specifically focusing on monitoring ultrasonic sensors connected to smartphones via Bluetooth. By designing and implementing the system, it is expected to contribute to improving road safety, particularly by addressing the issue of maintaining a safe distance between vehicles. METHOD Literature Review Safe-driving distance warning systems have been widely investigated across various sensing modalities and system Early research in collision avoidance often employs ultrasonic sensors for short-range obstacle detection due to their low cost, simplicity, and real-time For instance, studies on collisionavoidance systems using ultrasonic sensors have demonstrated their ability to detect gaps between vehicles and provide alert mechanisms to drivers, thereby reducing rear-end collisions by measuring inter-vehicle distance using microcontroller-based implementations. In addition, ultrasonic sensors have been applied in driver-assistance contexts, such as urban traffic aid systems, where they offer a cost-effective alternative to more complex sensors like radar or LiDAR for low-speed safe-distance estimation and control. Despite their advantages, these systems typically do not integrate with mobile applications and are often constrained to embedded hardware platforms. According to Table 1. Shows some research efforts combine ultrasonic sensors with IoT or display systems to present distance information to a mobile device, such as tools that display measured safe distances on an LCD or cellphone platform. Still, these studies often stop short of real-time smartphone integration using Bluetooth or serial Although the literature demonstrates the effectiveness of ultrasonic sensing for obstacle detection and collision avoidance in controlled environments, there is limited work on integrating ultrasonic short-range distance measurement with Android smartphones for realtime safe-driving distance warnings. In particular, few studies address the combined challenges of measuring sensor accuracy. Bluetooth serial communication with Android devices, and user validation in real driving This gap highlights an opportunity for low-cost, smartphone-integrated systems as alternatives to high-cost ADAS solutions. Driving Safety Driving safety is a crucial concern in smart transport. Researchers and experts have explored various systems, protocols, and applications to improve driving safety in smart transport . The main focus often lies on collision detection and avoidance. One common approach to improving driving safety is to exchange driving information between neighbouring vehicles . establishing communication channels and facilitating the periodic exchange of relevant data, vehicles can gain a better understanding of their environment and take proactive measures to prevent collisions . Table 1. Literature review and the novelty of this research Refere Techno Sensor System Integration Distance Range Relevance / Limitations Moha nad et Ultraso Standalone Short ( <5. Demonstrates ultrasonic collision Fan & Zhang Ultraso Microcontro ller / early Lowspeed <10m Shows ultrasonic utility in ADAS. not smartphonebased Nurul Yakin Syams . Ultraso . IoT Cellphone LCD Multidirection IoT display, but limited Android This Study Ultraso Bluetoo Android app via serial Short < Integrates mobile interface and identified gaps These systems, protocols, and applications for safe driving typically utilise technologies such as wireless communications, sensor networks, and data analytics. For example, vehicle-to-vehicle (V2V) and vehicle-toinfrastructure (V2I) communications enable real-time data sharing of position, speed, acceleration, and other relevant This information can be used to assess potential collision risks and issue warnings or trigger automatic braking systems. In addition, advanced driver assistance systems (ADAS) play an important role in driving safety. These systems utilise various sensors, such as radar, lidar, and cameras, to detect potential obstacles, pedestrians, and other vehicles. They provide warnings, lane-keeping assistance, adaptive cruise control, and emergency braking, which ultimately help prevent collisions . In addition, intelligent transport systems (ITS) and cooperative intelligent transport systems (C-ITS) incorporate advanced algorithms and protocols to enable effective and reliable communication between vehicles and These systems facilitate the exchange of driving-related information, such as traffic conditions, road hazards, and weather updates, allowing drivers to make informed decisions and avoid potential hazards . Driving efficiency In the realm of intelligent transportation, driving efficiency is a significant concern, with a focus on optimizing . Faizin et al. | Jurnal Teknik Mesin Indonesia | Vol. No. Oktober 2025, hal: 33 vehicle travel time and fuel efficiency. However, current real-time traffic-based navigation methods can sometimes lead to suboptimal driving efficiency, especially during traffic congestion. Such inefficiencies can result from a lack of traffic coordination across the network. To address such challenges, researchers have conducted a study on driving efficiency using a smartphone-based safe-driving distance-control system. By using smartphones as a portable medium, this system aims to give drivers control over maintaining a safe driving distance . These smartphone-based systems typically utilize the sensors and capabilities of modern smartphones, such as GPS, accelerometers, and communication technologies. Through a dedicated mobile app, these systems provide real-time information and feedback to drivers, helping them maintain a safe distance from the vehicle ahead. The smartphone-based safe-driving distance-control system operates by continuously monitoring the vehicle's speed and the distance to the vehicle in front. It provides visual and audio alerts to drivers if they get too close to the preceding vehicle, helping them maintain a safe distance . In addition, the system can provide recommendations on appropriate speed and driving behavior to optimize fuel efficiency and minimize travel time. Using smartphones as the medium for implementing such systems offers several Smartphones are widely available and portable, enabling wide adoption and ease of use. The ubiquity of smartphones also enables the collection and analysis of large-scale driving data, which can be used to further improve driving efficiency and optimize traffic flow . Autonomous Vehicles Development and Deployment Predictions The deployment of autonomous vehicles follows a predictable S-curve of innovation, similar to many other technological innovations. Currently, autonomous vehicles are in the development and testing stage. Some vehicles already use Level 2 and 3 technologies, such as cruise control, hazard warning systems, and automatic parallel Tesla's Autopilot system offers limited automatic steering and acceleration capabilities, although its deployment has been delayed after a fatal accident in 2016. Several companies are involved in Level 4 pilot projects, testing autonomous vehicles under certain conditions. However, despite the progress made, significant technical improvements are still required before autonomous vehicles can operate reliably and autonomously under all normal driving conditions . For autonomous vehicles to become widely available, reliable, and affordable, they need to go through several more stages of development. Due to the potential external costs imposed by the vehicles, such as the risk of congestion and accidents, testing and regulatory standards for autonomous vehicles are higher compared to other technological innovations, such as personal computers and mobile phones. Ensuring the safety and reliability of autonomous vehicles is an important aspect of their deployment . Extensive testing, technological refinements, and strict regulatory compliance are required before autonomous vehicles can be integrated into mainstream vehicle fleets. This cautious approach aims to minimize the risks and external costs associated with autonomous vehicles while maximizing their benefits, including improved transport efficiency, reduced accidents, and enhanced mobility. Ultrasonic Sensor Testing At this stage of system planning and manufacturing, the goal is to create a distance measurement system that provides precise, accurate information about objects in front of a vehicle using a safe-driving distance system based on Android serial communication. The system will utilize an ultrasonic sensor that operates on the principle of wave reflection. The time taken for the wave to reflect will be used to determine the distance between the vehicle and the object in front. To achieve this, a system design needs to be developed to connect the ultrasonic sensor to Bluetooth Low Energy (BLE 4. This design will outline the necessary hardware and circuitry to establish a connection between the sensor and a BLE module. Considerations such as power requirements, voltage levels, and communication protocols will be taken into account during the design process. Once the system design is complete, the next step is to create an Android application using a development tool such as App Inventor. The application will serve as the user interface for the distance measurement system. It will use the Android platform's BLE functionality to establish a connection to the BLE module connected to the ultrasonic sensor. Within the application, the data received from the ultrasonic sensor, which indicates the distance to the object in front of the vehicle, will be processed and displayed in a user-friendly format. The application will also include features to ensure safe driving, such as providing visual or auditory warnings when the distance falls below a certain Throughout the process, thorough testing and refinement will be conducted to ensure the system's accuracy and reliability. Any issues or inconsistencies discovered during testing will be addressed through hardware or software adjustments, aiming to achieve an optimal system that provides precise, timely information about the distance between the vehicle and objects in its During the research phase, the focus was on testing the serial communication between ultrasonic sensors and Android smartphones, using the pre-assembled Bluetooth Low Energy (BLE 4. The primary objective of this testing phase was to monitor safety-driving distance data using the Smart Detect Application. Observation Indicators In designing a safe-driving distance system based on the Smart Detect Application, three critical indicators are considered to ensure its effectiveness and reliability. The first indicator focuses on the accuracy of measuring the distance between the vehicle and the object ahead. Precise distance measurement is crucial to provide drivers with reliable information about their proximity to obstacles. This indicator evaluates the system's ability to consistently and accurately determine the actual distance, minimizing any measurement errors. The second indicator pertains to Faizin et al. | Jurnal Teknik Mesin Indonesia | Vol. No. Oktober 2025, hal: 34 the accuracy of reading the vehicle's distance data on the Android smartphone. The smartphone application, developed with tools such as App Inventor, plays a vital role in receiving and interpreting distance data transmitted via serial communication. The accuracy of reading and displaying distance on the smartphone's interface is essential for providing drivers with real-time, accurate information about their surroundings. This indicator ensures that the distance data presented on the smartphone aligns closely with the actual distance measured by the program is written, compile it and upload it to the Arduino Nano, where it will be embedded in the ATmega328 After that, create a safe-distance monitoring application using App Inventor. After assembling the components, developing the program, and completing the application, the next step is to design the placement of a safe-driving distance system based on the Smart Detect Application. RESULTS AND DISCUSSION Schematic Circuit The initial stage in designing and manufacturing a safedriving-distance system is to create a series of schematics in Fritzing. Figure 1 explains a series of schematics to find out the flow of connections between components in the The following is the result of creating a schematic Figure 1. Schematic circuit of safe driving distance system System Program Figure 2. Explains that the system programme is made on the Arduino IDE software to access the ultrasonic sensor so that it can read the distance between the vehicle and the vehicle in front of it. The sensor readings are then transmitted via a Bluetooth module and read on a The last indicator revolves around the measurement error that may occur within the system. Various factors, such as sensor limitations, environmental conditions, or communication inconsistencies, can contribute to errors in distance measurement. This indicator aims to quantify and minimize these errors by implementing appropriate calibration techniques, error analysis, and error correction By addressing and reducing measurement errors, the system's reliability is enhanced, ensuring that the distance data provided to the driver is as accurate as By monitoring and optimizing these three indicators, the design of the safe-driving distance system can be refined to deliver accurate, reliable distance Continuous evaluation, testing, and refinement of the system help ensure its effectiveness in providing precise distance information, enhancing driver awareness, and promoting safer driving practices. Research Design The research design begins by assembling the components into a single unit according to the schematic. After that, create a C program using Arduino's IDE. After the Figure 2. System Program of Smart Detect Application Detect a Safety Driving Distance System Based on Smart Detect Application Smart Detect Application works as follows: when the ultrasonic sensor at the front of the vehicle detects another vehicle within a range of less than 2 meters, the sensor reading data is processed by the Arduino Nano and transmitted to the smartphone via a Bluetooth connection. Fig 3 is the display on the Android smartphone. To make it easier for the driver to know the distance to the vehicle in front of him, the smartphone's final output is to emit a warning sound as an alarm to indicate a safe driving Ultrasonic Sensor Testing This test is carried out to determine the actual distance and the measured distance on the ultrasonic sensor to the presence of objects in front of the sensor. Table 2. The results of the ultrasonic sensor test show that when the actual distance is 120cm-140cm, the ultrasonic sensor returns the same measurement, so at that distance it does not display error data. When the actual distance is 160 cm- Faizin et al. | Jurnal Teknik Mesin Indonesia | Vol. No. Oktober 2025, hal: 35 180 cm, the ultrasonic sensor readings show a 5 cm when the actual distance exceeds 200 cm, the difference between the actual distance and the scalable distance increases. so that the 200 cm distance is the farthest, with the largest difference in results. Figure 3. Technical analysis of measurement errors, environmental effects, and relevance to standard safe driving distance criteria. Figure 3. Display Smart Detect Application Table 2. Ultrasonic Sensor Test Results Distance Actual 120 cm Distance Difference Scalable 120 cm 0 cm 140 cm 140 cm 0 cm 160 cm 155 cm 5 cm 180 cm 175 cm 5 cm 200 cm 208 cm 8 cm Bluetooth Test Table 3. Bluetooth test results that Needed Bluetooth Distance with Smartphones 50 cm 80 cm 100 cm 130 cm 150 cm Time This test was conducted to determine the time required to connect serial communication between Bluetooth components and smartphones. Table 3. Explain that the Bluetooth test results show that the farther the distance from a smartphone, the longer the detection process takes. So, in this case, to achieve optimal speed in displaying measurement detection results, place the smartphone close to the Bluetooth at a distance of 50 cm. Based on Figure 3. The measurement error analysis, environmental considerations, and alignment with standard safe-driving distance criteria demonstrate that the proposed ultrasonic-based warning system is practical and effective as a low-cost safety aid. Although it does not replace full ADAS functionality, it provides meaningful assistance in short-range collision-risk scenarios, particularly in urban driving environments and for older vehicles. Measurement Error Analysis Figure 3 explains that the accuracy of the proposed safe driving distance system is primarily influenced by the ultrasonic sensor's characteristics and the serial communication protocol. Measurement errors may arise from several sources, including sensor resolution limits, signal reflection properties of the detected object, and processing delays within the microcontroller. Ultrasonic sensors measure distance based on the time-of-flight of sound waves reflected from the object surface. Errors can occur when the reflected signal is weak or scattered, particularly if the surface of the vehicle ahead is uneven, angled, or composed of sound-absorbing materials. addition, the sensorAos beam angle may cause inaccuracies when detecting narrow or irregularly shaped objects. Another source of error originates from data transmission via Bluetooth serial communication. Although the transmission delay is relatively small, latency and packet loss may affect real-time distance display on the Android However, experimental results indicate that the system maintains acceptable accuracy within the critical short-range detection zone (<2 . , where warning responsiveness is more important than absolute distance Environmental Effects on Sensor Performance Figure 3 shows that environmental conditions significantly affect the performance of ultrasonic sensors. Temperature variations affect the speed of sound in air, which directly influences distance calculations. As temperature increases, the speed of sound increases, potentially leading to a slight underestimation of the measured distance if compensation is not applied. Humidity and air pressure also contribute to minor variations in sound propagation, though their effects are relatively small in typical driving environments. More critical environmental factors include rain, dust, and road Faizin et al. | Jurnal Teknik Mesin Indonesia | Vol. No. Oktober 2025, hal: 36 Heavy rain or airborne particles may attenuate ultrasonic waves, reducing signal strength and increasing measurement noise. Vehicle vibrations during motion can introduce mechanical disturbances that affect sensor alignment and signal stability. Despite these factors, ultrasonic sensors remain reliable for short-range detection at low to moderate vehicle speeds. The system is therefore most effective in urban driving scenarios, traffic congestion, and stop-and-go conditions, where maintaining a minimum safe distance is essential and environmental disturbances are less severe than in high-speed highway Relevance to Standard Safe Driving Distance Criteria Figure 3 shows that standard safe-driving distance guidelines generally recommend maintaining a minimum following distance based on vehicle speed and reaction Common rules include the two-second rule, which advises drivers to maintain a two-second gap from the vehicle ahead, and braking-distance-based models that account for speed, road conditions, and driver response The proposed system does not aim to replace full ADAS-based adaptive cruise control systems, which dynamically adjust distance based on speed. Instead, it focuses on short-range critical-distance detection, particularly distances below 2 meters, which pose a high risk of rear-end collisions in urban traffic. At low speeds . , below 20 km/. , a following distance of less than 2 meters significantly increases the risk of collision due to limited reaction time and sudden braking. In this context, the system serves as an early warning tool, alerting drivers when the inter-vehicle distance falls below a critical safety threshold, consistent with basic traffic safety principles. Validation Test by Respondents Testing the safe driving distance system uses a questionnaire technique: distributing questionnaires to Then, create a questionnaire for respondents covering several aspects. The aspects assessed are the design of the safe-driving distance system . ndicators 1-. , the system's ease of operation . ndicators 4-. , and its future benefits . ndicators 7-. The validation test involved 15 respondents, all experts in microcontrollers and embedded systems. Following the evaluation, the results of the validation test score analysis indicate high agreement on the systemAos performance, usability, and By increasing the number of experts from a minimal panel to 15, the assessment reduces the potential for subjective bias and provides a more representative evaluation of the system. This larger expert panel strengthens the validity of the findings and aligns with best practices in content validation, ensuring that the results are robust, reliable, and generalizable to the intended user The following are the results of the validation test score analysis that has been carried out: The results of the Validation Test Analysis by the Total Score Total Score Maximum : Percentage ycNycuycycayco ycIycaycuycyce ycNycuycycayco ycIycaycuycyce ycAycaycu x 100% 85% AuVery GoodAy The results of the Validation Test Analysis by respondent Total Score Total Score Maximum : Percentage ycNycuycycayco ycIycaycuycyce ycNycuycycayco ycIycaycuycyce ycAycaycu x 100% : 87. 5% AuVery GoodAy. CONCLUSION The initial stage of designing a safe driving distance system is to create a schematic in Fritzing, write a program in the Arduino IDE, and then proceed with assembly. The way the safe driving distance system works is that when the ultrasonic sensor detects another vehicle within 2 meters, the sensor's reading data is processed and transmitted to a smartphone via Bluetooth. The smartphone will emit a warning sound when the safe-driving distance is reached. After conducting a validity test with 2 respondents, respondent 1 scored 85% in the "Very Good" category. Respondent 2 assigned a value of 87. 5% to the "Very Good" category. ACKNOWLEDGMENTS The authors are grateful to LP2M UNNES for supporting the publication of this research. Furthermore, the authors are grateful for the support received from the Production Systems and Industrial Automation Laboratory. Mechanical Engineering Department. Universitas Jenderal Soedirman. DAFTAR PUSTAKA