Design and Implementation of Anti-Theft Speed Control System Using Wi-Fi and Raspberry Pi 4 Technology ()
1. Introduction
The unfulfilled ambition of humanity is to keep vehicle accidents under control. Vehicles have become very important and an integral part of our daily lives [1]. With thousands of accidents happening every day, the safety of public and private vehicles has become a major source of concern in recent years. The growth in vehicle numbers, non-compliance of vehicle owners with traffic laws and instructions, and non-compliance with security and safety rules led to a significant increase in the number of traffic accidents. A traffic slogan that says “Speed is exciting, but it kills”, some individuals drive fast to get to work on time, while others do it just for enjoyment [2]. In the last several years, thefts of automobiles have also increased at a frightening rate worldwide [3]. Thousands of vehicles are stolen every year, and thousands more are found by police when perpetrators are caught or when perpetrators leave stolen vehicles after using them [4]. Thus, the theft of automobiles has evolved into one of the most expensive property crimes in current civilization. In addition, vehicles have an impact on people’s lives [5]. It has evolved into a progressive symbol for modern society. There is an increase in demand for vehicle performance and quality, but there is also an increase in demand for anti-theft systems critical to today’s vehicles. Commercially valid vehicle anti-theft devices are costly. The system presented here has many levels of security which complement each other and that is low in cost compared with the price of a vehicle.
Several attempts have been made by researchers to build a low-cost protection system that used a variety of methods to manage vehicles. Nia Maharani Raharja et al. (2022) proposed a face-recognition parking security system using an algorithm of Eigenface to process RFID card loss. The basic work of this technology lies in the use of a camera that takes a photo of the user’s face automatically. This algorithm is used for the faces as a kind of training. The training data’s findings are saved in a database, which is subsequently utilized as a key to identify the face of the vehicle driver. There is a problem when photographing people, the illumination and spacing between the camera and the item might have an impact on image quality and results [6].
Toufiq Aziz et al. (2021) suggested limiting the vehicle speed with Raspberry Pi 3 by setting the vehicle speed to a set value. When the vehicle speed is at this value or less, the engine will start and when the vehicle speed is higher than the set value, the program tells that the speed limit is exceeded and proceeds with the specified high value that was provided in the programming. GSM/GPS provides real-time vehicle location information.
There is a simple problem: it does not work as much as it should due to a minor issue with the GPS and GSM modem [7].
Vishal V. Dhamdhere et al. (2019) proposed anti-theft and car recovery software using a Raspberry Pi processor, fingerprint detection, face recognition, IoT-based Android application, and control platform. The proposed system works by verifying the user’s fingerprint first when the car door is unlocked. After the access is approved, the user enters the vehicle, and then the camera takes the picture of the user and immediately sends a picture of that person with a warning notice to the owner’s mobile application [8].
Begüm Korunur Engiz et al. (2019) developed a cruise control system that tracked several cars along multiple roads using an Arduino board, a camera, and an ultrasonic radar. The vehicles’ speed and location are precisely determined, and the distance is estimated in a short amount of time. The technology will shoot a beam of light to notify the driver if the vehicle exceeds the speed limit established for the road [9].
Shubhangi Sanjay Bhargave, et al. (2018) automated light vehicle cruise control system is designed in specific regions. When a vehicle is traveling at full speed and enters a low-speed zone, the implementation is based on the car’s speed control system. The microcontroller communicates with the sensors to determine the vehicle’s speed, and the controller operates accordingly depending on this information by activating the vehicle’s cruise control mechanism [10].
Arslan Haider, et al. (2017) displayed an automobile ignition system that will replace existing wiring technology while also improving vehicle security. This innovative technology starts the engine via wireless communications, removing the ignition cord from beneath the dashboard. It also allows the user to secure the machine using a password of his or her own. The system has a theft alarm that goes “ON” when unusual activity is detected and/or when the wrong password is used to open the device [11].
Abu Tayab Noman et al. (2018) suggested a car theft deterrent system A PIC16F876A microcontroller, fingerprint, RFID, GPS-GSM modules, and a tilt sensor make up this system. The automobile is controlled via RFID, fingerprint, or password. The tilt sensor detects any broken windows or doors, as well as the vehicle’s movement, and the GPS-GSM module sends a message with the vehicle’s location to the driver’s phone. The technology activates and deactivates the connection to the vehicle’s fuel injector to prevent the automobile from starting. Due to several limitations, such as cost, availability of equipment, and complexity of interfacing, creating an anti-theft security system for vehicle protection with all necessary characteristics is not achievable [12].
Ashok Reddy K. et al. (2019) demonstrated a system that can recognize speed sign labels from roadside speed signboards and alert the driver, allowing the vehicle’s speed to be controlled automatically. When the driver does not accelerate after the warning signal and the vehicle’s speed is decreased to the speed restriction as stated on the speed label, the authorities (traffic officials) are notified of the vehicle’s information. The “ARDUINO UNO” is used to transfer data to cloud storage and to detect the vehicle’s position using the GPRS module. The speed tag label is identified using real-time image processing, and the “ARDUINO UNO” is used to transfer data to cloud storage and to detect the vehicle’s position using the GPRS module [13].
This paper is structured as follows: In Section 2, the methodology of the proposed system is presented, and the hardware and software of the security system model are presented. In Section 3, the principal work of the proposed system is explained. Results obtained are displayed in Section 4; Section 5 concludes this work with a summary of the main results.
2. Methodology
2.1. Proposed System Block Diagram Design
The System Block Diagram Design is in Figure 1. It consists of an application designed and implemented through a Node-Red program that is installed in the Raspberry Pi for vehicle owners who want to control their vehicles in emergency cases. The application will display multiple options containing control of the vehicle’s speed, as well as opening and closing the vehicle doors and the driver’s window and controlling the fuel pump, in addition to transferring photos and videos from inside the vehicle. The proposed system which is installed inside the vehicle includes a Raspberry Pi4 Model B with a Micro Servo SG90 and a potentiometer to control vehicle speed. Relays to control the central lock of the vehicle doors and the driver’s window, in addition, to turning (on/off) the fuel pump. The camera takes photos and records videos from inside the vehicle. This system is operated by Raspberry Pi.
2.2. Implement of the Proposed System
The block diagram that was mentioned in Figure 1 shows the design of the system, which includes two parts. The first is the hardware part, including the Raspberry Pi which is a mini-computer that can control the peripheral devices that are connected to it like, Micro Servo SG90 and a Potentiometer which will be used to control the vehicle’s speed. It will also be linked to the Relays, which will control the vehicle doors, driver’s window, and fuel pump, and further a camera, which will broadcast live photos and videos from inside the vehicle. While the second is the software part, which consists of Nod-Red, through which an application will be designed that is easy to use by the vehicle owner and will be programmed in Python Language. All of these parts will be explained in detail.
Figure 1. The system block diagram design.
2.2.1. Raspberry Pi
Raspberry Pi is a tiny embedded system portable platform. It’s a single-board computer that comes in a variety of variants and runs on an open-source platform that may be used for a variety of applications [14]. It is a low-cost computer that comes with a keyboard and mouse and may be connected to a computer monitor or television [15]. Raspberry Pi is compatible with a variety of operating systems, including Raspberry Pi OS and Linux [16]. It’s a little device that many people may use to learn about computers and Python programming. It contains 40 GPIO (general-purpose input-output) pins are a unique feature. GPIO pins are input/output pins that may be used for several applications. Each GPIO pin can be configured as an input or output pin (in software) [17] [18]. It has a high clock speed and RAM (Random Access Memory) capacity of 1 GB or even 8 GB [19]. Our system includes a Raspberry Pi 4 Model B as shown in Figure 2.
2.2.2. Micro Servo SG90
It is a high-output servo motor that is tiny and lightweight. The servo has the ability to rotate180 degrees [20]. It functions similarly to regular servos, but in a smaller package. It includes three horns (arms) as well as hardware. It has a stall torque of 1.8 kgf cm and a 0.1 s/60 degree working speed [21] see Figure 3.
2.2.3. RELAY HW-316
It is an electromagnetic device that uses to move a collection of arranged contactors or an electronic switch that can be controlled by other electronic circuits; it uses electric power as its energy source [22]. An electronic circuit with low voltage and an electrical circuit with high voltage there is no direct interaction between them. Each of the four channels has three different sorts of links: NC stands for “Normal Closed”, NO is for “Normal Open”, and COM stands for “Common Open” [23] as shown in Figure 4.
2.2.4. Node-RED
It is a no-cost JavaScript-based application. It gives a flow editor with a visual
interface in the browser. The system is organized into nodes, each of which has an icon to represent it. It is a versatile and powerful tool for creating prototypes [24]. Node.js is used in the development environment Node-RED (Nick O’Leary and Dave Conway-Jones-Rapid Event Developer), which is built on JavaScript. It was developed by IBM and is used to connect APIs (Application programming interfaces), physical devices, and web services for the creation of IoT systems [25]. As a result, Node-Red is a useful platform for connecting a variety of IoT devices and can be operated remotely [26].
2.2.5. Python
It is a free and open-source programming language. It’s a programming language that is object-oriented, interactive, and interpretable. Python has a relatively easy-to-understand syntax. It connects to a variety of system functions and libraries. It may be extended in C and C++ [27]. It is a relatively advanced language with several study resources. Python’s syntax is straightforward and elegant. When compared to other languages, Python makes reading and writing programs a lot easier [28].
3. Principal Work of the Proposed System
The proposed system method is working procedure first; In the event, the vehicle is exposed to any emergency case, such as theft. The vehicle owner will be able to use the application installed on his mobile phone, where he will be able to control the vehicle’s speed, in addition to controlling the vehicle’s doors and driver’s window, controlling the fuel pump to turn off and on, and he will be able to monitor the vehicle through the camera inside the vehicle. These options will help the vehicle owner to protect and monitor his vehicle and give him the possibility to recover it. Figure 5 shows the circuit diagram of the proposed system, which describes and explains the work of the system, and the mechanism work of each part in the circuit will be explained in this section in detail. The proposed system is designed to control vehicle speed via Raspberry Pi 4B Kit with MICRO SERVO SG90. It is an attempt to control the voltage coming from the accelerator pedal by controlling the angle of rotation and then controlling a potentiometer (50 KΩ), which divides the voltage coming from the accelerator pedal. The outgoing signal is sent to the engine electronic control unit (ECU), which is responsible for the vehicle’s speed. Relays HW-316 were used to control the vehicle’s doors, windows, and fuel pump. The first and the second relays were used to open and close the central lock of the vehicle, and through it, the opening and closing of the vehicle doors will be controlled. Third and the fourth relays were used to control the opening and closing of the driver window. The fifth relay is used to control the fuel pump and remaining relays for future developments. The live photos will be taken from inside the vehicle through a camera. The implementation is done using the programming system Raspbian OS (operating system) on Raspberry Pi and the Node-RED tool installed on the
Figure 5. Circuit diagram for the proposed system.
Raspberry Pi.
Node-Red a simple application using Python language, which is easy to use for the vehicle’s driver was created. The interior design of this application contains a set of embedded nodes by building a set of input and output nodes and these nodes are programmed each according to their function as shown in Figure 6.
The application interface is shown in Figure 7 includes a control panel with various options for controlling the system designed inside the vehicle.
● The keys from (0 RPM (rotation per minute) to 8 RPM) control the vehicle’s speed.
● Live camera key transmits a live broadcast from inside the vehicle.
● The take photo key was used to take and store photos and record the date and the time of this photo was taken.
● DC SW (switch) ON and DC SW (switch) OFF keys are used to turn on and turn off the fuel pump.
● The DOORS OPEN and DOORS OFF keys are used to open and close the vehicle’s doors after controlling the central lock.
● Windshield open and Windshield close keys are used to control the opening and closing of the driver window.
● Video record key is used to record videos and store them with the date and time, in addition to controlling the duration of video recording as desired by the programmer.
● Capture key is used to take photos without giving an alert to take this photo and it will be stored and the date and the time will be added to it.
4. Results
A modern vehicle is used to test the proposed system. The vehicle’s speed was controlled, by a micro servo and potentiometer. The central lock was controlled, to open and close the doors. The driver’s window was controlled, in addition to turning the fuel pump on and off through the relays. The camera was activated, and the photos and videos were transferred from inside the vehicle as shown in the following Figure 8.
What was previously mentioned was controlled by using the application on the vehicle owner’s mobile, and it was used easily as shown in Figure 9.
Table 1 displays the overall results obtained applying the practical part of the proposed system (vehicle speed control) where the first column shows the switches for the vehicle speed from (0 to 8) as shown on the application interface. The second column represents the values of the micro servo in milliseconds. The third column shows the rotation angle of the micro servo from (0 to 180 degrees). The last column shows how the values of a potentiometer changed, and this change led to a decrease in the voltage coming from the accelerator pedal. The outgoing signal is sent to the engine electronic control unit (ECU). In this way, the speed of the vehicle will be controlled. Figures 10-12 shows the relationships of them.
Figure 8. Circuit designed for the proposed system.
Figure 9. The application on the vehicle owner mobile.
Table 1. Results obtained applying of the proposed system (vehicle speed control).
Figure 10. Relationship between rotation angle and switches (Speed Control).
Figure 11. Relationship between MICRO SERVO SG90 and switches (Speed Control).
Figure 12. Relationship between potentiometer and switches (Speed Control).
5. Conclusion
The main target of this study is to design and execute a vehicle safety system model. The proposed system was tested, and the desired results were obtained by controlling the vehicle’s speed, doors, and windows, controlling the fuel pump, in addition to monitoring the vehicle from anywhere. With the proposed system, it is possible to protect vehicles from theft, reduce accident rates, as well as save the lives of passengers, especially children stuck inside the vehicle. This system can also be applied to ambulances, fire trucks, public and private vehicles.