Types of measuring for quadrature encoders

When working with quadrature encoder hardware you can face three scenarios or should say ways to read the quadrature encoders pulses: X1, X2, X4.

In X1 mode only the rising pulse is considered. For example if channel A rises while channel B is in low level, then it consider positive counting (clockwise). If channel A rises while channel B is in high level, then it is consider negative counting (counter-clockwise).

For X2 mode the rising and falling of channel A is considered. In this mode the counting is doubled compared to X1.

Finally in X4 mode the rising and falling of channels A and B are considered. In this mode the counting is quadruplicated in relation to X1 mode.

Source1: https://www.dynapar.com/technology/encoder_basics/quadrature_encoder/
Source2: https://www.motioncontroltips.com/faq-what-do-x1-x2-and-x4-position-encoding-mean-for-incremental-encoders/

Using ESP32 PCNT as QE: https://www.esp32.com/viewtopic.php?t=4983#p21497

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s