Menu
Your Cart

KY-040 360 Degree Rotary Encoder Module - With Washer and Nut

KY-040 360 Degree Rotary Encoder Module - With Washer and Nut
KY-040 360 Degree Rotary Encoder Module - With Washer and Nut
KY-040 360 Degree Rotary Encoder Module - With Washer and Nut
KY-040 360 Degree Rotary Encoder Module - With Washer and Nut
KY-040 360 Degree Rotary Encoder Module - With Washer and Nut
₹​79.00
₹​66.95 + 18% GST
All Inclusive, Shipping Calculated at Checkout

B2B GST Credit Available

KY-040 360 Degree Rotary Encoder Module 

This KY-040 Rotary Encoder  based module can be used in variety of rotation encoding functions such as shaft rotation positioning, DSO controles, Digital controlled power supplies, Digital Instruments controls etc. It also has a push switch that can be used to extend functionality of this module.

Pin Out - 

GND -  Common

Power - 5V

SW - Push switch connection

DT - Direction

CLK - Clock


How to use?

Using this rotary encoder is straight forward, we have to monitor both CLK and DT pins simultaneously. Whenever the CLK signal changes state to RISING edge or FALLING edge, DT signal's logical state determines the direction of rotation. Each full 360 degree revolution gives 20 pulses on Clock pin.

From the image above we can deduce that,

At Falling edge of CLOCK if DT is HIGH - it indicates CW rotation, else CCW.


Arduino Sketch

int CLK = 2; // CLK Pin to Pin 2 of Arduino, EXT INT
int DIR = 3; // DT Pin to Pin 3 of Arduino
bool DT; // LOW -> CW, HIGH -> CCW
int count = 0;

void setup() {
 pinMode(DIR, INPUT);
 Serial.begin(9600);
 attachInterrupt(digitalPinToInterrupt(CLK),CW_Test,FALLING);
}

void loop() {
  Serial.println(DT);
  Serial.println("
");
  Serial.println(count);
  delay(200);
}

void CW_Test(){
  
  bool val = digitalRead(DIR);
  if(val == HIGH)
  {
    DT = LOW;
    count = count + 1;
  }
  else
  {
    DT = HIGH;
    count = count-1;
  }
}


Dimensions - 
 
PCB Size - 26mm x 18mm
Shaft Diameter - 6mm, D Shaped

 

Write a review

Note: HTML is not translated!
Bad Good
Captcha

Warranty Terms : 

Branded products (Waveshare/ Raspberry Pi/ Radxa/ DWIN etc) are as per brand warranty terms. Generic products are eligible for replacement within 7 days of delivery based on following conditions.

Products are eligible for a replacement if there is physical damage during transit or a clear manufacturing defect. Any claim for damage/ wrong items/ replacement must be made within 48 hours of successful delivery of the product. Requests for refund of amount or exchange of product(s) will be reviewed on a case by case basis and HUBTRONICS carries final rights to take a final decision on refund, store credit or exchange.


What to take care of ?

Most of our products are technical in nature and require trained personnel to handle them. Any kind of mishandling can result in damage or malfunctioning of the product, it is not possible for us to provide a replacement or refund if the product is damaged due to technical or physical mishandling.


Who pays the return shipping cost?

Free of cost return pickup from delivery address is eligible for products categorized as manufacturing defect/ Damage in transit/ Wrong items delivered. We do not support return pickup for any B2B order or offline orders not placed on website. Buyer need to arrange return shipping for B2B orders.


What voids warranty? 

Please note that replacement/ return or refund is not possible if the product is not compatible with your system/application. Please check all the technical details/ dimensions etc. before ordering and contact us for any kind of clarifications.

If product is soldered/ programmed at any point or physically altered in any way, it is not eligible for return/ replacement. If the item requires soldering for testing, please ensure that you use suitable clips or jig to test it without soldering. Any kind of soldering job makes the product ineligible for return or replacement. 


Following items are not eligible for return under any circumstances 

  • Device Programmers / Dongles 
  • Soldering Consumables (Wire, Flux etc)