Ready to deploy design #1

March 15, 2025 · View on GitHub

Read this document from start to end before building anything. Ensure you understand everything.

User FRS78 has reported this design to work at the system level (see Issue #4), however, he found misleading tags in an ALPS rotary encoder. See below.

Hardware features

  • Bluetooth Low Energy
  • Powered via external power source (quick release): DC +5V ~ +7V - 500 mA
  • Analog clutch paddles (potentiometers)
  • Shift paddles (x2)
  • Optional: "ALT" buttons (x2)
  • Optional: DPAD, funky switch or 4 push buttons arranged in a cross
  • Relative rotary encoders (with push button): x4 + optional funky switch
  • Up to additional 12 push buttons

Button mapping

  • Bite point calibration: rotary #1 clockwise and counter-clockwise (while holding one and only one clutch paddle).
  • Next clutch function: START and Left shift paddle.
  • ALT buttons mode: START and Right shift paddle.
  • Recalibrate clutch paddles: Left shift paddle, Right shift paddle and START.

Needed parts

ItemQuantityNotes
Bare bone Rotary encoder4
Standard perfboard sized 24x18 holes1Double side required
Roller lever switch2For shift paddles (maybe they are included with your wheel's case)
Linear potentiometer (10K-ohms to 100K-ohms)2For clutch paddles (maybe they are included with your wheel's case)
D-Pad, funky switch or push buttons1 D-pad or 1 funky switch or 4 push buttonsFor directional input (optional). See notes below for a funky switch.
Push buttonsup to 12General purpose inputs (up to you)
Pin header (female)35For a DevKit board with male pins already soldered
Pin header (male or female up to you)72For external wiring
Schottky diodes251N4148 recommended
10k-ohms resistor2
ESP32-WROOM-32UE/E (DevKit-C)1Male pins already soldered. Choose built-in/external antenna.
External Antenna with U.FL, MHF I or AMC connector1Only required if ESP32-WROOM-32UE is chosen
Power connector depending on your quick release1See below

Other parts (quantity unknown):

  • Thin wire.
  • Wire with Dupond terminals (for external wiring). A kit for protoboards will do the job. ¿Male or female? the opposite to pin headers.
  • Welding tin.

Additional notes:

  • Chose an appropriate male/female power connector depending on your wheel base. Make sure to identify the positive and negative terminals correctly. If you have a Simagic QR, negative is the yellow wire and positive is the green one.
  • Optional funky switch: ALPS RKJ series, 7-way.

Pin-out plan for the ESP32-DevKit-C board

GPIOInputOutputUsageNotes
36OKLeft potinput only (no internal pull resistor)
39OKRight potinput only (no internal pull resistor)
34OKROT1_Ainput only (no internal pull resistor)
35OKROT1_Binput only (no internal pull resistor)
32OKOKROT2_A
33OKOKROT2_B
25OKOKROT3_A
26OKOKROT3_B
27OKOKROT4_A
14OKOKROT4_Boutputs PWM signal at boot
12OKOKboot fail if pulled high
13OKOKMatrix input 5
9xxUNUSABLEconnected to the integrated SPI flash
10xxUNUSABLEconnected to the integrated SPI flash
11xxUNUSABLEconnected to the integrated SPI flash
6xxUNUSABLEconnected to the integrated SPI flash
7xxUNUSABLEconnected to the integrated SPI flash
8xxUNUSABLEconnected to the integrated SPI flash
15OKOKMatrix input 1outputs PWM signal at boot
2OKOKconnected to on-board LED
0pulled up?OKoutputs PWM signal at boot
4OKOKMatrix selector 1
16OKOKMatrix selector 2
17OKOKMatrix selector 3
5OKOKoutputs PWM signal at boot
18OKOKENCODER_A
19OKOKENCODER_B
21OKOKMatrix input 3
3pulled upRX pinHIGH at boot
1TX pinOKMatrix selector 4debug output at boot
22OKOKMatrix input 4
23OKOKMatrix selector 5

Circuit layout

Open the circuit layout using DIY Layout Creator.

Setup #1 circuit layout

This layout includes the following subsystems (read for an in-depth explanation):

Notes and build tips:

  • Some components may look very small, not matching their actual size. This is not a mistake. They must be placed in vertical position, so they lie in a minimal surface of the perfboard. All resistors and diodes should fit in 1x4 holes when they lay in horizontal position.
  • There is a lot of wiring, which is prone to human error. Check wiring and traces twice before soldering.

External wiring

  • Each input has an assigned number in the circuit layout. Certain inputs have a particular function, so attach them properly.
  • The POTn_GND and POTn_VCC terminals of each potentiometer are interchangeable. If the clutch (or axis) goes to 100% when idle, swap those terminals. If you don't have the chance to swap those terminals, the companion app has the ability to swap axis polarity by user request.
  • Note that the pin headers on the left and right clutch paddles are symmetrical, not identical.
  • Optional funky switch:
    • The involved terminals are:
      • For rotation: ENCODER_A, ENCODER_B and ENCODER_COM.
      • For push buttons: A, B, C, D, PUSH and COM.
    • Do not confuse COM with ENCODER_COM since COM is physically closer to ENCODER_A/B than ENCODER_COM.
    • Misleading tags have been reported at some ALPS funky switches. Be warned. Those show erroneously swapped COM and PUSH tags, at least, in their data sheet. Check first. If you come into one of them, swap those terminals.
  • Bare bone rotary encoders:
    • The involved terminals are:
      • For rotation: A or CLK attached to ROTn_A, B or DT attached to ROTn_B, COM attached to ROTn_COM.
      • The built-in push button must be wired to the button matrix just like any other push button, being SW and SW COM the involved terminals. SW attached to the upper row of pin headers, SW COM attached to the lower row of pin headers.
    • Do not confuse COM and SW COM.
    • ROT1 is mandatory. The others are optional.

Under no circumstances should you plug an USB cable and an external power source at the same time. You could damage the DevKit board.

Firmware upload

At Arduino IDE, configure the board manager for "ESP32 Dev Module".

  1. Detach the DevKit board from the circuit before continuing.
  2. Plug the USB cable to the Devkit board and upload the sketch with Arduino IDE.
  3. Attach the DevKit board to the circuit. Keep the USB cable plugged in.
  4. Open the serial monitor (Arduino IDE).
  5. Reset.
  6. Check there are no error messages.