1.
Introduction
Robotics and
Internet of Things (IoT) technologies have advanced significantly in recent
years and are increasingly integrated into academic projects, automation
systems, and smart applications. Traditional beginner-level robotic cars
typically rely on Bluetooth or infrared modules, limiting operational range and
restricting mobility [1]. Wi-Fi-based systems, on the other hand, offer
extended range, better reliability, and access through smartphones or web
browsers without additional hardware [2]. One of the frequent issues observed
in student-built robotic vehicles is the absence of safety features. When
controlled manually, robots often collide with walls or obstacles due to
delayed human reaction, causing potential damage. To address this,
distance-monitoring sensors such as ultrasonic or infrared modules are commonly
used in autonomous systems [3]. However, integrating sensor-based obstacle
detection with manual control over Wi-Fi in a low-cost prototype remains a
practical learning challenge.
This
research combines these two functionalities—Wi-Fi control and automatic
obstacle detection—into a single affordable robotic platform. The project is
designed for easy understanding, modification, and experimentation, making it
ideal for educational institutions and engineering students.
2.
Problem Statement
Most
educational robotic kits lack integrated safety systems and rely entirely on
manual control. This leads to operational risks, especially for inexperienced
users. Additionally, existing Wi-Fi robotic platforms are often costly and
inaccessible for low-budget student projects [4].
Hence, there is a need for:
1. A low-cost Wi-Fi controlled robotic car
2. A built-in obstacle detection and auto-stop
mechanism
3. A system that is simple, modular, and
suitable for beginners
The
proposed model addresses these needs by combining wireless communication and
safety monitoring in one system. The key objectives of this research are: To design and implement a robotic car controllable via Wi-Fi, To integrate an ultrasonic sensor for continuous
obstacle distance measurement, To develop an automatic stopping mechanism based on real-time sensor data, To ensure that the prototype remains low-cost,
scalable, and easily understandable, To provide an educational model that demonstrates IoT communication and
sensor-based automation.
3.
System Components
The
primary hardware components include:
A.
ESP32 Microcontroller
The
ESP32 is a powerful microcontroller that integrates Wi-Fi and Bluetooth
communication modules. It includes dual-core processors, multiple GPIOs, PWM
pins, and ADC channels Fig 1. Its built-in Wi-Fi capability simplifies the
design because no separate communication module is required. It supports
HTML-based control panels, real-time communication, and IoT protocols such as
MQTT and HTTP.

Fig 1: ESP32 Microcontroller
B.
Ultrasonic Sensor (HC-SR04)
The
HC-SR04 sensor emits ultrasonic waves at 40 kHz and measures the time taken for
the echo to return Fig 2. The distance is computed using the time-of-flight
formula. It offers a measurement range of 2 cm to 400 cm with decent accuracy.
Its low cost and ease of programming make it suitable for obstacle detection.

Fig 2: Ultrasonic Sensor (HC-SR04)
C.
Motor Driver (L298N)
Motor
drivers serve as an interface between ESP32 and DC motors Fig 3. The controller
operates at 3.3 V logic, whereas motors require higher current. The driver
module amplifies the control signals and drives the motors in both forward and
reverse direction.

Fig 3: Motor Driver (L298N)
D.
DC Motors and Chassis Assembly
Two
DC motors mounted on a lightweight acrylic or plastic chassis form the drive
mechanism Fig 4. The chassis includes wheels, mounting brackets, and slots for
electronics.

Fig 4: DC Motors and Chassis Assembly
E.
Battery Pack
The
system is powered using a Li-ion or 12-V rechargeable battery Fig 5. The power
supply must deliver stable voltage to both ESP32 and motors; hence voltage
regulation is included.

