Adding encoder feedback functionality

I am using incremental encoder for getting feedback of my Z axis movement. I would like to know if it has moved or not. I would like be making it a loop if it has skipped a step.
Below is link of incremental encoder which can be read using timer/QEI pins of STM32H723.

https://www.cuidevices.com/product/motion-and-control/rotary-encoders/incremental/modular/amt13a-series

Can we add this feedback module for motor movement?

+1

I too would love this feature, I designed my own optical based rotary encoder, but Klipper has very little support for these things, currently only support is for filamet motion detection in the extrude direction only.

Try this:

Disable your [display] section. Do not delete, just comment it out.
Put the pins you have for the rotary encoder into the three macros below, restart Klipper and use the encoder.

You should get the messages in the terminal…

#[display]
#lcd_type: st7920
#display_group: _multiextruder_16x4
#cs_pin: PH1 
#sclk_pin: PA1 
#sid_pin: PH0 
#encoder_pins: ^PC4,^PC6
#click_pin: ^!PC2 


[gcode_button rot_1]
pin: ^PC4
press_gcode: M118 rot_1

[gcode_button rot_2]
pin: ^PC6
press_gcode: M118 rot_2

[gcode_button press]
pin: ^!PC2
press_gcode: M118 press

You must have enabled the M118 command by putting [respond] into your klipper.config.

I actually need 4 pins i. e. Signal from encoder is A+, A-, B+, B- and I need to connect to timer pins. It’s a square wave output which we get. That’s how this encoder works. May be different for other encoders. STM32H732 has ability to read encoder. So, I think we need make a module for this to have this functionality. Is there any guide/ help to make a module?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.