Arduino and Quadrature Rotary encoders: LUA Script

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Message
Author
User avatar
Sling
Posts: 5242
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Arduino and Quadrature Rotary encoders: LUA Script

#11 Post by Sling »

Ok. I don't see a reason why the encoder you couldn't get to work will not work. Did you connect as follows

encoder pin CLK to chosen Arduino input for A
encoder pin DT to chosen Arduino input for B
encoder pin GND to Arduino GND
encoder pin + to Arduino +5V
encoder pin SW to chosen Arduino input for shaft push switch (optional)

The info I've seen does not seem to mention the +5V supply connection, but in my experience some encoders can be fussy without using external hard pull-ups. Grayhill branded encoders even recommend resistor values. Even if the Arduino implementation uses the internal weak pull-ups of the Arduino I'd use the external pull-ups on the KY040 board. You do this by connecting the + pin to +5V.

Give it a try it may work.

Search KY040 for more information.

Sling

Post Reply