Fig 5: Battery Pack
4.
Methodology
A.
System Architecture
The basic
working idea of the system follows a continuous sensing–decision–action cycle.
First, the ultrasonic sensor emits a burst of high-frequency sound waves and
measures the echo’s return time to calculate the distance of any object in
front of the car. This distance reading is then transmitted to the ESP32
microcontroller for processing, as ultrasonic time-of-flight–based measurement
is widely recognized for its simplicity and reliability in short-range object
detection [1][2]. Simultaneously, the ESP32 maintains an active Wi-Fi access
point, through which it continuously receives directional commands from the
user’s smartphone or laptop. This real-time communication is handled through
HTTP or WebSocket protocols, enabling smooth and responsive robot control over
wireless networks [3][4].
Once both
inputs—sensor data and user command—are received, the ESP32 evaluates the
safety condition by comparing the measured distance with a preset threshold.
This decision-making process follows the standard embedded-system approach of
priority-based control, where safety overrides user input if a conflict arises
[5]. If the detected obstacle is outside the danger zone, the controller
forwards the user’s movement command to the L298N motor driver, which regulates
the motors and moves the wheels accordingly. However, if the object is too
close, the ESP32 immediately disables the motor driver signals to prevent
motion and stops the car instantly. This type of automatic override mechanism
is commonly used in collision-prevention robotics and is essential for ensuring
safe operation in semi-autonomous systems [6][7].
The cycle
repeats continuously at high frequency—multiple times per second—allowing the
car to react quickly to dynamic obstacles. Such rapid sensing and control loops
are critical in small mobile robots, where delays of even a few hundred
milliseconds can lead to collisions or unstable movement [8][9]. By combining
Wi-Fi control with real-time distance monitoring, the system effectively
integrates manual operation with autonomous safety intervention, reflecting
modern IoT-robotics architectures that emphasize both user convenience and
environmental awareness [10].
B.
Block Diagram (Brief Explanation)
The
block diagram shows how all the parts are connected: the ultrasonic sensor acts
as the input, the ESP32 works as the control unit, and the motor driver plus DC
motors form the output or actuation unit Fig 6. The battery is connected so
that all sections receive stable power. The Wi-Fi module inside the ESP32
communicates with the user interface.

Fig 6: Block Diagram
The
block diagram illustrates the interaction between the sensing unit, control
unit, communication module, and actuation system. The ultrasonic sensor
continuously measures the distance to obstacles and sends this data to the
ESP32 microcontroller, which acts as the central processing unit. The ESP32
also receives user commands through its built-in Wi-Fi module from a mobile or
web interface. Based on both the real-time sensor readings and user inputs, the
ESP32 decides whether the car should move or stop. These control signals are
passed to the motor driver, which supplies the required power to the DC motors
for movement. A battery pack powers the entire system, ensuring stable
operation of the motors, sensor, and controller. This architecture enables
wireless control while maintaining automatic obstacle detection and safety
stopping
C.
Working Principle
1. The
ESP32 starts its Wi-Fi network.
2. A
user connects to it and opens the control page.
3. The
ultrasonic sensor constantly checks the distance ahead.
4. If
the distance is greater than the safe limit, the car moves normally.
5. If
something is too close, the ESP32 sends a stop signal.
6. Once
the obstacle is removed, the car moves again.
PROTOTYPE:

