De-bounce on LCD knob

Discussion in 'Calibration, Help, and Troubleshooting' started by W1EBR.Gene, Sep 16, 2016.

  1. W1EBR.Gene

    W1EBR.Gene Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    188
    Likes Received:
    26
    When I turn the control knob on the LCD, I often do not get single increments as a result. For example, moving the z-axis one click on the knob might result in 1, 2 or 3 increments in movement (according to the display). It reminds me of a button de-bouncing issue.

    Do other people see this behavior?
     
  2. PsyVision

    PsyVision Moderator
    Staff Member

    Joined:
    Sep 4, 2015
    Messages:
    798
    Likes Received:
    248
    You can adjust the firmware to set the steps. I had written a blog post on it but Ghost is down at the moment. I think it's these settings in Configuration_adv.h for Marlin:

    Code:
    //
    // ENCODER SETTINGS
    //
    // This option overrides the default number of encoder pulses needed to
    // produce one step. Should be increased for high-resolution encoders.
    //
    #define ENCODER_PULSES_PER_STEP 1
    //
    // Use this option to override the number of step signals required to
    // move between next/prev menu items.
    //
    #define ENCODER_STEPS_PER_MENU_ITEM 5
    
     
  3. W1EBR.Gene

    W1EBR.Gene Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    188
    Likes Received:
    26
    Does what you are suggesting work to debounce the rotary switch? If it is making noisy pulses then changing the increments per encoder pulse shouldn't help (but requiring a minimum interval of stability before counting the pulse should help, I think). Is there also a setting for waiting a variable number of milliseconds before resampling to determine if a pulse occurred? Do you agree?
     

Share This Page