Encoder icon indicating copy to clipboard operation
Encoder copied to clipboard

Encoder weirdness

Open jennifervg opened this issue 8 years ago • 3 comments

Switched to this encoder library due to its support of the Arduino due. The encoder seems to be recognized and generate data but when you slowly turn the encoder in either direction you will see that the demo code for this library shows that you occasionally get the motion being reported as opposite of the direction the encoder is being turned.

I believe my encoders are half cycle encoders, can you provide any advice?

jennifervg avatar Jan 07 '17 16:01 jennifervg

Good morning, @jennifervg. Thank you for the bringing up this issue. When you do this do you also notice that the sign of the accumulated counts is opposite what it should be?

zacsketches avatar Jan 07 '17 17:01 zacsketches

Yes, that also goes backwards

jennifervg avatar Jan 07 '17 20:01 jennifervg

I had a similar problem. Random enc1 counts and directions. And then... I realized that the encoder needs to be grounded to the Due rather than the motor driver. : )

Any examples of the library being used on a Due to calculate speed? I want to extract it for use in a PID sketch.

Thanks for all your hard work! It is very easy to use, once the ground is correctly connected!

Peiskos avatar Apr 21 '17 23:04 Peiskos