PWM-Based Design of DC Motor Speed and Direction Control System Using STM32 Microcontroller

Read full text
Authors: Akshay Jangid, Harsh Rathore, Ajay Yadav, Simarjit Singh
Cited by: 1

Abstract

This paper presents a comprehensive design and implementation of a DC motor control system that utilises an STM32 microcontroller to achieve precise speed regulation through pulse-width modulation (PWM), integrates an H-bridge driver circuit for bidirectional motor operation, and incorporates a versatile user interface for real-time adjustment of both speed and direction. The STM32’s advanced timer peripherals are configured to generate high-frequency PWM signals (20–25 kHz), enabling fine-grained control of the motor’s effective voltage and delivering smooth performance across the entire duty-cycle range. Bidirectional control is accomplished using an H-bridge driver—such as the DRV8833 or DRV887x—which interprets complementary logic inputs to transition seamlessly between forward, reverse, coasting, and braking modes. This ensures safe switching, minimal electrical stress, and stable dynamic response during direction changes. The user interface component is designed to support multiple interaction modalities, including: (i) an analog potentiometer paired with a direction toggle switch for intuitive hardware-based control, (ii) a USB-CDC (Virtual COM Port) interface enabling PC-based control through sliders or command-line inputs, and (iii) a touchscreen interface developed using TouchGFX, providing an embedded graphical slider and direction toggle for enhanced usability. The key contributions of this work include the seamless integration of PWM-based speed regulation, robust and responsive H-bridge direction control, and flexible multi-modal user interaction. Experimental evaluation demonstrates smooth low-speed performance—with optional decay-mode tuning—fast and reliable direction switching, and effective real-time response across all user interface options. Overall, this system provides a modular, scalable, and educationally valuable framework suitable for applications in robotics, industrial automation, and embedded mechatronics. [1]

Fields of Study & Subjects

Sensorless Control of Electric Motors Engineering and Technology Innovations Advanced Control Systems Design

Publication details

Journal / source
DMPedia Lecture Notes in Multidisciplinary Research
Publisher
Digital Manuscriptpedia
Pages
997–1008
Publication date
13 March 2026