← Hit Happens Controller build guide

Hit Happens Sampler · large controller · 325 × 250 mm

Controller Box Wiring

30 pots, 23 buttons, 16 displays and the encoder, all run from the ESP32-S3. Pots and buttons go through four CD74HC4067 multiplexers that share four select wires. Displays all sit at I²C address 0x3C, so they hang off two TCA9548A switches, eight each.

Panel map

Which control goes where

Each control carries the tag of the mux pin it wires to. PA4 is pot mux A, pin C4; T2.5 is display switch 2, channel 5. Use From underneath while you solder: it is the lid flipped over, so left and right swap.

The hub

ESP32-S3 pins

Everything lands on these. The pins skip the ones the S3 uses for flash, PSRAM, USB and booting (0, 3, 19–20, 26–37, 43–46).

ESP32-S3Goes toWire
3V3Every mux VCC, both TCA9548A VIN, every display VCC, encoder +, the right leg of every potred
GNDEvery GND, every mux EN, the left leg of every pot, one leg of every buttonblack
GPIO4S0 on all four CD74HC4067blue
GPIO5S1 on all fourblue
GPIO6S2 on all fourblue
GPIO7S3 on all fourblue
GPIO1SIG of pot mux A (analog, ADC1)yellow
GPIO2SIG of pot mux B (analog, ADC1)yellow
GPIO15SIG of button mux Ayellow
GPIO16SIG of button mux Byellow
GPIO8SDA on both TCA9548Agreen
GPIO9SCL on both TCA9548Apurple
GPIO14RST on both TCA9548A, so the firmware can unstick the display busyellow
GPIO11 / 12 / 13Encoder CLK / DT / SWyellow
“USB” portThe ROCK 4 SE. Use the port marked USB, not COM/UART: the native one carries USB-MIDI.
Schematic

ESP32 to the four multiplexers

Each coloured line is one wire run. A dot is a solder joint; lines that cross without a dot do not touch. The four blue select wires and the power pair are shared: each one goes to the same pin on all four boards. Each yellow-coded SIG wire (drawn here in its mux’s colour) goes to one board only. Tap or hover a pin name on the ESP32 to light up its wire.

ESP32-S3 to four CD74HC4067 multiplexersESP32-S33V3GNDGPIO4→ S0GPIO5→ S1GPIO6→ S2GPIO7→ S3GPIO1→ SIG AGPIO2→ SIG BGPIO15→ SIG CGPIO16→ SIG D“USB” port → ROCK 4 SEPot mux ASIGS3S2S1S0ENVCCGNDC0–C1515 potsC15 sparePot mux BSIGS3S2S1S0ENVCCGNDC0–C1515 potsC15 spareButton mux ASIGS3S2S1S0ENVCCGNDC0–C1516 buttonsall usedButton mux BSIGS3S2S1S0ENVCCGNDC0–C157 buttonsC7–C15 spareOn each C pinPotGNDC n3V3ButtonC nGNDPot: panel facing you,legs down, GND on the left.Buttons need no resistors:the ESP32 pull-up does it.

The header order on the 4067 boards (SIG, S3, S2, S1, S0, EN, VCC, GND) is the common breakout layout. Check the silkscreen on yours and wire by name, not by position. The easiest way to build the shared runs: one wire from the ESP32 to the first board, then short jumpers from board to board (daisy chain), soldering two wires into each S0–S3, VCC and GND hole.

CD74HC4067 × 4

The multiplexers

A 4067 connects one of its sixteen C pins to SIG, chosen by the binary number on S0–S3. The ESP32 sets a number, reads the four SIG pins, and moves on, so 4 select wires and 4 signal wires cover 62 inputs.

Every 4067, the same five wires

VCC3V3. Never 5 V: SIG would then reach 5 V and the ESP32 inputs are 3.3 V only.
GNDGND
ENGND. It is active-low; left floating, the mux can switch itself off.
S0–S3GPIO4–7, shared by all four boards
SIGIts own GPIO (table above)

Pots and buttons

Pot: wiper (middle leg) to its C pin. Outer legs to 3V3 and GND. With the panel facing you and the legs pointing down, put GND on the left leg and 3V3 on the right, so clockwise turns it up.

Button: one leg to its C pin, the other to GND. The firmware turns on the ESP32's pull-up on the SIG pin, so no resistors are needed. A press reads low.

Chain power and ground along each row of pots with one bare tinned wire per rail, soldered leg to leg. That is two runs per row instead of sixty separate wires.

Pot mux A · SIG → GPIO1

PinTagControl
C0PA0EFFECT select
C1PA1FX knob 1
C2PA2FX knob 2
C3PA3FX knob 3
C4PA4FX knob 4
C5PA5FX knob 5
C6PA6FX knob 6
C7PA7FX knob 7
C8PA8FX knob 8
C9PA9Filter/Env knob 1
C10PA10Filter/Env knob 2
C11PA11Filter/Env knob 3
C12PA12Filter/Env knob 4
C13PA13BANK
C14PA14PATCH
C15PA15spare, leave empty

Pot mux B · SIG → GPIO2

