Terry
Could you confirm the correct connections for the commonly available KY-040 rotary encoders (eBay) - it does not seem to match up to your B-C-Common shown on your schematic.
Do R2 & R3 pull-ups need to be removed ( I suspect so) ?
I am not an Arduino user so am unfamiliar with the requirements. Give me a PICAXE chip and I am right at home.
Details I gleaned were from:
http://henrysbench.capnfatz.com/henrys-b...er-manual/
Find the section...
KY-040 Pin Outs
The pin outs for this rotary encoder are identified in the illustration below.
The module is designed so that a low is output when the switches are closed and a high when the switches are open.
The low is generated by placing a ground at Pin C and passing it to the CLK and DT pins when switches are closed.
The high is generated with a 5V supply input and pullup resistors, such that CLK and DT are both high when switches are open.
Not previously mentioned is the existence of of push button switch that is integral to the encoder. If you push on the shaft, a normally open switch will close. The feature is useful if you want to change switch function. For example, you may wish to have the ability to between coarse and fine adjustments.
Keyes Rotary Encoder Schematic
..... R2 and R3 in the schematic are pull up resistors.
Thanks
Doug
The A,B,C markings on my schematic relate to the actual off-board connection points on the pcb, not the actual encoder.
I did it that way because of the variety of different encoders available, but may have to add an extra drawing or bit of text to clarify it if anybody else finds it confusing.
In the linked website, the A and B of the encoder (which are CLK and DT on the pins), correspond to B and C in my schematic, with A being the switch.
The two pull-up resistors could be left on the KY-040 module if a connection to +5v was made, the two 10k pull-up resistors in my schematic would then be left out/removed.
Hopefully that makes sense.