is here! Shop now, pay later in 4 easy installments
DeliveryNZ-wide
12mm Rotary Encoder 3-Pin – Detentless Smooth Turn, No Push Switch to Pinterest (opens in a new window)

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

$5.52 incl. gst

SKU: CLICK-IT-401041 Category:

Verified specifications

Brand
NZN Electronics

Taken from this product's published details. If something is not listed here, it has not been verified.

Ask AI about this product

Answers use this product's information and the store's details. If it cannot be confirmed, it will point you to our team.

Any language. Press Enter to ask

Frequently bought together

Bundle idea: this item plus 2 recommended accessory/accessories, $21.12 in total. Add each item to the cart below.

Description

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.

Additional information

Brand

NZN Electronics

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

We’d love to hear what you think!