Skip to the content
2 layers46 × 67.1 mmTune button xiao, the printed circuit board in 3D

Tune button xiao

EdgeCoil/tune-button

BLE remote (ESP32-C3) that likes or playlists the current Spotify song through a companion Android app. Firmware, app, protocol and three PCBs: XIAO, four-key and JST-button.

Size
46 × 67.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
18
Nets
16
Pads
56
Tracks, vias
60, 204
Pours
19
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
19 Oct 2026
Updated
5 Nov 2026

Overview

Tune button xiao is an open-source printed circuit board by EdgeCoil, from the EdgeCoil/tune-button repository on GitHub. It is a 2-layer board of 46 × 67.1 mm with 18 parts on 16 nets, routed with 60 tracks and 204 vias.

It is built around the 1N4148WS. Its parts include 4 connectors, 4 switches, 3 resistors, 2 diodes and 1 capacitor.

Main components

1

README

README.md

Tune Button

A pocket remote for Spotify on Android. Out of the box its four keys like the song that's playing, add it to a playlist, skip, and play or pause. Each key can also do something else when held or double-pressed. It runs for months on a small battery and charges over USB-C.

It is not a Bluetooth keyboard, so nothing on the phone gets remapped. Each press sends a small, signed Bluetooth broadcast. A companion app hears it in the background, even with the phone locked, and does what you set that key to do.

The three Tune Button boards The three four-key boards (renders; rev A is being made): c3-jst with buttons on a cable, the XIAO board, and the C3 board's key side.

text
 button ──wake──► ESP32-C3 ──signed BLE broadcast──► Android app ──HTTPS──► Spotify
                 (deep sleep)                      (listens in the         like, add, skip,
                                                    background)            play/pause, …

Status: works end to end. A one-button unit on a XIAO ESP32-C3 liked the playing song from a locked Samsung phone; the app heard the press in 0.8 s. The four-key firmware and app (holds, double presses, playback control) are written and unit-tested but not yet tried on hardware; the four-key boards (rev A) are ordered. Still to do: a longer latency run on each scan mode and a battery-life measurement. See docs/design.md.

What you need

  • The button: one of the four-key boards (see Hardware), or a hand-wired Seeed Studio XIAO ESP32-C3 with a small LiPo cell and one or two 12 mm tactile switches (hardware/wiring.md). There are 3D-printable cases, and layered acrylic cases for the four-key boards (hardware/case).
  • An Android phone, version 8.0 or later.
  • Spotify Premium. Spotify requires it on the account that owns the developer app, and the developer app works for up to five users.

Set up

1. Create a Spotify developer app

  1. Sign in at developer.spotify.com/dashboard and create an app. Tick Web API.
  2. Add the redirect URI tunebutton://callback.
  3. Copy the Client ID. You don't need a client secret: the app signs in with PKCE.

2. Flash the firmware

Pick the build for your button:

ButtonBuild (-e)sh scripts/merge.sh <build> makes
Hand-wired XIAO, two buttonsxiao_esp32c3 (the default)tune-button-c3.bin
Hand-wired XIAO, one buttonxiao_esp32c3_1btntune-button-c3-1btn.bin
XIAO four-key boardxiao_boardtune-button-xiao-board.bin
c3 or c3-jst boardc3_boardtune-button-c3-board.bin

With PlatformIO:

bash
cd firmware
pio test -e native            # host tests: packet encoder, signatures and key gestures
pio run -e c3_board -t upload # build and flash over USB-C

Or make one image (table above) and flash it at offset 0x0, either in Chrome with esptool-js or with esptool.py --chip esp32c3 write_flash 0 tune-button-c3.bin.

Only have one button? Wire it to D1. A press acts when you let go; holding it for 5 seconds pairs.

Things worth knowing:

  • The USB port vanishes while the button sleeps, which is almost all the time. To flash it again, hold BOOT (the small button next to USB-C) while plugging it in. A button press also wakes it for 10 seconds, enough for an upload that's already waiting.
  • Flashing the merged image at 0x0 erases the pairing, so pair again afterwards. pio run -t upload keeps it.
  • Build options in platformio.ini: TB_BURST_MS (how long each press is broadcast) and TB_LED_PIN.
  • Updating from the two-button firmware keeps the pairing (with pio run -t upload), and the app still understands a button that hasn't been updated.

