Encoder 60 pulse

Hello everyone. There is an encoder of 60 pulses per revolution. during slow rotation, pulses are counted as expected. if you accelerate the rotation, then the pulses are duplicated. that is, we rotate clockwise, but the pulses appear as counterclockwise rotations. if you reduce the speed of rotation, everything is fine. I tried pulling 10kom. and 220 ohms. nothing changes. tried another encoder as well. Tell me what you can do. I use nkrkv / encoder.

There will be limits to how quickly an Arduino can processes encoder pulses. If there is a lot of other code running at the same time, the limits will be even more restrictive. I don’t know if you are already hitting those limits or if you are experiencing a different issue.

You could try to test if this is the issue. If you have a bunch of other code, trying pulling out just the encoder counting in a patch by itself & see if it can count faster rotations. If your code is already pared down to the minimum, you could try adding some compute-intensive code and see if the problem starts at slower rotational speeds. I’m afraid I can’t be of much more help since I haven’t worked with encoders or that library.