Fig 7: Prototype
5. Innovation
This project offers several
innovative aspects:
1.
Combines manual Wi-Fi control with real-time automated
stopping.
2.
Provides an educational IoT demonstration platform.
3.
Uses ESP32 for dual functionality (control + communication).
4.
Designed as a cost-effective alternative to commercial
robotic kits.
5.
The modular structure allows easy upgrades such as camera,
GPS, or LiDAR [7].
6. Results And Discussion:
The
performance of the Wi-Fi Controlled Distance Monitoring Car was evaluated under
controlled indoor environments and semi-open outdoor conditions to examine its
operational reliability, sensor accuracy, communication stability, and safety
response. The results indicate that the integrated system successfully performs
the dual functions of wireless mobility control and automatic collision
prevention. The Wi-Fi module embedded in the ESP32 demonstrated strong and
stable connectivity within a 20–30
meter indoor range, which aligns with earlier studies reporting similar
performance for low-power Wi-Fi modules in obstructed environments [1][2]. In
open outdoor spaces with minimal interference, the effective range extended
beyond 45–50 meters, confirming
the capability of the ESP32 to sustain longer-range communication when
line-of-sight conditions are available. This validates previous findings that
Wi-Fi-based robotic platforms outperform Bluetooth-controlled systems in range
and data throughput [3].
Distance
measurement accuracy of the HC-SR04 ultrasonic sensor was observed to be
consistent up to 200 cm, with an
average error margin of ±1.5 cm,
which is comparable to the accuracy values reported in sensor performance
benchmarks [4][5]. Minor measurement fluctuations were attributed to
environmental factors such as room temperature, humidity, and the angle of
incidence, which is consistent with existing research indicating that
ultrasonic sensors are sensitive to surface texture and air density variations
[6]. One key outcome of the study is the auto-stop response behavior. When an obstacle appeared within the
preset threshold distance (20–25 cm), the system executed a stop command with a
measured reaction time of approximately 200–300
ms. This delay includes sensor processing, signal transmission, and
motor driver response. Similar delay observations have been documented in
earlier robotic safety-control studies, where sub-second reaction times are
considered sufficiently effective for low-speed autonomous or semi-autonomous
vehicles [7][8]. This confirms that the proposed system meets the safety
requirements for prototype-level robotics.
The motor
driver performance remained stable during the initial operational period;
however, a gradual decrease in torque and movement speed was observed when the
battery voltage dropped below 7V.
This reflects typical DC motor behavior under low-voltage conditions and aligns
with the findings of prior motor performance analyses in battery-powered robots
[9]. The ESP32 continued functioning reliably due to internal voltage
regulation, although prolonged under voltage may reduce stability over extended
periods. Overall system stability was evaluated during simultaneous Wi-Fi
control and continuous distance sensing. The car responded promptly to
directional commands, with negligible latency in command execution, supporting
earlier research stating that Wi-Fi-based control systems can maintain stable
real-time robotic communication when network congestion is low [10]. The
integrated obstacle detection mechanism allowed safe operation even when users
made delayed or incorrect directional inputs, suggesting that the system
effectively compensates for human error an important aspect highlighted in
modern collision-avoidance robotics literature [11].
In summary,
the results demonstrate that the prototype achieves its intended objectives by
combining low-cost components with reliable wireless control and real-time
safety monitoring. The system shows strong potential for use in educational
laboratories and as a foundation for more advanced IoT-based robotic
applications. Although the ultrasonic sensor has known limitations with soft or
angled surfaces, and Wi-Fi range varies with interference levels, the overall
performance of the model is consistent with or superior to similar low-cost
robotic systems reported in prior studies [12].
7.
Conclusion
The present
study successfully demonstrates the design and development of a Wi-Fi
controlled robotic car equipped with a distance monitoring and automatic
collision-prevention system. The prototype integrates wireless control,
real-time sensing, and safe motion handling in a compact and affordable
platform. By utilizing an ESP32 microcontroller, ultrasonic sensor, and motor
driver module, the system achieves smooth mobility, stable wireless
communication, and reliable obstacle detection.
The results
of the study indicate that the robot performs effectively within typical indoor
and outdoor conditions. The Wi-Fi connectivity provides a convenient and
flexible means of controlling the vehicle without the range limitations of
Bluetooth-based systems. The ultrasonic sensor accurately measures distances
and ensures that the car stops automatically when an obstacle enters the
predefined safety threshold. This makes the system significantly safer and more
user-friendly, especially for beginners or for use in laboratory settings where
accidental collisions are common. An important strength of the proposed system
is its affordability and simplicity. The components are low-cost, easily
available, and easy to integrate, making the design suitable for students,
hobbyists, and educational institutions. The modular nature of the prototype
allows users to modify or expand it further such as adding a camera, GPS
module, or additional sensors making it a flexible learning platform for
various robotics and IoT applications. The project also carries strong
educational value. It allows learners to understand fundamental concepts such
as microcontroller programming, wireless data transmission, PWM motor control,
sensor integration, and embedded system design. This broadens opportunities for
hands-on experimentation and helps foster practical engineering skills.
In
conclusion, the Wi-Fi Controlled Distance Monitoring Car serves as an effective
introductory platform for learning, experimentation, and small-scale robotic
applications. Its combination of affordability, simplicity, wireless control,
and safety features makes it a valuable contribution to educational robotics.
The system also provides a strong foundation for future enhancements, such as
autonomous navigation, real-time video streaming, or advanced sensor
integration, offering wide potential for continued research and development.