3. Install the app

bash
cd android
./gradlew test assembleDebug      # needs JDK 17+ and Android SDK 35

Install app/build/outputs/apk/debug/app-debug.apk on the phone, open it and work down the screen:

  1. Paste the Client ID and tap Sign in to Spotify. (Signed in before playback control existed? The app asks you to sign in again, to allow it.)
  2. Pair: hold keys 1 and 2 (top left and top right) for 3 seconds (one-button build: hold it for 5 seconds) until the LED flickers, then tap Pair. Accept the Bluetooth prompt if one appears. Pairing makes a fresh key, so a previously paired phone stops working; a pairing that no phone completes changes nothing.
  3. Keys: tap any key's press, hold or double press to choose what it does. Key 2's press needs a playlist.
  4. Fix everything listed under Keep listening in the background. On Samsung phones, also add the app to Never sleeping apps, or presses stop being heard after a few days.
  5. Tap Test without the device to check the Spotify side on its own.

Using it

Press a key. Within a moment the phone buzzes once and shows a notification, for example "♥ Liked — Title · Artist" or "⏭ Next track". If something goes wrong it buzzes twice and says why: nothing playing, signed out, a local file, and so on. Podcast episodes work too.

What a key can do, on press, hold (0.6 s) or double press:

The songlike it, remove it from Liked Songs, add it to a playlist, remove it from a playlist
Playbackplay / pause, next, previous, volume up or down 10 %, shuffle on / off, repeat (off → all → one), play a playlist
Anything elsecall a webhook, such as a Home Assistant automation. It gets the key, the gesture and the song

Each slot has its own playlist, so key 2 could add to one playlist and key 2 held to another.

Holds and double presses cost a little speed, on that key only. A key with nothing on hold or double press sends the moment it goes down. One with a hold action waits for you to let go (or for the hold); one with a double press waits 0.3 s for a second press. The button has to know which keys wait, so after changing those, the app asks you to hold keys 1 and 2 for 3 seconds and tap Send key settings. That doesn't re-pair anything.

Quick presses all count: three fast presses of skip are three skips.

The app's Recent presses list shows, for each press, how long the phone took to hear it, how long Spotify took, the button's battery level and the result.

Hardware

OptionWhat it isState
Hand-wired XIAOA XIAO ESP32-C3 with one or two switches and a LiPo: hardware/wiring.mdOne-button unit built and working
3D-printed caseParametric OpenSCAD, with ready STLs: hardware/case/Ready to print
Four-key PCBsThree boards: one carrying a XIAO, one with the ESP32-C3 module on board, and a small one that takes buttons on a cable. hardware/pcb/Rev A ordered

The firmware supports all four boards, but it hasn't been run on them yet (they're being made).

How it's put together

PathWhat it is
firmware/PlatformIO / Arduino firmware for the ESP32-C3 (NimBLE)
android/The companion app (Kotlin, Android 8+)
protocol/The broadcast format, and gen_vectors.py, which makes the test vectors both sides check against
hardware/Wiring, parts, the case and the PCBs
docs/design.mdHow it works, security, power budget, latency and bench tests

Each press is signed with a key shared at pairing and carries a counter, so the app ignores copies and anything not from your button. docs/design.md has the details.

Licence

WhatLicence
The case and PCBs: hardware/case/, hardware/pcb/ (OpenSCAD and KiCad sources, STLs)CERN-OHL-S-2.0
Firmware, app, protocol toolsMIT
The Gradle wrapper (android/gradlew*, android/gradle/wrapper/), as shipped by GradleApache-2.0
Documentation (README.md, docs/ including the renders, hardware/wiring.md, protocol/spec.md)CC BY 4.0
The EdgeCoil mark (hardware/pcb/edgecoil-mark.svg and the silkscreen drawn from it), name and URLAll rights reserved

Each source file carries an SPDX header, and REUSE.toml covers the rest by path.

The board licence does not cover the EdgeCoil mark, name or URL on the silkscreen. If you make or sell boards from these designs, take them off.

Spotify is a trademark of Spotify AB. This project is not affiliated with or endorsed by Spotify.


edgecoil · edgecoil.dev

Parts

