Design and Implementation of a Multi-Tasking Vehicle Using Raspberry Pi and OpenCV
Abstract
This work investigates how a low-cost embedded platform can achieve reliable sensor fusion and multitask integration for autonomous navigation. A Raspberry Pi serves as the central controller, coordinating heterogeneous modules for line following, traffic-light recognition, ultrasonic-based stopping, audio feedback, and geometric symbol detection. Two key technical issues are examined: (i) the accuracy and reliability of ultrasonic ranging across distance, and (ii) the selection of image preprocessing parameters—particularly Gaussian kernel size and binarization threshold—to ensure robust vision under variable illumination and noise. Experimental results confirm that the bidirectional level shifter achieved stable 3.3–5 V translation, the ultrasonic sensor maintained reliable accuracy within 0–7 m with errors increasing at longer ranges, and optimized preprocessing improved trajectory extraction and template recognition. A discrete PID controller minimized path deviation, enabling smooth motion through curves and intersections. Overall, the findings demonstrate that compact, low-cost platforms can reliably integrate heterogeneous sensors for multitask robotic navigation, providing practical insights for robotics education and broader implications for robust sensor fusion in complex environments.
References
- S. E. Mathe, H. K. Kondaveeti, S. Vappangi, S. D. Vanambathina, and N. K. Kumaravelu, “A comprehensive review on applications of Raspberry Pi, ” Computer Science Review, vol. 52, p. 100636, 2024, doi: 10.1016/j.cosrev.2024.100636.
- J. Li, "OpenCV-based PID control line following vehicle with object recognition and reaction, " in AIP Conf. Proc., vol. 3144, no. 1, p. 050009, 2024, doi: 10.1063/5.0214211.
- R. Linelson, F. R. Saputri, S. D. Wijaya, V. R. Lee, and M. D. Al-Haidar, “A security radar system on a semi-autonomous car based on the ultrasonic sensor, servo motor and Arduino Uno, ” in Proc. 2023 Int. Conf. Smart Cities, Autom. & Intell. Comput. Syst. (ICON-SONICS), Bali, Indonesia, Dec. 2023, pp. 1–6, doi: 10.1109/ICON-SONICS59898.2023.10435222.
- J. Sigut, M. Castro, R. Arnay, and M. Sigut, “OpenCV basics: A mobile application to support the teaching of computer vision concepts, ” IEEE Transactions on Education, vol. 63, no. 4, pp. 328–335, Nov. 2020. doi: 10.1109/TE.2020.2993013.
- X. Hu and J. Jin, “Embedded digital tuning radio based on stm32, ” Journal of Physics: Conference Series, vol. 2417, no. 1, p. 012002, 2022, doi: 10.1088/1742-6596/2417/1/012002
- R. C. Gonzalez and R. E. Woods, Digital Image Processing, 4th ed. London, U.K.: Pearson, 2018.
- N. I. Abdulkhaleq, I. J. Hasan, and N. A. J. Salih, “Investigating the resolution ability of the HC-SR04 ultrasonic sensor, ” IOP Conf. Ser.: Mater. Sci. Eng., vol. 745, no. 1, p. 012043, 2020, doi: 10.1088/1757-899X/745/1/012043
- A. Elen and E. Dönmez, “Histogram-based global thresholding method for image binarization, ” Optik, vol. 274, p. 171814, 2024, doi: 10.1016/j.ijleo.2024.171814.
- S. Dormido and A. Visioli, “PID control, ” in Encyclopedia of Systems and Control, 2nd ed., J. Baillieul and T. Samad, Eds. Cham, Switzerland: Springer, 2021, pp. 1–10. doi: 10.1007/978-3-030-44184-5_245.
- S. Cao, J. Zhu, Y. Li, and R. Ji, "Recurrent homography estimation using homography-guided image warping and focus transformer, " in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), Vancouver, BC, Canada, Jun. 2023, pp. 12790–12799, doi: 10.1109/CVPR52729.2023.01229.
- Q. Chen, W. Wang, Z. Wang, H. Jia, and M. Zhao, "Blurred lesion image segmentation via an adaptive scale thresholding network, " Appl. Sci., vol. 15, no. 17, p. 9259, 2025, doi: 10.3390/app15179259.
- Z. Yang, S. Zuo, Y. Zhou, J. He, and J. Shi, "A review of document binarization: Main techniques, new challenges, and trends, " Electronics, vol. 13, no. 7, p. 1394, 2024, doi: 10.3390/electronics13071394.
- M. T. Gunawan, H. Alwi, and A. R. Al Tahtawi, “The Implementation of Steering Angle Estimation on Miniature Raspberry Pi-based Autonomous Car, ” 2022 IEEE 17th Conference on Industrial Electronics and Applications (ICIEA), Singapore, 2022, pp. 1037–1042, doi: 10.1109/ICIEA54703.2022.10005980.
- M. Zhang, J. Wang, X. Cao, X. Xu, J. Zhou, and H. Chen, "An integrated global and local thresholding method for segmenting blood vessels in angiography, " Heliyon, vol. 10, no. 22, p. e38579, 2024, doi: 10.1016/j.heliyon.2024.e38579.
- L. Liang, Y. Zhang, C. Liu, K. Wang, X. Zhang, and W. Liu, "Noise-robust image edge detection based on multi-scale automatic anisotropic morphological Gaussian kernels, " PLoS One, vol. 20, no. 5, p. e0319852, May 2025, doi: 10.1371/journal.pone.0319852.
- G. Sharma, R. K. Agrawal, and D. S. Chauhan, "An improved morphological approach for noise-robust image segmentation in real-time vision systems, " IEEE Access, vol. 12, pp. 55732–55745, 2024, doi: 10.1109/ACCESS.2024.3389123.
- W. Chen, W. Chi, S. Ji, H. Ye, J. Liu, Y. Jia, J. Yu, and J. Cheng, "A survey of autonomous robots and multi-robot navigation: perception, planning and collaboration, " Robot. Auton. Syst., 2024, doi: 10.1016/j.robot.2024.104567.
- E. Debie, K. Kasmarik, and M. Garratt, "Swarm robotics: A survey from a multi-tasking perspective, " ACM Comput. Surv., vol. 56, no. 4, Article 49, 2024, doi: 10.1145/3611652.
- W. J. H. Brigido and J. M. Parente de Oliveira, "The line follower robot: a meta-analytic approach, " PeerJ Comput. Sci., vol. 11, p. e2744, Mar. 2025, doi: 10.7717/peerj-cs.2744.