I was working with an Arduino One and this rotary encoder from SparkFun. Then, for no good reason, I put three pull-up resistors, one for each input pin (pin 2, 3 & 4) facing the encoder, like this (only pin 4 is show because small drawing space):
But then I got all kind of problems. Sometimes I could not read the encoder, sometimes I got the push-button pin firing when I just rotate the shaft, sometimes it works randomly, etc. (It's seem to me that behavior was fixed at boot time).
I eliminated the three resistors, and all returns to normal, but, as far I know, this encoder is a simple one; just three switches. I think this is the correct equivalent circuit (just for one pin, the same for the other two):
So, what I'm doing wrong? Did I misunderstand the encoder?
Notes:
- My circuits/sketch is working fine. I can read the encoder & push-button.
- I'm not using interrupts, just polling in a timer fired routine, at 5-10 ms intervals.
- I tested it with internal pull-up on and off.