18
QtyValueFootprintReferences
4M2MountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
4MX switchButton_Switch_Keyboard:SW_Cherry_MX_1.00u_PCBSW1, SW2, SW3, SW4
2220kResistor_SMD:R_0603_1608MetricR1, R2
1100nCapacitor_SMD:C_0603_1608MetricC1
11N4148WSDiode_SMD:D_SOD-323_HandSolderingD1
11kResistor_SMD:R_0603_1608MetricR3
1LEDLED_SMD:LED_0603_1608MetricD2
1LiPoConnector_JST:JST_PH_S2B-PH-SM4-TB_1x02-1MP_P2.00mm_HorizontalJ3
1XIAO leftConnector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_VerticalJ1
1XIAO rightConnector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_VerticalJ2
1to XIAO BATConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ4

More from EdgeCoil/tune-button

3
  • 2 layers148 × 86.7 mmTune button panel, the printed circuit board in 3D

    Tune button panel

    EdgeCoil/tune-button

    BLE remote (ESP32-C3) that likes or playlists the current Spotify song through a companion Android app. Firmware, app, protocol and three PCBs: XIAO, four-key and JST-button.

    246 parts
  • 2 layers36 × 50 mmTune button c3-jst, the printed circuit board in 3D

    Tune button c3-jst

    EdgeCoil/tune-button

    BLE remote (ESP32-C3) that likes or playlists the current Spotify song through a companion Android app. Firmware, app, protocol and three PCBs: XIAO, four-key and JST-button.

    42 parts
  • 2 layers46 × 69.7 mmTune button c3, the printed circuit board in 3D

    Tune button c3

    EdgeCoil/tune-button

    BLE remote (ESP32-C3) that likes or playlists the current Spotify song through a companion Android app. Firmware, app, protocol and three PCBs: XIAO, four-key and JST-button.

    42 parts

Similar boards

  • 2 layers134 × 88 mmTulipcc, the printed circuit board in 3D

    Tulipcc

    shorepine/tulipcc

    The Tulip Creative Computer and AMYboard - portable Python synthesizers

    103 parts978
  • 8 layers100.2 × 55 mmJetson nano baseboard, the printed circuit board in 3D

    Jetson nano baseboard

    antmicro/jetson-nano-baseboard

    Antmicro's open hardware baseboard for the NVIDIA Jetson Nano, TX2 NX and Xavier NX

    391 parts548Apache-2.0
  • 4 layers94.4 × 72.8 mmRP2040 base, the printed circuit board in 3D

    RP2040 base

    Twisted-Fields/rp2040-motor-controller

    A dual channel brushless motor controller based on the RP2040 microcontroller, designed in Kicad.

    325 parts419
  • 2 layers135.9 × 89.5 mmLeft, the printed circuit board in 3D

    Left

    TeXitoi/keyseebee

    KeySeeBee is a split ergo keyboard. It is only 2 PCB (so the name) with (almost) only SMD components on it. It's only a keyboard, no LED, no display, nothing more than keys and USB.

    61 parts348MIT
  • 4 layers70 × 54 mmPicoLab, the printed circuit board in 3D

    PicoLab

    CoretechR/PicoLab

    Web-GUI Embedded Multitool

    285 parts327GPL-3.0
  • 4 layers22.9 × 50.8 mmLg hvac esp32, the printed circuit board in 3D

    Lg hvac esp32

    JanM321/esphome-lg-controller

    Wired controller for LG HVAC units using ESPHome and ESP32

    20 parts2920BSD
  • 4 layers121.9 × 109.2 mmPlinkyblack hwmidi jacks, the printed circuit board in 3D

    Plinkyblack hwmidi jacks

    plinkysynth/plinky_public

    a public release of the plinky sw and hw

    300 parts227
  • 4 layers140 × 100 mmDc usv, the printed circuit board in 3D

    Dc usv

    TobleMiner/DC-UPS

    A small DC UPS, designed to keep small appliances like consumer network equipment running during power outages

    351 parts223CERN-OHL-P-2.0

Questions

How big is the Tune button xiao PCB?

It measures 46 × 67.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Tune button xiao use?

18 parts, built around the 1N4148WS. 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 Tune button xiao KiCad files?

From the EdgeCoil/tune-button repository on GitHub, at the commit this page was made from: the board is hardware/pcb/xiao/tune-button-xiao.kicad_pcb and its schematic hardware/pcb/c3-jst/tune-button-c3-jst.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Tune button xiao design in my own project?

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