Wiring plan – head unit

Every wire inside the housing, in soldering order. Pin names are written as printed on the boards. Lengths are taken from the 3D model (routed along the walls and the floor) plus 15% and 15 mm, rounded up to 5 mm. Trim the excess at the end, but do not cut them shorter.

Wire

For Type
Signal wires (display, amplifier) thin, flexible silicone wire, 28–30 AWG (or Kynar/wire-wrap 30 AWG)
5V, GND, 3V3 the same, or 26–28 AWG if available
Touch pads 0.15 mm enamelled copper wire (CWW15) or 30 AWG

Suggested colours: GND black, 3V3 red, 5V orange; the rest as you like, but note down each colour.

What is where in the housing

top view (from the lid)            rear  ←───────────────────────→  front (towards the eye)

  inner wall (temple side):  [ AMPLIFIER, header holes forward ]
  XIAO right pin row:          5V  GND  3V3  D10  D9  D8  D7      (D10 SDA, D9 BLK, D8 SCK, D7 RES)
  XIAO (USB-C at the rear)     ════════════ XIAO ════════════          DISPLAY MODULE
  XIAO left pin row:           D0  D1   D2   D3   D4  D5  D6           (holes on top)
  outer wall:                  [hook button]          touch pad B   touch pad A  (next to the display)

Soldering order

Solder everything before putting the XIAO into the cradle and the amplifier onto the wall; the modules go in together with their wires.

1. Preparing the amplifier (MAX98357A)

# What Where Notes
1 100 kΩ resistor between the module's GAIN and Vin holes 3 dB gain (hearing protection). Bend its legs into the holes on the component side; the supply wire also goes into the Vin hole, in the same solder joint.
2 150 Ω resistor module + (speaker output) the other leg is free; one earphone wire will go here
3 150 Ω resistor module − (speaker output) the other leg is free; the other earphone wire will go here

Insulate the legs of the two 150 Ω resistors with heat-shrink tubing. Do not solder in the pin header or the terminal block; they are not used.

2. Touch pads → XIAO

# From To (XIAO) Cut Notes
4 touch pad A (front) D0 110 mm the 560 Ω SMD resistor right at the D0 pin: XIAO D0 → 560 Ω → wire
5 touch pad B (rear) D1 90 mm likewise, 560 Ω at the D1 pin

Thread the wire through the pad hole from outside and fold its end flat under the pad (with aluminium foil, tin it and clamp it under the foil). Run the two touch wires along the outer wall, not next to the display and amplifier wires, and not tightly next to each other.

3. Display module → XIAO

The module pins, in order as printed: GND, VCC, SCK, SDA, RES, DC, BLK.

# Display XIAO Cut
6 GND GND 140 mm
7 VCC 3V3 135 mm
8 SCK D8 125 mm
9 SDA D10 125 mm
10 RES D7 115 mm
11 DC D6 125 mm
11/b BLK D9 125 mm

4. Amplifier → XIAO

# Amplifier XIAO Cut
12 Vin 5V 45 mm
13 GND GND 45 mm
14 SD D2 60 mm
15 DIN D3 65 mm
16 LRC D4 70 mm
17 BCLK D5 70 mm

5. Earphone

# What Where Length
18 thread in the earphone cable from outside through the Ø2.4 hole in the rear wall 30 mm inside; outside, measure up to your ear (approx. 5–8 cm)
19 one wire of the right speaker the free leg of the 150 Ω resistor on the amplifier + output –
20 the other wire of the right speaker the free leg of the 150 Ω resistor on the amplifier − output –

6. Not wires

Checks before powering up

  1. With a multimeter: no short between 5V–GND and 3V3–GND.
  2. The amplifier + and − outputs must not touch GND.
  3. The touch wires must not touch each other or any other wire (the enamel may get damaged at the hole).
  4. Only then plug in the USB-C.