Main Content

쿼드라쳐 인코더

Arduino® 하드웨어에 연결된 쿼드라쳐 인코더 제어

쿼드라쳐 인코더는 회전축의 속도와 방향을 측정하는 데 사용할 수 있는 증분 인코더입니다. 축의 각도 회전을 디지털 펄스로 변환하여 축이 이동하는 방향을 판별할 수 있도록 합니다. 펄스 간의 시간 차이를 측정하여 속도를 도출할 수 있습니다. 쿼드라쳐 인코더는 양방향 위치 감지 및 길이 측정 응용 사례에서 사용할 수 있습니다. 쿼드라쳐 신호를 디코딩하고 이를 시스템에 대한 감각 입력으로 사용하여 회전 장치의 속도, 가속도 및 위치를 확인할 수 있습니다. 3가지 유형의 디코딩 X1, X2, X4는 각 회전 주기마다 각각 1개, 2개 또는 4개의 펄스를 제공합니다. X4 디코딩이 가장 높은 정확도와 각도 분해능을 제공하기 때문에 이 유형만 지원됩니다.

쿼드라쳐 인코더 함수를 사용하기 전에 arduino를 사용하여 Arduino 객체를 만듭니다. 자세한 내용은 Connect to Arduino Hardware 항목을 참조하십시오.

함수

rotaryEncoderConnection to quadrature encoder on Arduino or ESP32 hardware
resetCountSet count value to zero or user-specified value
readCountRead current count value from encoder with X4 decoding
readSpeedRead current rotational speed

도움말 항목

  • Control Rotary Encoder Knob

    This example shows how to use the MATLAB® Support Package for Arduino® Hardware to control a 12-step rotary encoder with a built-in push button.

  • Steer Two-Wheel Robot

    This example shows how to use the MATLAB® Support Package for Arduino® Hardware to steer a two-wheel Arduino-based robot with closed-loop control.