Posts

DC Motor Control

Building a DC Motor Control System with STM32: My Journey So Far Hey everyone! I'm excited to share the journey of my personal project: building a DC motor control system using an STM32 microcontroller. This project has been a good learning experience. You can check out the code and project details on my GitHub Repository . Here’s a look at my progress and the problems I've tackled along the way. Early Steps: Encoder Integration and Quadrature Decoding My first major task involved getting the encoder working to accurately measure motor position and speed. Encoder Testing: I started by powering the encoder with the STM32 and observing the phase difference between Channel A and Channel B while spinning the motor. This was crucial for understanding how to decode the encoder signals. Quadrature Decoding: The goal was to efficiently count encoder ticks. I configured a GPIO pin as an interrupt and used its weak callback function to compare pin states, allowing me to inc...