Design and Implementation of a Vision-based Wheeled Mobile Robot Using HSV Color Segmentation and P-D Control

Authors

  • Wira Aditama Department of Electrical Engineering, School of Bioscience, Technology, and Innovation, Atma Jaya Catholic University of Indonesia, Jakarta 12930, Indonesia
  • David Herianto Department of Electrical Engineering, School of Bioscience, Technology, and Innovation, Atma Jaya Catholic University of Indonesia, Jakarta 12930, Indonesia
  • Nico Fernando Department of Electrical Engineering, School of Bioscience, Technology, and Innovation, Atma Jaya Catholic University of Indonesia, Jakarta 12930, Indonesia
  • Carolus Henry Department of Electrical Engineering, School of Bioscience, Technology, and Innovation, Atma Jaya Catholic University of Indonesia, Jakarta 12930, Indonesia
  • Nova Eka Budiyanta Universitas Katolik Indonesia Atma Jaya

DOI:

https://doi.org/10.25170/jurnalelektro.v18i1.6892

Keywords:

Mobile Robot, Object Detection, Raspberry Pi, OpenCV, PD Control

Abstract

This study presents the design and implementation of a wheeled mobile robot capable of detecting and tracking a ping-pong ball using vision-based processing. The system integrates a Raspberry Pi 3 Model B+ as the main controller, a Raspberry Pi Camera Rev 1.3 for visual input, and DC motors driven by an L298N motor driver for actuation. Object detection is achieved through color segmentation in the HSV color space using the OpenCV library, followed by morphological filtering and contour analysis. A proportional-derivative (PD) control algorithm is employed to adjust motor speeds dynamically based on the ball's horizontal position in the frame. The experimental results demonstrate that the robot can successfully detect and follow a ping-pong ball, although it exhibits limitations in processing speed and motion stability. The average frame rate during operation was 5 FPS, which is sufficient for basic tracking tasks but suboptimal for high-speed applications. This project highlights the feasibility of vision based robotic systems for simple object tracking tasks.

References

[1] D. Dang and H. Bui, "Real-Time Obstacle Avoidance for Mobile Robots Using Semantic Segmentation

and Monocular Camera," Electronics, vol. 12, no. 8, pp. 1932–1945, 2023. [Online]. Available:

https://www.mdpi.com/2079-9292/12/8/1932

[2] W. C. Kao and S. T. Ho, "An Omnidirectional Mobile Robot for Ball-Catching Tasks Using Stereo Vision

and PID Control," Sensors, vol. 21, no. 9, Art. no. 3208, May 2021. [Online]. Available:

https://www.mdpi.com/1424-8220/21/9/3208

[3] Belaidi, H., Demim, F., Mezhary, A., Rouigueb, A., Yahoui, S., Nemra, A. (2024). Enhanced Navigation

Based Obstacle Avoidance and Target Tracking with Raspberry-Pi for Mobile Robots. In: Djamaa, B.,

Boudane, A., Mazari Abdessameud, O., Hosni, A.I.E. (eds) Advances in Computing Systems and

Applications. CSA 2024. Lecture Notes in Networks and Systems, vol 1145. Springer, Cham. [Online].

Available: https://doi.org/10.1007/978-3-031-71848-9_22

[4] “Raspberry Pi Camera Module Rev 1.3,” RS Components, pdf data sheet (A700000007835051), 2013.

[Online]. Available: https://docs.rs-online.com/2888/0900766b8127db0a.pdf

[5] OpenCV.org, “OpenCV Documentation,” [Online]. Available: https://docs.opencv.org/4.x/

[6] S. Hamza and R. Rathod, "Smart Traffic Monitoring Using YOLO and OpenCV," Journal of Information

Systems Engineering and Management, vol. 10, no. 1, 2025. [Online]. Available: https://jisem-

journal.com/index.php/journal/article/view/5765

[7] M. Bagwe, S. Prakash, and A. Deshmukh, "Implementation of Smart Traffic System Using OpenCV and

Python," Electronics, vol. 11, no. 4, Art. no. 67, 2022. [Online]. Available: https://www.mdpi.com/26737590/4/4/67

[8] Raspberry Pi Foundation, “Raspberry Pi 3 Model B+ Product Brief,” datasheets.raspberrypi.com, May

2018. [Online]. Available: https://datasheets.raspberrypi.com/rpi3/raspberry-pi-3-b-plus-productbrief.pdf

[9] N. E. Budiyanta, C. O. Sereati, and L. Lukas, “P‑D controller computer vision and robotics integration

based for student’s programming comprehension improvement,” TELKOMNIKA (Telecommunication,

Computing, Electronics and Control), vol. 18, no. 2, pp. 899-906, 2020,

doi:10.12928/TELKOMNIKA.v18i2.14881.

[10] A. Saravanan, K. Ravi, and S. Shanmugam, "Performance enhancement of PID-controlled DC motor

using Kookaburra and Red Panda optimization algorithms," Scientific Reports, vol. 15, no. 1, pp. 1–13,

2025. [Online]. Available: https://www.nature.com/articles/s41598-025-87607-2

[11] I. C. Yuniar, R. Nurhadi, and B. Setiawan, "Optimization of PID controller parameters using particle

swarm optimization on DC motor speed control," Int. J. of Robotics and Control Systems, vol. 2, no. 2,

pp. 134–142, Jun. 2022. [Online]. Available: https://arxiv.org/abs/2209.09170

Downloads

Published

2025-06-25