FreeJoy icon indicating copy to clipboard operation
FreeJoy copied to clipboard

Noisy rotary encoders

Open elbosmo opened this issue 3 years ago • 5 comments

I've made a simple button box with 3 axis and works very nicely and was easy to do with FreeJoy and the nice config tool.

The only issue I have is with a rotary encoder. I have tried two different models and multiple of the same model. I have tried the 1.7.1b0 and 1.7.0b3 firmware as well. Also I have tried to use different ports on the STM as inputs (C13/14 and B11/B10), in all cases directly connected with "Button Gnd" configuration. I have tried the 1x, 2x and 4x encoder settings. Also tried stronger pull-ups and capacitors etc, but made no difference.

In all cases the encoder does not work without occasional false presses. When rotating one direction, it randomly also has a button press for the other direction, same for rotating the other way. This happens say each full rotation at least once. Rotating slow or fast does not make a difference. It may also have multiple presses while physically only moving it a single notch. It may generate a button press but rarely, when just wiggling knob without passing a notch

I have tested the same encoder with https://github.com/mathertel/RotaryEncoder with an arduino nano. I tested the simple SimplePollRotator example using the "FOUR3" latchmode and it worked without any problems, no false or double readings at all.

elbosmo avatar Mar 05 '22 14:03 elbosmo

I tested FreeJoy encoder code in separate project. It works but pin configuration had to be changed to PullDown. Most of encoders use different polarity than assumed here.

beastieboy avatar Apr 20 '22 04:04 beastieboy

@beastieboy, how can i change the pin to pulldown?

leandrol360 avatar Oct 05 '22 00:10 leandrol360

I am having a similar issue although I haven't tested as thoroughly as @leandrol360.

Merlyn42 avatar Oct 19 '22 13:10 Merlyn42

I'm still having the problem, does anyone have any tips?

leandrol360 avatar Dec 06 '22 18:12 leandrol360