PinTagControl
C0PB0START
C1PB1ZOOM
C2PB2LOOP ST
C3PB3LOOP END
C4PB4FADE
C5PB5M1
C6PB6M2
C7PB7M3
C8PB8M4
C9PB9M5
C10PB10M6
C11PB11M7
C12PB12M8
C13PB13M9
C14PB14M10
C15PB15spare, leave empty

Button mux A · SIG → GPIO15

PinTagControl
C0BA0DELO
C1BA1NOTE
C2BA2PERF
C3BA3SF2
C4BA4SYNTH
C5BA5SETL
C6BA6PEDAL
C7BA7SEQ
C8BA8SLICE
C9BA9CAPTURE
C10BA10ON/OFF
C11BA11PER NOTE
C12BA12AUTOLOOP
C13BA13SLICE ED
C14BA14MENU
C15BA15BACK

Button mux B · SIG → GPIO16

PinTagControl
C0BB0FLT/ENV
C1BB1PLAY
C2BB2REC
C3BB3RTZ
C4BB4LOOP
C5BB5CLICK
C6BB6UNDO
C7BB7spare, leave empty
C8BB8spare, leave empty
C9BB9spare, leave empty
C10BB10spare, leave empty
C11BB11spare, leave empty
C12BB12spare, leave empty
C13BB13spare, leave empty
C14BB14spare, leave empty
C15BB15spare, leave empty

FX knobs 1–4 are the top row of the effect bank from left to right, and 5–8 the row below. Filter/Env knobs 1–2 are the top pair, 3–4 the lower pair. Displays are numbered the same way.

TCA9548A × 2

The displays

Every SSD1306 answers at 0x3C, so they cannot share one bus. A TCA9548A is an I²C switch: the ESP32 tells it which of its eight channels to open, then talks to that display as if it were alone. Two switches at two addresses give sixteen channels, exactly what the panel has.

Both switches

VIN3V3
GNDGND
SDA / SCLGPIO8 / GPIO9, both switches in parallel
RSTGPIO14, both switches
A0 A1 A2Switch 1: leave all three alone, address 0x70.
Switch 2: A0 to VIN, address 0x71. A1 and A2 stay low.

If both switches stay at 0x70 they answer together, and two displays draw the same frame. Check A0 on switch 2 before power-up.

Each display, four wires

GND, VCC, SCL and SDA. Read the order off each module's silkscreen: the 0.91" and 0.96" boards do not always agree. VCC to 3V3, GND to GND, and SCL and SDA to one switch channel: SCn and SDn.

The channels need pull-ups, and the OLED modules already carry them. If one display comes up garbled or only now and then, the first suspect is a swapped SDA/SCL on that channel, then a long run. Keep display leads under about 30 cm.

Switch 1 · 0x70

ChannelTagDisplay
SD0 / SC0T1.0EFFECT display
SD1 / SC1T1.1FX display 1
SD2 / SC2T1.2FX display 2
SD3 / SC3T1.3FX display 3
SD4 / SC4T1.4FX display 4
SD5 / SC5T1.5FX display 5
SD6 / SC6T1.6FX display 6
SD7 / SC7T1.7FX display 7

Switch 2 · 0x71

ChannelTagDisplay
SD0 / SC0T2.0FX display 8
SD1 / SC1T2.1Filter/Env display 1
SD2 / SC2T2.2Filter/Env display 2
SD3 / SC3T2.3Filter/Env display 3
SD4 / SC4T2.4Filter/Env display 4
SD5 / SC5T2.5BANK display
SD6 / SC6T2.6PATCH display
SD7 / SC7T2.7MENU display 0.96"
Lid to base

Where the boards go

The ESP32 sits on its standoffs at the back left of the base, USB toward the left end. I suggest putting all six mux boards on the underside of the lid instead of the base, with foam tape or hot glue, each next to the controls it serves. Then only one 16-wire harness crosses to the base instead of about a hundred:

3V3 · GND · S0 S1 S2 S3 · SIG PA PB BA BB · SDA SCL RST · ENC CLK DT SW

Terminate it in a 2×8 Dupont header at the ESP32 so the lid unplugs, and leave about 15 cm of slack so the lid can stand open beside the base. The TCA standoffs printed in the base still work if you prefer them there. The cost is 64 display wires crossing to the base.

Power is fine from the ESP32's own 3V3 regulator. Sixteen OLEDs, the ESP32 and thirty 10 kΩ pots draw roughly 300 mA together, under what the DevKitC's regulator delivers. Expect it to run warm, not hot.

Order of work

Build it in stages

  1. Mount pots, buttons, encoder and displays in the lid. Tighten the pot nuts before soldering anything.
  2. Rails: run the bare 3V3 and GND wires along each pot row, and a GND wire past every button.
  3. Mux boards: fix the four 4067s and two TCA9548As to the lid. Solder A0 to VIN on switch 2.
  4. Signals: wire each pot wiper and button leg to its C pin using the tables. Tick off each control on the panel map as it is done.
  5. Shared lines: daisy-chain S0–S3, 3V3, GND and EN across the four 4067s. Chain SDA, SCL, RST, 3V3 and GND across both TCAs.
  6. Displays: four wires each to their switch channel.
  7. Harness to the ESP32. Before powering, check with a meter that 3V3 and GND are not shorted.
  8. Power up over USB on the Mac first, not the sampler. Flash a test sketch that prints every pot, button and display it finds, and fix anything missing before closing the box.