Rotary encoder acting funny

I have a rotary encoder which seems to be working fine when tested with a multimeter. 5v, 0v, 5v, 0v, .... But the funny thing is it's consistent when going anticlockwise but occasionally non-responsive or causes negative values when going clockwise. Like sometimes it'll be at say 50 and one click clockwise should give 53 but it gives 47 instead.

What could be the problem?

Rotary encoders generate pulses - like digital high and low. The actual values may not mean much.

Please read again. :wink:

Post the datasheet or brand name and exact model number for the encoder, post a diagram showing how it's connected to Arduino.
Which Arduino? Post the code running on the Arduino.

Do you have a spare you could use for comparison?

Your code, or the way you have wired it up. Simple as that, so tell us about those things and we can show you how to correct your errors.

I'm beginning to suspect it might be something to do with the Uno board itself. Yes, it's an Uno.

In another situation where I connected an analog pot to the same board, the 5v header outputs 5v when tested but when connected to a pot, it barely reaches 3v. I've tried it with two pretty good quality Japanese pots.

The regulator beside the DC jack does say 5v by the way.

Probably not. Please read and follow the instructions in the "How to get the best out of the forum" post.

when connected to a pot, it barely reaches 3v

Bad idea to overload the voltage regulator.

Finally found out why. The cause of this issue is the same as why my 10K analogue pot was acting weird too since the rotary encoder also used 10K resistors.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.