Results 1 to 3 of 3
  1. #1
    New Member
    Join Date
    Jul 2016
    Location
    United Kingdom
    Posts
    3
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Unhappy Rotary encoder problems

    hey everyone,
    Im trying to finish my autopilot for a crj700 simulator. All the buttons and lights i have got working but im having alot of trouble with the rotary encoders. Im using two arduino unos for the autopilot, 1 for buttons and one for lights. everything but the encoders are working.
    problem 1:
    i dont know if they are full cycle, half cycle or quarter cycle.
    Problem 2:
    I have tried the quarter cycle demo code as it can also determine the type of encoder. ( the encoder im testing first is on pins 18 & 19.) It says if it produces 1 up or down its quarter cycle, 2 for half and 4 for full. What i get is some sort of random mix of 3 ups and downs which I have no idea whats going on and as there are 3 values i cant determine what type of encoder they are.
    Problem 3:
    no matter what i try to do the more i try the problem seems to get worse. ive have also tried the normal demo with similar results.
    any help is much appreciated
    many thanks, george, 15
    Last edited by george gohl; 07-20-2016 at 05:37 PM. Reason: spelling and grammar

  2. #2
    150+ Forum Groupie


    BushPilotWannabe's Avatar
    Join Date
    Jan 2014
    Location
    Alberta, Canada
    Posts
    157
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Rotary encoder problems

    Do you have any I2C devices attached? Pins 18 & 19 are also SDA and SCL. Check Jim's rotary encoder post http://www.jimspage.co.nz/encoders2.htm to use on UNO pins higher than 14. Copy your sketch to another file and try the encoder on two other pins.

    Identify full cycle encoders by doing a continuity check on the outside pins. When the encoder is half way between detent positions there should continuity between pins. Half cycle encoders I have seen are not as consistent but should give you an indication of continuity at every other detent position. Theory says quarter cycle encoders every fourth.

    Hugh
    ---CYXD ----- TWR --- GND ------ Closed
    ILS-- NDB -- 119.1 -- 121.9 ---- 11/2013

  3. #3
    New Member
    Join Date
    Jul 2016
    Location
    United Kingdom
    Posts
    3
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Rotary encoder problems

    Thanks, I tried again using different pins and it worked fine!

Tags for this Thread