,

Rotary Encoder Module with Genuine Bourns PEC12R — Debounced in Hardware, 1 Click = 1 Count (24 PPR, Push Switch)

₹299.00

Rotary encoder that counts right, every click

1 click= 1 count
30,000rotations
0 partsto add
Bournsgenuine encoder

Menu skips, value counts twice? That’s contact bounce, not your code. This module filters it in hardware, so your microcontroller sees one clean edge per click.

  • ✓ Clean counts: RC filter on A, B and the push switch
  • ✓ Nothing to add: 10k pull-ups on all three lines
  • ✓ Built to last: Bourns PEC12R, 30,000 rotations, 20,000 presses
  • ✓ Easy grip: 30 mm insulated 6 mm D-shaft
  • ✓ Works with: Arduino, ESP32, STM32, Pi Pico (3.3 V or 5 V)

Your demo shouldn’t fail because of a knob. Here’s what’s inside:

Cheap module Ramanu
🏷️Genuine Bourns encoder ✗ ✓
〰️Hardware debounce, A, B & SW ✗ ✓
🔘Switch pull-up fitted ✗ ✓
📏Rated life (datasheet) ✗ ✓
📊Measured on our bench ✗ ✓

Ramanu rotary encoder · Genuine Bourns PEC12R · Hardware debounced

Menu skips, value counts twice? That’s contact bounce, not your code.

Every mechanical encoder bounces for a few milliseconds on each click. This module filters it out in hardware, on A, B and the push switch, so your microcontroller sees one clean edge per click. Connect 5 wires and write simple code.

Your demo shouldn’t fail because of a knob.

1 click
= 1 count. Bounce filtered on A, B and SW
30,000
rotations, Bourns datasheet minimum
0 parts
to add. Pull-ups and filter are on the board
30 mm
insulated 6 mm D-shaft, easy to grip
Add to cart → Will it fix my problem?
Measured on our bench: without a filter the encoder contact bounces for about 2 ms; with the Ramanu RC filter channels A and B switch cleanly

Real logic-analyzer captures from our bench, 3.3 V supply. Not an illustration.

Fixes the encoder problems makers hit every day

If the knob behaves differently every time you turn it, the signal is the suspect, not your code.

🔄 Counts twice per click

Volume jumps by 2, value skips a step

Fixed: RC filter removes the bounce edges

📋 Menu jumps or goes backwards

OLED / LCD menus on Arduino and ESP32

Fixed: one clean edge, correct direction

🖰️ Button press registers twice

Select opens and closes in one press

Fixed: the push switch is debounced too

❌ Button does nothing

Switch pull-up missing on many low-cost modules

Fixed: 10k pull-ups on A, B and SW

🔧 Gets scratchy after a few months

Unbranded encoders with no rated life

Fixed: Bourns PEC12R, 30,000 rotations minimum

📏 Shaft too short for the box

Front panels, 3D-printed enclosures

Fixed: 30 mm shaft, 23.9 mm above the body

Connect it in a minute

Wiring: SW to D4 or GPIO25, B to D3 or GPIO33, A to D2 or GPIO32, GND to GND, VCC to 5V on Arduino or 3V3 on ESP32
Important: power VCC from the same voltage as your microcontroller’s logic. The pull-ups go to VCC, so the outputs swing to VCC. Use 3.3 V for ESP32, STM32 and Raspberry Pi Pico; 5 V for Arduino Uno, Nano and Mega.

What bounce is really costing you

Cheaper than one failed demo.

A menu that jumps in front of an examiner or a customer costs far more than the right part.

No delay() hacks.

Software debounce adds delays that can miss steps when your code is busy. Fix it before it reaches the pin.

Cheaper than an evening of debugging.

Stop rewriting your encoder code for a problem that comes from the contacts.

Already have a KY-040 style module?

It’s fine for a first experiment. It wasn’t built for a project that has to work every time.

What mattersTypical low-cost moduleRamanu encoder module
EncoderUnbranded, no datasheetGenuine Bourns PEC12R-4230F-S0024
DebounceNone: you fix it in software10k + 0.1 µF RC filter on A, B and SW
Pull-upsSwitch pull-up often missing10k on A, B and SW
Rated lifeNot specified30,000 rotations, 20,000 presses (minimum)
ShaftShort30 mm insulated 6 mm D-shaft
TemperatureNot specified−30 to +70 °C
ProofNoneMeasured captures on this page

Ramanu values from the Bourns PEC12R datasheet and our board design.

What’s on the board, and why

Genuine Bourns PEC12R

24 detents, 24 pulses per turn, push switch. Rated 30,000 rotations and 20,000 presses. Not an unbranded clone.

RC debounce on A, B and SW

