Encoder icon indicating copy to clipboard operation
Encoder copied to clipboard

undercounting steps only in one direction, only when going slowly, with a linear encoder

Open kittles opened this issue 3 years ago • 0 comments

Description

I have a linear encoder (x axis dro from a mill) which has 5000 steps per inch. I've confirmed it a quadrature encoder and i have the pinout correct. When using the encoder library with pins 2 and 3 on an elegoo uno r3, it reads correctly one direction, but in the other direction is vastly undercounts- but oddly, only if im moving it slowly. if i move the encoder head quickly in the problem direction, it counts the steps fairly accurately.

Steps To Reproduce Problem

probably cant since you dont have my specific encoder- unless you have a random chinese import sgc-6 500mm linear encoder

Hardware & Software

Board: Elegoo uno r3 Arduino IDE version: 2.0.3

Arduino Sketch

#include <Encoder.h>
Encoder my_enc(2, 3);

void setup() {
  Serial.begin(9600);
}
void loop() {
  Serial.println(my_enc.read());
}

kittles avatar Jan 04 '23 19:01 kittles