Integrating ESP32 and VESC-Controlled BLDC Motors in Cart Inverted Pendulum Design
DOI:
https://doi.org/10.64515/irdhijtans.v2i1.95Keywords:
Cart Inverted Pendulum, BLDC, Integrating ESP32, VESC Controlled, FreeRTOSAbstract
This paper presents the design and implementation of a cart inverted pendulum system using an ESP32 microcontroller and a brushless DC (BLDC) motor with a Vedder Electronic Speed Controller (VESC). The
cart inverted pendulum is a well-known benchmark problem in control theory due to its nonlinear, unstable, and underactuated nature. The ESP32 System-on-Chip (SoC) is chosen for its high processing power, low-cost,
and low-power characteristics, making it suitable for real-time control applications. The BLDC motor, coupled with the VESC, provides efficient and precise actuation for the cart inverted pendulum system. The VESC,
an open-source motor controller, offers advanced control algorithms and hardware upgrades that enable accurate current, position, and speed control. Integrating the ESP32 and BLDC motor with VESC in the cart inverted pendulum design addresses the need for more efficient and costeffective solutions in this field. The paper discusses the hardware design, software design using FreeRTOS and serial communication, and presents
the results of the hardware and software evaluation. The findings of this study contribute to the advancement of control theory and its applications in various domains, such as robotics and electric vehicles.
References
Journal Articles
Brumand-Poor, F., Kauderer, L., Matthiesen, G., & Schmitz, K. (2023). Application of deep reinforcement learning control of an inverted hydraulic pendulum. International Journal of Fluid Power, 393-418.
Caiado, M. I. (2012). Controllability of a planar inverted pendulum on a cart. arXiv preprint arXiv:1203.4533.
Fauziyah, M., Amalia, Z., Siradjuddin, I., Dewatama, D., Wicaksono, R. P., & Yudaningtyas, E. (2020). Linear quadratic regulator and pole placement for stabilizing a cart inverted pendulum system. Bulletin of electrical engineering and informatics, 9(3), 914-923.
He, J., Li, Y., Wei, Z., & Huang, Z. (2023). Gain-Scheduled Model Predictive Control for Cart–Inverted-Pendulum with Friction and Disturbances. Applied Sciences, 13(24), 13080.
Kuczmann, M. (2019). Comprehensive survey of PID controller design for the inverted pendulum. Acta Technica Jaurinensis, 12(1), 55-81.
Mostafapour, J., Reshadat, J., & Farsadi, M. (2015). Improved rotor speed brushless DC motor using fuzzy controller. Indonesian Journal of Electrical Engineering and Informatics (IJEEI), 3(2), 78-88.
Okokpujie, K., Okokpujie, I. P., Young, F. T., & Subair, R. E. (2023). Development of an Affordable Real-Time IoT-Based Surveillance System Using ESP32 and TWILIO API. Journal homepage: http://iieta. org/journals/ijsse, 13(6), 1069-
Sebasthirani, K., Maruthupandi, P., Manimegalai, M., Silambarasan, N., Vannan, R. M., & Venkatesh, C. (2024). Implementation of AI Tuned PID Controller for Speed and Direction Control of BLDC Motor. Journal of Electrical Systems, 20(7s), 2221-2228.
Seo, Y. W., & Hwangbo, M. (2015). A computer vision system for lateral localization. Journal of Field Robotics, 32(7), 1004-1014.
Shi, X., Xu, Z., Tian, K., & He, Q. Y. (2014). Optimal Control for Wheeled Inverted Pendulum Based on Collaborative Simulation. Applied Mechanics and Materials, 556, 2444-2447.
Siradjuddin, I., Amalia, Z., Rohadi, E., Setiawan, B., Setiawan, A., Putri, R. I., & Yudaningtyas, E. (2018). State-feedback control with a full-state estimator for a cart-inverted pendulum system. International Journal of Engineering & Technology, 7(4.44), 203-209.
Vimala, P., Balamurugan, C. R., Subramanian, A., & Vishwanath, T. (2019). Optimization and comparative analysis of PID and FOPID controller for BLDC motor. IAES International Journal of Robotics and Automation, 8(3), 174.
Proceedings
Banerjee, R., & Pal, A. (2018, December). Stabilization of inverted pendulum on cart based on lqg optimal control. In 2018 International Conference on Circuits and Systems in Digital Enterprise Technology (ICCSDET) (pp. 1-4). IEEE.
Choi, D. (2020). Development of open-source motor controller framework for robotic applications. IEEE Access, 8, 14134-14145.
Choi, M., & Choi, S. B. (2016). MPC for vehicle lateral stability via differential braking and active front steering considering practical aspects. Proceedings of the Institution of Mechanical Engineers, Part D: Journal of Automobile Engineering, 230(4), 459-469.
Her, H., Joa, E., Yi, K., & Kim, K. (2016). Integrated chassis control for optimized tyre force coordination to enhance the limit handling performance. Proceedings of the Institution of Mechanical Engineers, Part D: Journal of Automobile Engineering, 230(8), 1011-1026.
Maier, A., Sharp, A., & Vagapov, Y. (2017, September). Comparative analysis and practical implementation of the ESP32 microcontroller module for the internet of things. In 2017 Internet Technologies and Applications (ITA) (pp. 143-148). IEEE.
Miranda, B. D., de Oliveira, R. S., & Carminati, A. (2021, July). Analysis of FreeRTOS Overheads on Periodic Tasks. In Anais do XX Workshop em Desempenho de Sistemas Computacionais e de Comunicação (pp. 119-130). SBC.
Ozana, S., Docekal, T., Nemcik, J., Krupa, F., & Mozaryn, J. (2021, June). A Comparative Survey Of Software Computational Tools In The Field Of Optimal Control. In 2021 23rd International Conference on Process Control (PC) (pp. 284-289). IEEE.
Siradjuddin, I., Amalia, Z., Setiawan, B., Ronilaya, F., Rohadi, E., Setiawan, A., Rahmad, C & Adhisuwignjo, S. (2018). Stabilising a cart inverted pendulum with an augmented PID control scheme. In MATEC Web of Conferences (Vol. 197, p. 11013). EDP Sciences.
Website
Lin, C. K., & Wang, B. Y. (2022). Analyzing FreeRTOS Scheduling Behaviors with the Spin Model Checker. arXiv preprint arXiv:2205.07480.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Ida Lailatul Fitria, Indrazno Siradjuddin, Ferdian Ronilaya, Gillang Al Azhar, Zakiyah Amalia, Budhy Setiawan

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.