10k series resistor and 0.1 µF capacitor on every line. We tested lower values on the bench and still saw bounce, so we chose 0.1 µF.

10k pull-ups on all three lines

Defined high level on A, B and the switch. No INPUT_PULLUP dependence, no floating button.

Supply decoupling

On-board capacitor across VCC and GND keeps the pull-up rail quiet.

30 mm insulated D-shaft

23.9 mm above the encoder body, 12 mm flat. Turn it directly or fit any standard 6 mm D-shaft knob.

5-pin 2.54 mm header

SW, B, A, GND, VCC, in the order printed on the board. Jumper wires or breadboard.

Side view with Bourns datasheet dimensions: 30.0 mm shaft from mounting surface, 23.9 mm above body, 12.0 mm flat, 6 mm D-shaft

Buy more, pay less

All prices include 18% GST. The discount applies automatically in the cart.

1–2 pcs
₹299
per piece
3–5 pcs
₹269
per piece · save 10%
6+ pcs
₹239
per piece · save 20%

Need more than 20 for a lab, a class or a product? Ask for a quote →

Quick-start Arduino code

Wiring: A to D2, B to D3, SW to D4, VCC to 5V, GND to GND. For ESP32, change the pin numbers to 32, 33 and 25 and power VCC from 3V3.

const int CLK = 2;   // A
const int DT  = 3;   // B
const int SW  = 4;   // push switch

volatile int counter = 0;

void setup() {
  pinMode(CLK, INPUT);   // pull-ups are on the module
  pinMode(DT,  INPUT);
  pinMode(SW,  INPUT);
  Serial.begin(9600);
  attachInterrupt(digitalPinToInterrupt(CLK), readEncoder, RISING);
}

void readEncoder() {
  counter += (digitalRead(DT) != digitalRead(CLK)) ? 1 : -1;
}

void loop() {
  static int last = 0;
  if (counter != last) {
    Serial.print("Position: ");
    Serial.println(counter);
    last = counter;
  }
  if (digitalRead(SW) == LOW) {
    Serial.println("Button pressed");
    while (digitalRead(SW) == LOW) {}   // wait for release
  }
}
Full technical specifications
EncoderBourns PEC12R-4230F-S0024 (genuine)
OutputIncremental quadrature A and B, plus push switch (active LOW)
Resolution24 pulses per revolution, 24 detents
Rotation360° continuous, no end stops
Rotational life30,000 cycles minimum
Switch life20,000 cycles minimum
Contact bounce (encoder)2.0 ms maximum at 15 RPM (Bourns datasheet)
Debounce filter10kΩ series + 0.1 µF on A, B and SW
Pull-ups10kΩ to VCC on A, B and SW
Supply3.3 V to 5 V; outputs swing to VCC
ShaftInsulated 6 mm D-shaft, 4.5 mm across flat; 30.0 mm from mounting surface, 12.0 mm flat
MountingPCB mount, no threaded bushing (no panel nut)
Operating temperature−30 °C to +70 °C
Connector5-pin 2.54 mm header: SW, B, A, GND, VCC
ComplianceRoHS
SKUREM-PECR-24

Bourns PEC12R datasheet (PDF)

New to rotary encoders? Learn how quadrature, PPR and detents work, why encoders bounce and how to wire one to Arduino in our guide: What is a rotary encoder? How it works, types and Arduino interfacing →

Common questions

Is a knob included?

No. The 30 mm shaft is long enough to turn directly, and any standard 6 mm D-shaft knob fits.

Does it work with ESP32 and Pico?

Yes. Power VCC from 3.3 V so the outputs are 3.3 V.

Can I mount it on a panel with a nut?

No. This encoder has no threaded bushing. Mount the board behind the panel on standoffs and pass the shaft through.

Do I still need software debounce?

No. Simple interrupt code like the example above is enough.

Proof, not promises

Everything we claim, you can check.

✓ Genuine Bourns encoderPEC12R from authorised distribution. The part number is in the specs.
✓ Measured on our benchThe bounce and clean-signal captures on this page are real logic-analyzer data.
✓ Designed in PuneDesigned, assembled and checked by Ramanu Systems before it ships.
✓ Real engineer supportStuck? Write to contact@ramanusystems.com and an engineer replies.

Your demo shouldn’t fail because of a knob.

Genuine Bourns encoder, debounced in hardware. 1 click = 1 count.

Add encoder module to cart → Buy now

Reviews

There are no reviews yet.

Be the first to review “Rotary Encoder Module with Genuine Bourns PEC12R — Debounced in Hardware, 1 Click = 1 Count (24 PPR, Push Switch)”

Your email address will not be published. Required fields are marked *

Shopping Cart
Scroll to Top