I’ve recently added our new rotary encoder PCB for use with most standard 5-pin rotary encoders. I think these stand out from other similar products because multi-application was one of the key concepts in the design of the PCB. I’ve also added 100nF capacitors to cut the debounce problem associated with rotary encoders, so there’s no need to add additional off-board components for this reason. I’ve also added 10K resistors for the purpose of limiting current and as pull up resistors. If you’d like your PCB(s) without these components pre-installed, contact me.
You can get these at http://mklec.com/components/circuit_boards_pcbs/mklec-rotary-encoder-pcb-diy
- 1oonF Debounce Capacitors – The PCB comes with 2 pre-installed 100nF capacitors to cut the debounce problems common to rotary encoders.
- 10K Resistors – The PCB also comes with 5 pre-installed 10K pull-up resistors, 4 for the A and B pins and 1 for the switch.
- Multi-application design –
- 4 x 3mm holes – The PCB comes with 4 x 3mm holes for mounting the PCB to an enclosure or other surface. This gives you the ability to mount the PCB securely or simply use M3 standoffs for spacers below the PCB while testing and prototyping.
- Optional header pins – The header pins do not come soldered to the PCB. This is so you can choose to use the header pins or solder your wires directly to the solder pads for permanent installations and applications.
How to use the Rotary Encoder PCB
Start by choosing your application and whether you’ll be using the header pins or hookup wires. If using it on a breadboard, the PCB has 2 pins on one end of the PCB for header pins to help stabilize the rotary encoder on a breadboard. The 2 pins are just pass-thru pins of the 5V and GND pins.
Just about any M3 standoffs should work with this PCB.
This works with most 5-pin rotary encoders that follow the same footprint as follows:
- Install the rotary encoder onto the rotary encoder PCB. Solder the pins into place and then the tabs. Before soldering the tabs, you can carefully bend the tabs inwards to better secure it to the PCB using needle nose pliers if you prefer.
- Solder the headers (or wires if you’re using wires) to the PCB in whatever orientation you prefer (top or bottom).
- Connect it to your Arduino based on whichever tutorial you choose to follow. There’s many to choose from, which you can start at Arduino Playground – RotaryEncoders.
The Pins Defined
- A – This is the “A” signal pin. It is used in conjunction with the “B” pin to determine the rotation direction.
- B – This is the “B” signal pin.
- SW – This is for the pushbutton switch of the shaft. It is normally LOW and goes HIGH when the pushbutton is pressed.
- 5V – Connect this to your Arduino 5V pin. This powers the PCB for the signals.
- GND – Connect this to your Arduino GND (Ground) pin. It’s just the right thing to do.