STM32 TIMERS #3. ENCODER MODE || F103C8

  Рет қаралды 63,161

ControllersTech

ControllersTech

Күн бұрын

Пікірлер: 55
@86Nezar
@86Nezar 3 жыл бұрын
Timer counter increasing/decreasing by 4 because it counting each edges from both channels, if you change config for this timer then you should see increasing/decreasing by 2
@86Nezar
@86Nezar 3 жыл бұрын
Change Encoder Mode to T1 or T2 not both if I remember correctly that means which channel is master and it is depend when timer CNT will increase for CW or CCW
@ControllersTech
@ControllersTech 3 жыл бұрын
I can see how using T1 or T2 alone could work but how will it identify the jitters ? Since it only rely on the signal from 1 channel and then compare it with the signal from another channel at that particular instant, how will it know if it was a deliberate movement or a jitter
@86Nezar
@86Nezar 3 жыл бұрын
@@ControllersTech in t1 or t2 mode timer incrementing CNT by 2 so also you will have jitter filtering, but for sure it will not be so effective like in t1 and t2 mode. From reference if you use t1 or t2 one input is used as a clock and timer increasing/decreasing CNT depends on second input level, in t1 and t2 both inputs working as a clock (edge trigger f/r) and also as a signal (low/high), if edge will occured on t1 then timer "checking" t2 level and if edge will occured on t2 timer "checking" t1 level.
@onuryorutken5540
@onuryorutken5540 2 жыл бұрын
@@ControllersTech Manual says : Programmable counting rate x4: normal mode, all edges active a 1000 lines encoder will give 4000 counts per revolution x2: counts on input A (or B) only, but direction still determined with A and B “velocity mode”: encoder clock can be further prescaled if needed
@hamouz718
@hamouz718 3 жыл бұрын
Incredible explanation, this channel deserves more subs
@filmweaver2013
@filmweaver2013 10 ай бұрын
Very well explained! A lot of good information in a short video, thank you!
@AhmadAsmndr
@AhmadAsmndr Жыл бұрын
I cannot thank you enough. Your Videos are amazing.. thank you!
@unholy1771
@unholy1771 10 ай бұрын
the counter increases by 4 because the callback function is called upon the encoder mechanical zero, and because you used rising & falling edge detection. In the reference manual: "the user can obtain dynamic information (speed, acceleration, deceleration) by measuring the period between two encoder events using a second timer configured in capture mode. The output of the encoder which indicates the mechanical zero can be used for this purpose."
@AxGxP
@AxGxP Жыл бұрын
6:28 Why you think the prescaler will not work? Is it some documents about it? I use prescaller with value 3, and dont need to divide counter value by 4 in the future.
@unknownhuman1000
@unknownhuman1000 3 жыл бұрын
Your counts per click depends on the type of rotary encoder. My alps encounter does one count per click. I also have an encoder like yours which does 4 counts per click.
@mmt1024
@mmt1024 3 жыл бұрын
That's much better version, definitely you deserve for more subs :P
@remreergun
@remreergun 2 жыл бұрын
for increasing/decreasing by 4 problem, try Prescalar(PSC) value as 4 🤗
@AxGxP
@AxGxP Жыл бұрын
Not 4, but 4-1=3. It really works!
@panamera970
@panamera970 3 жыл бұрын
Thanks for very detailed explanation. Very helpful. Can you make video for PID motor control with Encoder. Thanks.👍
@vinayak4778
@vinayak4778 3 жыл бұрын
Thanks sir for this wonderful video.❤️
@MohammadNejad-h4x
@MohammadNejad-h4x Жыл бұрын
Thanks a lot for your great videos. It would be great if you could please make a video on how to read encoder with DMA. I think it is very helpful for high res encoder application
@_Neel_Patel_
@_Neel_Patel_ 2 жыл бұрын
Please make a video on PID control.
@kamronbekumidjonov2216
@kamronbekumidjonov2216 2 ай бұрын
Very good thank you
@botak333
@botak333 Жыл бұрын
It posible to used incremental encorder ABI?? 600 until 2500ppr?? But i want to used CPR
@eXtremeElectronics
@eXtremeElectronics 2 жыл бұрын
Good work !
@dymastro788
@dymastro788 3 жыл бұрын
Really great channel! Like the voice
@Fr4nzB0OM
@Fr4nzB0OM Жыл бұрын
Hi @ControllersTech I've watched many videos of yours and I have to tell that you are amazing. Very understandable and interesting videos. I have one question about the encoder: why sometimes I see, between one step and another of the encoder, the timer reads 3 or 5 steps, instead of 4?
@yongxiangu6969
@yongxiangu6969 2 жыл бұрын
How to use another timer to periodically trigger DMA to capture the value of the rotary encoder ?
@jackiewang7725
@jackiewang7725 3 жыл бұрын
I don't know why it not works on my board. I have to change to TIM1 and everything works as expected. Probably hardware problems.
@ИльяСыромятин
@ИльяСыромятин 2 жыл бұрын
It start counting clicks only after second click, after rotation start. If I do only one click, it is not counts it. STM32F413VG. P.S. Sorry, it was no name chinese encoder. Encoder from Bourns do it well, from the first click.
@ajithpinninti8845
@ajithpinninti8845 2 жыл бұрын
Thank You so much man
@MBI99M03
@MBI99M03 Жыл бұрын
Thanks for sharing this video that is useful for me. I am wondering what software you used to code and to compile on this video. Can you share this software name to me, thanks in advance.
@hoanghoangchannels2469
@hoanghoangchannels2469 Жыл бұрын
hello why in void HAL_TIM_IC_Capture...( ... ) { ....} you do not use htim2, but using htim?
@amanaggarwal5217
@amanaggarwal5217 2 жыл бұрын
how would we write the same program for 2 encoders. Especially the capture function for two different timers? Can someone please paste the solution
@yusufselimyuceer1218
@yusufselimyuceer1218 Жыл бұрын
Hello, my live expressions value change 0 and 1. How can I solve it ? Do you have any ideas ?
@francescoguerrini5559
@francescoguerrini5559 Жыл бұрын
Does this work for optical encoders too?
@daniekvanderkop7220
@daniekvanderkop7220 3 жыл бұрын
Hello, do you also know how to count an encoder like this with LL and not HAL? So functions won't start than with HAL_TIM_.... but with LL_TIM_..... We would like to know this because the names are a bit different then.
@ControllersTech
@ControllersTech 3 жыл бұрын
There is more to LL than just replacing the characters "HAL" with "LL". You need to have good understanding of the peripheral. Read the reference manual for that
@julians0
@julians0 3 жыл бұрын
Some one video configuration DMA, I can't to do it
@imanmamed1
@imanmamed1 Жыл бұрын
could you please make a video on encoder with DMA. thanks
@space2373
@space2373 3 жыл бұрын
Thanks . Can you make video for stepper motor speed and direction control with rotary encoder .
@ControllersTech
@ControllersTech 3 жыл бұрын
There is already a video for stepper speed and direction. Just connect this one to that..
@juanmoreno1467
@juanmoreno1467 Жыл бұрын
how can i make it track the distance traveled
@ControllersTech
@ControllersTech Жыл бұрын
use maths (RPM, circumferece, etc..)
@ramazanyarbi
@ramazanyarbi 7 ай бұрын
👏
@2cyclone493
@2cyclone493 10 ай бұрын
thanks
@JoaoNelsonLima
@JoaoNelsonLima 3 жыл бұрын
Muito bom. Parabéns
@saustin98
@saustin98 3 жыл бұрын
Thanks for this! What application are you using to view the PDF? I like the way it shows the index. Please let me know.
@ControllersTech
@ControllersTech 3 жыл бұрын
Okular
@prashantwaiba2290
@prashantwaiba2290 3 жыл бұрын
Sir, kindly request you to make a video on timer triggerd adc dma and uart.
@walkersky8946
@walkersky8946 Жыл бұрын
My project is not work. Can y send me your project, please!
@jorgejacome4269
@jorgejacome4269 3 жыл бұрын
Hi Arun would you be interesting to have a real encoder , i have SICK encoders that can be programmed the number of pulses per revolution ,TTL or HTL outputs . let me know your preferences and will send it to you for more of your videos and experiments Jorge
@ControllersTech
@ControllersTech 3 жыл бұрын
Yeah sure. It would be nice to work with something like that
@jorgejacome4269
@jorgejacome4269 3 жыл бұрын
@@ControllersTech How can I send 2 encoders ?
@fernandocatalani8295
@fernandocatalani8295 2 жыл бұрын
Master, how may i get the direction of the encoder? Has some hal function that returns the encoder direction? Many thanks!
@ControllersTech
@ControllersTech 2 жыл бұрын
It's explained in the video.. see how the count is decreasing..
@suriyaa1282
@suriyaa1282 Жыл бұрын
Can I get the code
Incremental Encoder and Servo Angle Control in STM32 || PWM
19:39
ControllersTech
Рет қаралды 21 М.
STM32 Guide #3: PWM + Timers
20:24
Mitch Davis
Рет қаралды 157 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
STM32 TIMERS #4. INPUT CAPTURE  || Frequency and Width
13:57
ControllersTech
Рет қаралды 52 М.
How to control a DC motor with an encoder
9:30
Curio Res
Рет қаралды 471 М.
Interfacing with Quadrature Encoders
9:00
Texas Instruments
Рет қаралды 20 М.
3 engineers race to design a PCB in 2 hours | Design Battle
11:50
Predictable Designs
Рет қаралды 574 М.
STM32 TIMERS #5. Master Slave Synchronization using the TRIGGER MODE
15:38
STM32 TIMERS #2. PWM Input
16:23
ControllersTech
Рет қаралды 35 М.
Decoding Rotary Encoders with STM32 | Truestudio + CUBEMx
12:15
Beyond Breadboard
Рет қаралды 19 М.
STM32: First Blinking LED Project
22:11
Electronic Wizard
Рет қаралды 10 М.
НИКОГДА не иди на сделку с сестрой!
0:11
Даша Боровик
Рет қаралды 729 М.
Лайфхак: Легально делать деньги
0:43
Лайфхак: Легально делать деньги
0:43
КОРОЧЕ ГОВОРЯ, НЕДЕЛЯ БЕЗ ТЕЛЕФОНА
3:54