This paper presents the design and implementation of an autonomous robot capable of performing both line following and obstacle avoidance using an Arduino microcontroller. The system integrates infrared (IR) sensors for path detection and an ultrasonic sensor for obstacle detection. A non-blocking control strategy based on time tracking is employed to ensure continuous sensing and real-time responsiveness. Additionally, sensor noise is minimized using filtering techniques, improving operational stability. The robot prioritizes obstacle avoidance over line tracking, enabling safe navigation in dynamic environments. Experimental results demonstrate improved responsiveness and reliability compared to conventional delay-based systems.
Introduction
The text describes an improved autonomous line-following robot that can also avoid obstacles, addressing a key limitation of basic line-following systems. Traditional robots often use blocking delays that reduce responsiveness and prevent continuous sensor checking, so this work introduces a non-blocking, state-based control system for smoother real-time operation.
The robot is built using an Arduino UNO microcontroller, IR sensors for line detection, and an HC-SR04 ultrasonic sensor for obstacle detection, along with a motor driver and DC motors. It operates in two modes: line-following and obstacle avoidance. In normal operation, IR sensors guide movement along a predefined path using filtered readings to reduce noise. When an obstacle is detected within 20 cm, the robot switches to avoidance mode, where it stops, moves backward briefly, and turns right before resuming line following.
To improve reliability, the system uses sensor filtering techniques such as averaging ultrasonic readings and majority voting for IR sensor signals, reducing noise and false detections. The behavior is implemented using a state-machine structure and modular programming for better efficiency and scalability.
Conclusion
This paper presents an efficient and reliable implementation of a line-following and obstacle-avoiding robot using Arduino. The integration of non-blocking control, state-based logic, and sensor filtering significantly improves system performance. The robot demonstrates stable operation and real-time responsiveness, making it suitable for educational and practical applications. Future enhancements can future improve adaptability and intelligence.
References
[1] M. Rahman, T. Yeasmin, and M. M. Hasan, “STM32-Based Obstacle Avoiding Line Follower Robot,” Proceedings of the International Conference on Computing Advancements, 2024.
[2] D. V. Pham, “A Wheeled Obstacle Avoidance Robot Based on Arduino Microcontroller by Fuzzy Controller,” International Journal of Research in Vocational Studies, vol. 1, no. 4, pp. 71–76, 2022.
[3] R. Mardiyanto, A. Suhartono, and R. F. Siregar, “Development of Path Planning of Line Follower Robot with Obstacle Avoidance Based on Particle Swarm Optimization,” IOP Conference Series: Materials Science and Engineering, vol. 732, 2020.
[4] “Intelligent Tracking Obstacle Avoidance Wheel Robot Based on Arduino,” Procedia Computer Science, vol. 166, pp. 274–278, Elsevier, 2020.
[5] Arduino, “Arduino Documentation,” [Online]. Available: https://www.arduino.cc
[6] HC-SR04 Ultrasonic Sensor Datasheet.
[7] L298N Dual H-Bridge Motor Driver Datasheet.