Edit: Figured it out. I posted answer.

I have a KY040 rotary encoder hooked up to a 5V source, and the oscilloscope hooked up to the CLK output. When I turn the encoder, CLK goes low as you can see at arrow A in the image. When the turn is done, it goes to ~1.1V which you can see at arrow B, it then immediately begins falling back to low over about 200ms. It stays low about 200ms and then finally goes high again. I'd expect it would just go back to 5V at arrow B and that'd be it. Any ideas what might be causing this? I'm thinking the encoder is simply damaged.

enter image description here

  • \$\begingroup\$ that seems some capacitive behavior, did you try adding a 10k resistor to the CLK output? Also, is the CLK being driven low or is it just floating? \$\endgroup\$
    – jDAQ
    May 13, 2020 at 3:28
  • \$\begingroup\$ @jDAQ Haha yep just figured that out. There was no resistor and it was killing my power supply. \$\endgroup\$ May 13, 2020 at 3:40
  • \$\begingroup\$ The KY040 rotary encoder is made of mechanical switches. The documentation show signals with names CLK and DT but these are in fact only switch contacts that open and close a circuit to ground. These kind of encoders have very bad contact bounce issues just as your oscilloscope capture shows. \$\endgroup\$
    – Dan1138
    May 17, 2020 at 15:51

1 Answer 1


Seems CLK is pulled to ground when there is a turn, but this encoder just has the resistor pads on the back soldered without a resistor, so every turn was killing my power supply.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.