2017-01-03 04:00 AM
I am trying to use a potentiometer and an encoder input from the motor to control the motor in closed loop, but I don't know how to go aout it?
Should I compare the encoder with ADC or should I compare it with input pwm signal?
Please Help
#timer #closed-loop #control #motor #encoder2017-01-03 05:09 AM
Dear
Mor.Keyshav
, Have a look to this Application note , it may help you on TIM configuration in encoder mode and advanced features for motor control applications. You can inspire from an example withinCubefirmware package to develop your application which has the 'TIM_Encoder' example, like STM32CubeF4:STM32Cube_FW_F4_V1.0\Projects\STM324xG_EVAL\Examples\TIM\TIM_EncoderHope this helps you.
Best Regards
-Imen-
2017-01-06 12:20 AM
Dear Imen,
Thank you for the help & apologies for the late reply . I tried the example, but unfortunately it is returning a value of zero for the encoder variable. I am really confused about how to use the encoder for the closed loop control. Anywhere on the internet where I can get a stm specific example. I will go through the STM32F4 Example.
Regards,
Keyshav
________________ Attachments : image001.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hyzx&d=%2Fa%2F0X0000000bF7%2FjX0jcgmRPWhO_nDjA47UZM8KziCU7Bg_FWITtuDVnLo&asPdf=false