12mm detentless rotary encoder at an angle, showing the steel front plate, smooth collar and black 6mm D shaft with its single flat on top, plus the three PCB pins

12mm Rotary Encoder 3-Pin - Detentless Smooth Turn, No Push Switch

$4.99 NZD
Save 5% at 2+
Skip to product information
SKU: SW-ENC-12MM-3P

12mm Rotary Encoder 3-Pin - Detentless Smooth Turn, No Push Switch

$4.99 NZD
Availability:
Order before 7:30am for same-day dispatch Dispatch 7 days a week, excluding public holidays

NZ Post: 1-2 days urban · 2-4 days rural

Shipping from $5.99 urban / $9.99 rural, or free pick-up in Te Awamutu.

Buy more, pay less Prices shown are per unit. Add enough of this item and the lower rate applies on its own at checkout. There is no code to enter and you do not need to buy a pack. Choosing a tier here just sets the quantity for you. Larger quantities go out in the same bag, so packing, handling and postage cost us less per unit. We pass that saving straight on to you, so you can buy more for less.

Easy 30-day returns · 12-month warranty

Add $66.00 for Free Urban delivery ($88.00 for Rural)
Urban $66 Rural $88

A rotary encoder is a knob that tells a microcontroller which way and how far it has been turned, and it spins endlessly with no end stops. This 12mm one turns smoothly with no clicks and gives 24 pulses a turn on two A/B channels, so an Arduino, ESP32 or Pico can read both direction and speed.

Use it for a volume or tuning knob, scrolling through a menu, or setting a value like motor speed or screen brightness. It works with 3.3V and 5V boards, takes a standard knob on its insulated 6mm D shaft, and mounts on a PCB, so it does not fit a breadboard. For prototyping, female jumper wires push straight onto its pins, or solder wires on for a more lasting fit. The collar has no thread or nut, so if it is not going on a PCB, hold it in place with glue or a snug press-fit hole.

Specifications

TypeIncremental, A/B quadrature
Pulses per turn24 (96 counts with 4x decoding)
FeelDetentless, no push switch
Pins3 in a row: A, C (common), B at 2.5mm pitch
Contact rating10mA at 5V DC, signal use
Works with3.3V and 5V boards
Shaft6mm insulated D shaft, about 20mm long
Panel mountingSmooth collar with no thread or nut, fits a 7.5 to 8mm hole
Body and mountingAbout 12.4 x 13.4mm, PCB mount, not for breadboards
Rotational life30,000 cycles (typical)
Operating temperature-30 to +70°C (typical)
In the box1 encoder, no knob or nut

Datasheets

Wiring & getting started

Wiring diagramArduino Nano
Wiring drawing: the encoder with wires soldered to its three pins, A to Arduino Nano D2, the middle pin C to GND and B to D3
Tap the drawing to open it full size.
  1. Mount it

    On a PCB, the three pins and both frame tabs go through the board and the shaft stands straight out. Solder the tabs as well as the pins, because they take the strain when the knob is turned. The flat pins do not fit a breadboard, so for a prototype or a quick test, push female jumper wires onto the three pins, or solder short wires on for a more lasting fit. Either way, solder quickly and keep flux out of the open back of the body.

  2. Wire it

    C, the middle pin, goes to GND. A and B go to two digital pins. On an Uno or Nano, use pins 2 and 3, because they react to every change and fast turns are not missed. The example code turns on resistors built into the board, so no extra parts are needed.

  3. Load the test code

    Install the Encoder library by Paul Stoffregen from the Library Manager, upload the code below and open the Serial Monitor at 9600 baud.

    Example Arduino codeArduino C++
    // 12mm encoder test: A to D2, B to D3, C (middle pin) to GND.
    // Needs the Encoder library by Paul Stoffregen (Library Manager).
    #include <Encoder.h>
    
    Encoder knob(2, 3);   // turns on the internal pull-ups for you
    long lastCount = 0;
    
    void setup() {
      Serial.begin(9600);
      Serial.println("Turn the shaft. One full turn is 96 counts.");
    }
    
    void loop() {
      long count = knob.read();
      if (count != lastCount) {
        lastCount = count;
        Serial.println(count);
      }
    }
  4. Check it works

    Clockwise counts up and anticlockwise counts down, with 96 counts in a full turn. However, if clockwise counts down, swap the A and B wires or the two pin numbers in the code. For a volume or menu control, divide the count by 4 to get 24 steps a turn.

  5. Add a knob (optional)

    Any push-on or set-screw knob for a 6mm D shaft fits. The datasheet has the PCB footprint, and a filter circuit if you run long wires.

Frequently Asked Questions

Answers to the questions buyers ask most.

Does it click or have a push button?
No. It turns smoothly with no detents and has no push switch, which suits volume, tuning and fine adjustment. It has three pins: A, C and B.
Will it work with an Arduino, ESP32 or Raspberry Pi Pico?
Yes. It is a passive switch, so it works on 3.3V and 5V boards. Connect C to GND and A and B to two inputs with pull-ups turned on. On an ESP32, GPIO34 to 39 have no internal pull-ups, so add 10k resistors if you use those pins.
How many steps do I get per turn?
24 pulses per turn, which is 96 counts when your code counts every change on A and B. With no clicks to line up with, you choose how many counts make one step, for example 4 counts for 24 steps a turn.
Which knob fits?
Any knob made for a 6mm D shaft, push-on or set-screw. The shaft reaches about 20mm from the front plate and can be cut shorter with a fine saw.
How do I mount it?
Solder the three pins and both frame tabs into your PCB. The collar is smooth with no thread or nut, so for a front panel drill a 7.5 to 8mm hole and let the PCB hold the encoder. The footprint is in the datasheet.

Have a Question About This Product?

Send it through and we will get back to you by email.

Why Buy from NZN

Useful parts, fair prices and someone local to help.

I'm Lukas, an engineering student and maker based in Te Awamutu. NZN grew out of a CNC build that dragged on for months because every missing cable, bolt or electronic part meant another overseas order. I started the shop so Kiwi makers can spend more time building and less time waiting for the next parcel.

  • Stocked here in New Zealand

    Orders are picked and packed in Te Awamutu and dispatched within 24 hours every day, excluding public holidays. NZ Post target delivery is 1-2 days urban and 2-4 days rural. In Te Awamutu and Kihikihi you can choose local delivery at checkout: same day if you order before 8am, otherwise next day.

  • Fair prices, clearly shown

    Prices are kept competitive and quantity discounts are shown upfront. Free delivery starts at $66 for urban addresses and $88 for rural addresses.

  • 30-day returns and 12-month warranty

    Get in touch if something is not right and we will help sort it.

  • Practical product support

    Ask a product question and get help from a real person in New Zealand who knows the range.

You may also like