Abstract
This paper describes the design and development of an affordable motor speed control for e-bike systems based on the STM32F103C8T6 microcontroller and PWM feedback method. An analog Hall effect throttle is utilized in this design for generating a speed control signal. The speed of a brushless DC (BLDC) motor is controlled through the PWM generated with the help of the microcontroller. Real-time speed feedback is provided with the help of the Hall-effect sensor installed on the motor. The feedback speed is shown on the SSD1306 OLED display using the I²C communication interface. The design includes the IRF540N MOSFET motor driver circuit and the 7805/AMS1117 powered regulated power supply circuits. The embedded firmware programmed in the STM32CubeIDE acquires the throttle signal, generates PWM signal, calculates speed, and displays it on the OLED screen. Testing of the developed controller was performed experimentally in the form of hardware testing, speed calibration, and waveforms analysis. The maximum speed achieved during testing is about 3000 RPM along with stable PWM operation at 10 kHz and efficiency of 83.3%.References
- Krishnan, Ramu. Permanent Magnet Synchronous and Brushless DC Motor Drives. CRC press, 2017.
- Ghosh, Aritra, Subhendu Bikas Santra, Pravat Biswal, and Prasannjit Chhotaray. "Bi-Directional Converter with Modified Multi-Carrier PWM Technique Controlled Brushless DC Motor Drive for Compressor System." International Conference on Communication and Signal Processing (ICCSP), IEEE, 2016, 0623-0629.
- STMicroelectronics, STM32F103C8T6 Datasheet. [Online]. Available: https://www.st.com/resource/en/datasheet/stm32f103c8.pdf
- Zhang, Fengcan, Xiangyu Kong, Fang Li, and Yulin Zhang. "The Design of Controller for BLDC Based on STM32." In IOP Conference Series: Earth and Environmental Science 2020, IOP Publishing, vol. 446, no. 4, 042047.
- Ridwan, Rafid, Fariha Tabassum Oishi, Md Shahed Sadab, and Md Rafid. "Design and Implementation of an Appropriate Motor Controller to Improve the Range of an E-Bike." PhD diss., Brac University, 2023.
- Adeoti, A. J., O. A. Lawal, K. Ahmed, J. J. Kareem, T. A. Mustapha, M. O. Akewushola, and O. V. Olaleye. "Development of an Adaptive Speed Control System for Pedal-Assisted Electric Bikes." Technology (IKRJET) 2025, vol. 1, no. 3, 130-135.
- Mohamed, Mawada, Siti Fauziah Toha, MD Ataur Rahman, and M. O. H. Khairudin. "Smart IoT Energy Optimisation and Localisation Monitoring for E-Bike Sharing." IIUM Engineering Journal 2025, vol. 26, no. 2, 305-325.
- Emon, Asif Eakball, Md Shawon, Sohan Molla, Anika Tabassum, and Sajib Nowjh. "Emerging Designs and Strategies for Overvoltage Protection in Modern Electronics." International Journal 2025, vol. 1, no. 1, 1-13.
- Jangid, Akshay, Harsh Rathore, Ajay Yadav, and Sukhpreet Singh. "PWM-Based Design of DC Motor Speed and Direction Control System Using STM32 Microcontroller." DMPedia Lecture Notes in Multidisciplinary Research 2026, 997-1008.
- Saha, Biswajit, and Bhim Singh. "Back Emf Observer Based Sensorless Bldc Motor Drive with Sepic Converter for Ev Application." IEEE 6th International Conference on Computing, Communication and Automation (ICCCA) 2021, 94-99.

Journal of Electronics and Informatics