+ Post New Thread
Results 1 to 2 of 2
  1. #1
    Newbie level 1
    Points: 16, Level: 1

    Join Date
    Dec 2015
    Posts
    1
    Helped
    0 / 0
    Points
    16
    Level
    1

    Rotary encoder issue - oscillating values while encoder is stationary

    Hi, I'm trying to build a DC motor regulation circuit, however I'm having some trouble with getting my rotary encoder to work properly. I tested the encoder in a pretty simple manner: I hooked it up to my Arduino board, and monitored one of the encoder channels on my PC. The output of the channel was in a form of oscillating pulses while the encoder was completely still; if my understanding of encoders is correct, while the encoder is still, the output should be either 0 or 1, when read as a digital value.
    I have programmaticaly enabled pull-up resistors (built-in the Arduino board) for the encoder channel pins, and have also grounded the shield wire from the encoder.
    I have provided a picture of the encoder channel response.

    Click image for larger version. 

Name:	enkoder_response.jpg 
Views:	8 
Size:	52.9 KB 
ID:	124076

    My question is, is there something basic about encoders I have overlooked (for example, wiring), and the oscillating encoder channels would be a symptom thereof? That would be quite possible as I am quite new to the practical side of controlling systems. I am happy to provide additional information if anyone is interested in trying to help me out.

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 29,644, Level: 41
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,863
    Helped
    1115 / 1115
    Points
    29,644
    Level
    41
    Blog Entries
    9

    Re: Rotary encoder issue - oscillating values while encoder is stationary

    It is absolutely normal to expect some oscillation at encoder pins, particularly if it is featured with high resolution. Keep in mind that although its output is at digital format, its movement is linear, and considering that sensing mechanism is based on the obfuscation of a light beam through a fringe printed at a crystal wheel, it is not guaranteed that it will stop precisely at the center of the slice. There can happen vibrations at imperceptible levels for us, but enough to sparkle it status.

    What you can do in order to remedy that, is treat this event by software, such as taking the average, disregard very small variations below determined speed, etc...
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )


    1 members found this post helpful.

--[[ ]]--