cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring speed of motor dc encoder in quadrature stm32f4

Cnnon.1
Associate

hello community, 

i am doing a project related to the speed control of a dc motor, to measure the speed i am using an incremental encoder, to make my code i have used the tool STM32CUBEMX and activating the combined mode for reading an encoder, this stage works without problems, but to measure speed I have had several problems, I understand the concept of speed measurement at a theoretical level, but at a practical level I made a solution that works moderately well (works well at high speeds), for this I use an extra timer which I use to count the time and through interruptions I count the ticks of this timer, the problem is that I'm still a beginner and my codes are not quite good, usually after doing something and that works fairly well, I go straight to google to find a code that someone from the community and thus feedback my own codes, but the more I search among the community, I have less hope to find a code that implements this speed measurement with an incremental encoder using a stm32, besides, supposedly the implementation I made should work also for low speed, but it doesn't go well, that's why I ask if any of you have implemented something of this style and that it works. I would be very grateful if someone share some repository with this implementation, or someone could explain to me how to implement this being the most specific possible, I would be guided to find a solution that is satisfactory.

1 REPLY 1
Laurent Ca...
Lead II

Dear @Cnnon.1​  (Community Member)​ 

Could you give more details to the STM32 Community about the material you use (HW and SW, tools and versions, board(s), motor(s) and so on)?

Best regards

Laurent Ca...