Rotary Encoder 500ppr Resolution

Encoder 500 Banner

In this post, I’ll be reviewing the B-106-23983 Rotary Encoder. It is made by ESB and has a resolution of 500 pulse per round.

IMG_1661

This is a high-end rotary encoder and is used in critical automated applications. It is mostly found in industry machines rather than consumer electronics.

It costs RM 350 as stated in the cytron website.

cytron_price

Below are the technical specifications extracted from the datasheet.

encoder_tech_specs

Rotary encoders produce pulses at the output when the shaft is rotated. It is used to track rotational movement and the data can be used by a microcontroller to determine how far and how fast the movement is.

IMG_1656

There are 3 output channels, A, B and Z.

Channels A and B produces the exact same pulse but differ in phase by 90 degrees. This is used to detect the direction of the rotation (clockwise or anticlockwise). Below is an illustration on how the output looks like in both scenarios (CW or CCW).

Channel Z produces a pulse when the shaft completes a single revolution. It can be used to check and confirm that the shaft has completed one full turn.

output

As mentioned, this encoder is capable of 500 pulse per round when using 1X Encoding.

1X encoding means detecting only the rising or falling edge of the pulse. 2X encoding means detecting both the rising and falling edge. 4X encoding means detecting both the rising and falling edge of both channels A and B. Meaning when using 4X Encoding, the resolution can go up to 2000 pulse per round!

I’m using Pinguino PIC18F4550 to interface with this rotary encoder. The output is connected to an interrupt pin to count the pulse.

pinguino_code

The code will update both the LCD and the serial interface with the total pulse count. The serial interface is connected to a PC to record the live readings.

To test this, I’ve simply rotated the shaft and let it rotate until it gradually stops.

The data is being recorded by an UART software. I’m using a Pickit 2 which can act as an UART interface.

uart

The data is then transferred to excel to plot a graph.

excel_graph

excel_graph

This is a brief showcase on how to obtain data from a rotary encoder and translate it into useful data in the form of a graph.

Thanks for reading.

  1. WushuMike01-25-2016

    Hi Wai Hung,

    I’m also working on similar project, to record the distance travelled (no encoder pulse), save and output via a printer with time stamp.

    I’m using Arduino Uno , with I2C realtime clock and I2C 2×16 LCD.
    My encoder is similar 500ppr quadrature type, and I have tried other programs using interrupts, but I’m having problem.
    When testing, CW will read the pulse correctly but when I rotate CCW ; there seems to be errors in the reading. (example if I CC to 1000 pulse which was diplayed by the LCD, rotating CCW pass 1000 pulse will give an error instead of – value.

    Can share your coding? Much appreciated.

    Best Regards
    Michael

Leave a Reply