Friday, 4 July 2014

How does a Rotary Encoder work without connecting it to 5V


Like in this picture: enter image description here


I know we can hook 5v later externally to debounce but still, i heard it works without debounce circuit even if its bouncy. But how can it send signals if there are only output and gnd pins?



Answer



They're just mechanical contacts.


schematic


simulate this circuit – Schematic created using CircuitLab


Figure 1. Encoder wired to micro-controller with internal pull-ups.


The encoder is probably wired as shown (but I don't know why there are five wires on your diagram). What you can't see is that the internal pull-up resistors in the Arduino have to be enabled for this to work.


No comments:

Post a Comment