Encoder library confusion: DC motor, with 512 PPR encoder

I have a Flauhauber micro motor with 27:1 gear reduction, on my desk. I attach the encoder (a) & (b) to pins 2 & 3 Arduino NANO interrupt pins. Load a test-sketch, with the "ENCODER" library, enable interrupts:

Encoder Library

BEFORE I move on to my H-bridge testing, I manually move the motor without power on the drive leads, just powering the onboard encoder to test the readings. I spin this with my fingers, and the encoder counts go WAY HIGH past what I'm expecting. I turn this thing maybe 5 or 10 degrees, and thousands of counts register.

I then start powering the motor, too see how many counts it actually wants to perform. My test results find (1) 360 degree revolution is 102400 encoder COUNTS . This is nowhere near what the data-sheet explains as what I believe was "512 PPR" (pulse-per-revolution).

Can someone help me figure out what is going on and why my calculations are so far off? If this is a quadrature encoder signal, MAYBE it's 512 x 4 = 2,048 counts if the library counts each rise & fall on the a & b signal (or 512 x 8 = 4096), as step movement. I would have to multiply 512 x 200 in order to get 102400, which does not make any sense to me. I was hoping someone else knew more of what was going on, probably has a simple explanation, please.

Can you provide a like to the specific encoder used on that motor?

Most encoders have open collector outputs and will require pull up resistors on the A B outputs.

Your library link is broken.

(fixed: Library link)

Faulhaber IE2-512

Add 4.7K pullups on the A/B outputs to the nano's vcc. The encoder library should activate the internal pullups on pins 2 and 3 but they may not be strong enough.

Also, make sure the encoder GND is connected to the Arduino GND?

The encoder is on the motor shaft, the output shaft is from the gearbox, so the encoder will count
27 times faster of course, 13800 ppr or so referenced to the output shaft.

Different manufacturers use different nomenclature about "pulses per revolution". Some refer to total counts available when using both channels and both pulse edges. Other use it for the basic number of pulses on one channel which can be read in ways to provide counts which are 1X 2X or 4X the number of pulses.

I would expect 512 x 27 x 4 = 55296 with Encoder.h using pins 2 and 3 which are both interrupt pins. The library will default to 4x counting.

If you count the RISING and FALLING edges of BOTH channels you get 4 times 512 = 2048.