Ready to deploy design #8

March 16, 2026 · View on GitHub

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

This setup has not been tested at the system level. If you try, please, let me know.

Hardware features

  • USB connectivity
  • Power through USB cable
  • Relative rotary encoders (with push button): x4
  • Up to 21 additional push buttons

Needed parts

Common:

ItemQuantityNotes
Bare bone rotary encoder4With built-in push button
Push buttonsup to 21General purpose inputs (up to you)
PISO shift register374HC165N (mandatory)
Resistors25Any impedance in the range from 1K-ohms to 10K-ohms
Standard perfboard sized 24x10 holes1Single-sided or double-sided
LilyGO T-QT PRO DevKit board1With male pins already soldered
Pin header (male or female up to you)37For external wiring
External Antenna with proper connector1Optional
USB type C cable1

Other parts (quantity unknown):

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

Other notes:

  • The packaging of the shift registers will show a small circle next to pin #1, which is tagged as ~LD here.
  • T-QT's builtin push buttons will also work as input numbers 60 and 61. There is little use for them, except for testing.

Pin-out plan for the T-QT DevKit board

GPIOInputOutputUsageNotes
34OKOKNEXT
33OKOKLOAD
39OKOKSERIAL
38OKOKROT1_Aoutputs PWM signal at boot
37OKOKROT1_Boutputs PWM signal at boot
36OKOKROT2_A
35OKOKROT2_B
48OKOKROT3_A
18OKOKROT3_B
17OKOKROT4_Aoutputs PWM signal at boot
16OKOKROT4_B

Circuit layout

We are reusing the shift registers example from the switches subsystem as a satellite circuit:

shift registers satellite circuit

External wiring goes as follows:

External wiring image

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, s o they lie in a minimal surface of the perfboard.

External wiring

  • Each input has an assigned number in the circuit layout. Certain inputs have a particular function, so attach them properly.
  • Push buttons:
    • There are several COM pins. You may use any of them.
    • Wire COM to just one terminal of each push button in a chain.
    • Wire the other terminal of each push button to one of the light-blue pins.
    • Bare bone rotary encoders: their built-in push button must be wired like any other push button, being SW and SW COM the involved terminals.

Firmware upload

At Arduino IDE, configure the board manager as this:

  • Board: "ESP32S3Dev".
  • USB CDC on boot: "Disabled".
  • USB-Mode: "USB-OTG (TinyUSB)".
  1. Plug the USB cable to the DevKit board and upload the sketch with Arduino IDE. If required, in order to enter "boot mode" click the reset button while holding "IO0".
  2. Reset.
  3. Check that a new USB device is recognized at the host computer, named "ButtonBox-8".