Full quadrature encoder - 4x pulses per revolution resolution #235
ilmarietto123
started this conversation in
General
Replies: 1 comment
-
Hi @ilmarietto123, great find, thanks for sharing! Hopefully I can incorporate this in one of the future software versions for H4 and H5. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I bought a 900 pulses per revolution encoder, thinking to achieve 0.1° resolution but I was surprised to read 0.2° on display.
I digged into the code and found out it uses half quadrature.
I tried to implement a full quadrature and it works.
@kachurovskiy, is there some drawback that I'm missing?
Here are the modifications I did to the code:
Line 6
Use the specs value of your encoder multiplied by the gear ratio you have. In my case I have a 900ppr 1:1, so 900.
Line 69
Change from "* 2" to "* 4".
Lines from 1588 to 1594
Replace this part of code or modify and add.
@kachurovskiy, @kotovasia5120: I saw in the last Pull request that you switched to "driver/pulse_cnt.h".
I tested the modifications except i2c display and the full quadrature seems to work too.
I don't post it here because it can make confusion.
Beta Was this translation helpful? Give feedback.
All reactions