Video není dostupné.
Omlouváme se.
STM32 Timer Encoder: motor velocity and position
Vložit
- čas přidán 14. 08. 2024
- Source Code:
www.patreon.co...
Website:
www.steppescho...
Balancing Robot Course:
www.steppescho...
This video is about working with encoders using Timers in the STM32 MCUs. I will show how to compute the position and velocity of the motor.
Hardware:
STM32 Board: STM32F411E-DISCO
Encoder and Motor: GA25-371
0:00 Theory and introduction
03:09 Timer Encoder configuration using CubeMx Software
04:02 Encoder starting and checking the code using the Timeline graph
05:07 Code to overcome the overflow problem to estimate angular position and velocity
08:09 Final demo
Hello guys,
This video is about robust velocity and position measurement using Encoders. Timers are used to read the encoder's output. Since everything is implemented at a hardware level, minimum code is required😀.
The source code can be found on my community and Patreon pages:
www.steppeschool.com/products/communities/steppeschool-miscellaneous
www.patreon.com/user?u=80399744
Looks like nice way to handle "edge conditions".... I haven't read the timer information, yet, so I was surprised to see overflow on such a low speed operation.
Thanks!
Excellent video! Thank you.
Thanks a lot!
My, what small hands you have when turning the car wheel🤣. Good to see you've got your kid involved. And excellent video, BTW
😂😂. Thanks 👍
Nice video! Thanks for help and explanation!
Glad it helped!
Why does it show zero speed in all cases when I run this code?
Its that with Quadrature Encoder with Differential Signals sir???
Yes it is quadrature encoder
@@steppeschool3629 it posible to used for pmsm motor sir??
sprint("thanks verry much for your video!");
thank you!
Hello nice work! i like your video very much, but i cant find the code, i am already accessable to your web page, please advise the website to your code...thx
Why didn't you simply use the encoding of the channels to find position and then speed? Would've been cleaner, faster and provided more resolution
Because the counter of the timer has limits. It cannot count to an infinity leading to overflow issues. Therefore, it is better to compute the velocity and then position. Hope I could answer your question
Would you please share the link to buy this kind of motors? They look good!
It is called: GA25-371. I bought it in Digikey with a kit.
www.digikey.fr/fr/products/detail/seeed-technology-co-ltd/110090264/10290303?s=N4IgTCBcDaIIwFYCcB2AtHOAGLStgDYAWNAOQBEQBdAXyA
You can also buy it separately. Just google.
I usually mention the hardware I use in the video's description.
You are very smart!
thanks😀
Very nice work , i just want to ask do you mean by the encoder position the distance traveled by the wheel of the motor or the number of ticks done by the encoder . Thank you !
The answer is yes and no. The encoder returns the number of ticks done by the encoder. However, you can scale it to show the real distance traveled by the wheel, by knowing the diameter of the wheel and the number of ticks per rotation. Actual distance = number of tick * (pi * radius of wheel) / (number of ticks per rotation)
Thank you !@@steppeschool3629
velocity here is rad/s ? right ?. I use motor 330rpm around 33rad/s but your code just read 7 rad/s. It is not true
My code shows the velocity in terms of the number of ticks of the encoder. In order to convert it to a physical unit, it is necessary to divide it by the number of ticks per revolution. Then you get a number of revolutions,
@@steppeschool3629 Thank you, I can do it
What software you used to programming
Hi,
I used STM32CubeIde, a standard software tool for programming STM32 MCUs.
bro can u plz send the code and your videos were awesome?
Hello, You can access the source code and other materials on private repositories on GitHub. For that, you need to join my community:
www.patreon.com/user?u=80399744
Pay to play... I guess it's a way of getting actual income for the work