What is on the board · 01 of 10

The six pins

Six pins, five of them wired. GND and VCC power the block, CLOCK and DATA are the two contacts that report a turn, BTN is the switch in the shaft, and NC is connected to nothing. CLOCK and DATA rest HIGH; BTN reads HIGH only while the knob is pushed in.

What is on the board

An EC11-type rotary encoder lying on its side, with a blue knob on its shaft, five small parts along the top edge and the right-hand side, and a six-pin header along the bottom edge. The shaft points out past the top of the board, so the knob stands clear of it. The header is right-angled, so the pins point out past the bottom edge and the board lies flat.

The TK06 seen from the component side: a black board with a gold-plated border, a blue knob standing above the top edge on a threaded metal bushing, the encoder's metal and teal body just below it, small parts beside the bushing and one on the right edge, two big round mounting holes, lonely binary printed up the left edge, and a right-angle header labelled GND, VCC, NC, BTN, CLOCK and DATA from left to right.
The component side. GND is on the left, DATA on the right.

The encoder is an EC11-type part, a size and pin layout many makers build, in its horizontal form with a push switch in the shaft. The shaft is 6 mm across, on a threaded M7 bushing. The five small parts are three 10 kΩ resistors and two 100 nF capacitors: a pull-up and a capacitor for each of the two rotation contacts, and a pull-down for the switch.

The six names

The six pins
Pin
Pins
6
Pins to wire
5
Pitch
2.54 mm
CLOCK is one of the encoder's two rotation contacts. Its 10 kΩ pull-up holds it HIGH while the contact is open; the contact pulls it LOW to GND while it is closed. The 100 nF capacitor beside it smooths the edges. Turning the knob makes it fall and rise.

GND is on the square pad. It is also the encoder's common contact: when either rotation contact closes, it joins its line to GND.

VCC goes to the two pull-ups and one side of the shaft switch, and nowhere else. So the voltage on VCC is the voltage all three signals reach. That is the next article.

NC means not connected, and here it means it literally. The net list, the list of every electrical connection on the board, does not mention it.

BTN is the switch in the shaft. Released, it reads LOW. Push the knob in and it reads HIGH.

CLOCK and DATA are the two contacts that report a turn. At rest both read HIGH, held up by their pull-ups. Turning the knob closes and opens them in turn, and each one reads LOW while it is closed.

Five wires, not three

The push button in the kit needs three wires. This block needs five: power, ground, and three signals. The rotation is two signals, not one, because one contact on its own can say that the knob moved but not which way. Two contacts out of step is how the second one supplies the direction.

The back of the board

The back of the TK06: a black board with a gold border, the blue knob above the top edge, lonely binary across the top, the encoder's five solder joints and two teal mounting tabs, a dotted dial icon, two mounting holes, TK06 ROTARY ENCODER in a boxed label, six header pads in a row with the square one on the right, and ROTATES TO PICK SETTINGS along the bottom.
The back. The part number is here, and the square pad is now on the right.

Turned over, the order reverses. The square pad is on the right, and it is still GND. The back prints TK06, the number on the box, and ROTATES TO PICK SETTINGS, which is what an encoder is for: a knob with no end stop that moves a value up and down rather than setting it to a position.

When it does not work

Which pin is GND?

Hold the board with the knob pointing away from you and the header pins pointing towards you. Read GND, VCC, NC, BTN, CLOCK, DATA from left to right. GND is also the square pad, which is the one mark that survives when the labels are hidden in a breadboard.

Do I have to connect NC?

No. It is not connected to anything on the board, on either side. A cable that carries a wire to it does no harm, and the wire simply ends at a pin that goes nowhere.

The back has no pin names. How do I tell which is which from there?

Turned over, the order reverses: DATA is on the left and GND on the right, and GND is still the square pad. The back prints TK06 ROTARY ENCODER and ROTATES TO PICK SETTINGS instead of the names. Count from the square pad and you cannot get it backwards.

Old sketches for this kind of encoder test the button for LOW.

Those were written for boards whose switch is pulled up. This block has a 10 kΩ pull-down on BTN and the switch goes to VCC, so released reads LOW and pushed reads HIGH. Test for HIGH.

Where this goes next

Why the block's VCC pin goes to 3V3 beside an ESP32 and 5V beside an Uno.

VCC sets all three levels

Edit this page — content/books/rotary-encoder/the-six-pins.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Rotary Encoder

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum