Skip to the content
2 layers19 × 28 mmRotary switch ui, the printed circuit board in 3D

Rotary switch ui

benklop/rotary-switch

This folder contains a small PCB intended to mount:

Size
19 × 28 mm
Copper layers
2
Thickness
1.6 mm
Parts
6
Nets
10
Pads
24
Tracks, vias
30, 0
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
26 Feb 2026
Updated
21 Mar 2026

Overview

Rotary switch ui is an open-source printed circuit board by benklop, from the benklop/rotary-switch repository on GitHub. It is a 2-layer board of 19 × 28 mm with 6 parts on 10 nets, routed with 30 tracks and 0 vias.

Its parts include 3 resistors, 1 diode, 1 connector and 1 switch.

README

kicad/README.md

KiCad: Rotary switch UI PCB

This folder contains a small PCB intended to mount:

  • An EC11/EC11E-style rotary encoder with push switch
  • A 5 mm through-hole common-cathode RGB LED
  • 3× current-limit resistors for the LED
  • A 1×8 2.54 mm header for wiring to the ESP32-S2 Mini

Project files

  • rotary_switch_ui.kicad_pro
  • rotary_switch_ui.kicad_sch
  • rotary_switch_ui.kicad_pcb

Mechanical reference

The PCB footprint placement is aligned to the OpenSCAD model:

  • Encoder center at (0, 0) mm
  • LED center at (0, -9.5) mm (from openscad/dimensions.scad led_offset_y)

Recommended footprints (to assign in schematic)

If you open the schematic and run Update PCB from Schematic, assign these footprints first so KiCad can match by reference designator:

  • SW1 (encoder): Rotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm
  • D1 (LED): LED_THT:LED_D5.0mm-4_RGB
  • R1, R2, R3 (resistors): Resistor_SMD:R_0805_2012Metric (or switch to THT if preferred)
  • J1 (to ESP32): Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical

Header pinout (J1)

  1. +3V3 (optional; typically not needed for a bare EC11)
  2. GND
  3. ENC_A (encoder A → ESP32 GPIO34 per docs/wiring.md)
  4. ENC_B (encoder B → ESP32 GPIO36)
  5. ENC_BTN (push button → ESP32 GPIO37)
  6. LED_R_IN (→ R1 → LED_R; ESP32 GPIO4)
  7. LED_G_IN (→ R2 → LED_G; ESP32 GPIO5)
  8. LED_B_IN (→ R3 → LED_B; ESP32 GPIO6)

Rotary front panel PCB

Small PCB to mount the EC11 encoder, 5 mm RGB LED, and current-limiting resistors for the rotary light switch project. Connects to the ESP32-S2 Mini via a 8-pin header.

Contents

  • rotary-front.kicad_pro – KiCad 8 project
  • rotary-front.kicad_pcb – Board with footprints placed (encoder, LED, 3× 0805 resistors, 1×8 pin header). No schematic yet; create one and then Update PCB from Schematic.

Schematic (create in Eeschema)

Create a new schematic in this project and add:

RefSymbol / partFootprintValue / notes
U1Device:RotaryEncoder_SwitchRotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mmEC11 with switch
D1LED:LED_RGB_CommonCathode or 4-pin connectorLED_THT:LED_D5.0mm-4_RGB5 mm common-cathode RGB
R1Device:RResistor_SMD:R_0805_2012Metric470 Ω (red channel)
R2Device:RResistor_SMD:R_0805_2012Metric430 Ω (green)
R3Device:RResistor_SMD:R_0805_2012Metric430 Ω (blue)
J1Connector:Conn_01x08Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalTo ESP32

Net list (wire to J1)

Use these net names so the PCB matches ../docs/wiring.md:

J1 pinNet nameESP32-S2 Mini
1+3V3 (opt)3V3
2GNDGND
3ENC_AGPIO 34
4ENC_BGPIO 36
5ENC_BTNGPIO 37
6LED_R_INGPIO 4 (via R1 470 Ω)
7LED_G_INGPIO 5 (via R2 430 Ω)
8LED_B_INGPIO 6 (via R3 430 Ω)
  • Connect encoder pins to ENC_A, ENC_B, ENC_BTN, and GND (check your EC11 datasheet for pin order; Alps EC11E footprint uses A, B, C, S1, S2 — map A/B/S1/S2 to ENC_A/ENC_B/ENC_BTN and GND as appropriate; no VCC is required for the encoder itself).
  • Connect LED common cathode to GND; connect R, G, B anodes to the R, G, B nets (i.e. through R1, R2, R3 to the same-named J1 pins). Verify 5 mm RGB pinout (common cathode vs anode, R/G/B order) from your LED datasheet.

Then: Tools → Assign footprint symbols, assign the footprints above, File → Update PCB from Schematic, and in PCB Editor route the nets (or use the existing placement).

PCB layout

  • Board size: 50 mm × 35 mm (Edge.Cuts).
  • Encoder at top center (shaft position aligned with front-panel 6 mm hole when the board is mounted).
  • LED below the encoder (matches led_offset_y = -9.5 mm in the OpenSCAD dimensions).
  • J1 at bottom for cable to ESP32.

If your front panel or enclosure differs, move footprints in PCB Editor and adjust Edge.Cuts as needed.

BOM (per board)

RefPartValue / spec
U1Alps EC11 or compatible rotary encoder with switch, vertical, 6 mm shaft15 mm shaft, splined
D15 mm RGB LED, common cathode4-pin
R1Resistor 0805470 Ω
R2Resistor 0805430 Ω
R3Resistor 0805430 Ω
J1Pin header 1×8, 2.54 mmStraight, THT

Manufacturing

  • Single-sided (or two-layer) 1.6 mm FR4; 0.2 mm min trace/space is fine.
  • After assembly, mount the PCB behind the 3D-printed front face with the encoder shaft through the 7 mm hole and the LED in the LED cavity; then follow the main assembly for wiring to the ESP32 and PSU.

Parts

6
QtyValueFootprintReferences
2430PCM_Resistor_THT_US_AKL:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR2, R3
1470PCM_Resistor_THT_US_AKL:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
1EC11Rotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mmSW1
1PINHD_1x7_MaleConnector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_VerticalJ1
1RGBPCM_LED_THT_AKL:LED_D5.0mm-4_RGBD1

Similar boards

  • 2 layers18.5 × 11.1 mmSwitch, the printed circuit board in 3D

    Switch

    byrantech/laptop

    anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

    6 parts4.3kMIT
  • 2 layers14.6 × 33 mmBrain board SD Card 1, the printed circuit board in 3D

    Brain board SD Card 1

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    6 parts1.2k
  • 2 layers9 × 9 mmDpoint, the printed circuit board in 3D

    Dpoint

    Jcparkyn/dpoint

    Open-source digital stylus using camera tracking and inertial measurements

    6 parts1.1kMIT
  • 2 layers51.5 × 16.6 mmMicroswitchXY Endstop, the printed circuit board in 3D

    MicroswitchXY Endstop

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    6 parts1.1kGPL-3.0
  • 2 layers21.9 × 76.7 mmAmiga External, the printed circuit board in 3D

    Amiga External

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    6 parts1kGPL-3.0
  • 2 layers88.9 × 50.8 mmBusinesscard, the printed circuit board in 3D

    Businesscard

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    6 parts915
  • 2 layers20.3 × 15.2 mmL0 RGB led, the printed circuit board in 3D

    L0 RGB led

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    6 parts546MIT
  • 2 layers9 × 3.6 mmOpticalEncoder, the printed circuit board in 3D

    OpticalEncoder

    adamb314/ServoProject

    Getting the most out of your hobby servo

    6 parts545

Questions

How big is the Rotary switch ui PCB?

It measures 19 × 28 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Rotary switch ui use?

6 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Rotary switch ui KiCad files?

From the benklop/rotary-switch repository on GitHub, at the commit this page was made from: the board is kicad/rotary_switch_ui.kicad_pcb and its schematic kicad/rotary_switch_ui.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Rotary switch ui design in my own project?

Its repository states no licence, so its author keeps all rights: ask benklop before reusing the design.