Build it
Eight stages, each ending at a test you can actually fail. The order exists so that when something does not work you know which one thing you just changed.
Order in two waves
Not to spread the cost — because the expensive half of the list is exactly the half that depends on a question nothing has answered yet. Read range through your actual lid material, with a sticker on an actual playing card, aimed by an actual four-year-old. That number decides the enclosure; the enclosure decides the panel layout; the panel layout decides what you crimp. Buying all of it now means guessing three times.
Wave one —
Everything that runs off USB. Gets you through stages 0–5: headers on, board flashing, card reading, sound coming out, buttons and volume working. And it answers the range question on the bench, with a ruler, before anything is committed.
Wave two —
The power chain, the connector kit, the crimper, and the enclosure. Every one of these is cheaper to buy after wave one than before it — and if range disappoints, at least two of them change.
What I would expect to go wrong
Written down now so that when one of them happens it is a known unknown rather than a bad evening. Ordered by how much I would bet on it.
| # | Risk | Cheapest test | If it fails |
|---|---|---|---|
| 1 | Read range is short and fussy. A 25 mm sticker is a small antenna, and it has to work through a lid, off-axis, aimed badly. | Stage 4, with a ruler, through each candidate material. Fifteen minutes and it is the highest-information fifteen minutes in the project. | A card-format tag has a far bigger antenna and reads much further — but printed PVC cards cost more and lose the deck-of-cards charm. Or: thinner panel, deeper nest. |
| 2 | Writing NDEF to NTAG213 from the PN532. Libraries are stronger at reading than writing, and stronger on MIFARE Classic than on NTAG2xx. This path is load-bearing — box-side enrolment is the entire reason an iPhone works. | Immediately after stage 4. Write a card, read it back on a phone. | Write the pages directly. A Type 2 tag is a TLV and some records from page 4 onward, and
lib/tag.js already produces the exact bytes — perhaps a hundred lines. |
| 3 | ESP-ADF is heavier than it looks. Its build system is fussier than Arduino-style development, and it is the thing that makes “upload whatever your phone recorded” true. | Stage 3, playing a real .m4a off the card — not a test tone. |
Fall back to a single-format decoder and constrain uploads to MP3. That weakens the voice-memo story rather than breaking it, and the studio can transcode. |
| 4 | The captive portal misbehaves on one platform or the other. This is famously fiddly and every OS probes differently. | Both phones in the house, at stage 7. | Print the IP on the bottom of the box and tell people to type it. Uglier, always works. |
| 5 | The power chain. Genuinely the least worrying thing here, which is why it is deliberately last. | Stage 6, meter in series. | Measured draw far above the budget means something is not sleeping — almost certainly a continuous NFC field. |
Before you order
- Read the design record, or at least §3. It is short and it will stop you buying a 125 kHz reader or a foil-backed deck of cards.
- Decide branded or unbranded on the bill of materials. If you buy one branded part, buy the PN532 — the antenna is what risk 1 is about.
- Buy one deck of cards and test a single sticker on it before you sticker fifty.
The bench
What you need on the table, what you probably already have, and the four tricks that replace the tools you do not: the system page. It is kept there rather than here because it outlives this project — the bench is bought once and every build after this one is just parts.
How things connect
Most of the wiring is not wiring
Every module in the parts list — the ESP32 board, the PN532, the amplifier, the SD breakout — comes on 0.1″ pins. Solder female headers to the board and plug them in. The four fiddliest interconnects stop being cables at all, a dead module becomes a swap rather than a desoldering job, and you can lift the PN532 out to test read range through different lid thicknesses without unwiring anything.
What is genuinely left as cable, once the modules plug in:
| Run | Conductors | Terminate with |
|---|---|---|
| Board → speaker | 2 | JST-XH 2-pin |
| Board → back button | 2 | JST-XH 2-pin |
| Board → next button | 2 | JST-XH 2-pin |
| Board → volume pot | 3 | JST-XH 3-pin |
| Board → LED | 2 | JST-XH 2-pin |
| Board → power switch | 2 | JST-XH 2-pin |
| Charger → cell, charger → board | 2 each | already done — both ends ship with JST-PH |
Six short runs. That is not a harness, it is an afternoon — and the highest-current connection in the box, the battery, arrives already connectorised.
JST-XH, and whether to crimp
JST-XH rather than Dupont, because Dupont is friction-fit only and is explicitly not for anything that moves. This is a toy a four-year-old will shake, drop and carry by the wrong end. JST-XH latches and is polarised.
Order all three parts. A JST-XH connection is a plastic housing plus loose
female crimp contacts on the cable, and a shrouded male header on the board — JST's
B2B-XH-A family. Kits sold as “JST-XH connectors” are frequently cable-end
only. The three parts.
Contacts are SXH-001T-P0.6, 22–28 AWG, so any ratcheting crimper with a 0.08–1.0 mm² die will do them. And the pitch is really 2.5 mm despite every listing saying 2.54 — fine on an 0.1″ grid up to about 6 ways, and our longest run is three.
Strain relief is the part people skip
Every cable that leaves the board gets anchored before it reaches its connector, so a tug pulls on the board and not on a solder joint. A zip tie through two holes in the protoboard costs nothing and is most of the difference between a box that survives a four-year-old and one that comes back in pieces.
The stages
Nine, counting the one before the first.
0 · Solder the headers on
Breakouts ship their pin strips loose in the bag. Solder male pins to the PN532, the amplifier and the SD breakout; solder female sockets into the Perma-Proto where each one will sit. The dev board already has its pins on. The two sets of pins, and which is which.
Hold each strip square by plugging it into a solderless breadboard and setting the module on top — then tack one corner pin and check it is flush before doing the rest. Correcting one joint is easy; correcting a whole crooked strip is a new module.
1 · Flash the board on its own
Before anything is soldered. Confirm the board enumerates, takes firmware, and prints to the serial console.
2 · SD card
Four wires and power. Format a card, put a file on it, read it back.
3 · Sound
Three I²S wires plus the mute line. Play a file off the card. Do this before the NFC reader, because audio working is what makes every later stage debuggable by ear.
4 · The reader
Two I²C wires and the interrupt. Set the module’s DIP switches to I²C — this is the step everyone misses and it looks exactly like a dead board. Then read a card, then write one.
5 · Controls
Buttons to ground with internal pull-ups. The pot across 3V3 and GND, wiper to the ADC. Set the volume ceiling here, with the pot at maximum and a child in the room, and then leave it.
6 · Power
Last, and on purpose: everything before this ran off USB, so a fault here cannot be confused with a fault anywhere else. Follow the power chain exactly.
7 · Bench test the whole thing, before it goes in a box
Record a real story, upload it, write a card, play it, take the card off mid-sentence, put it back. Leave it idle for an hour and confirm it went to sleep and wakes on a button.
8 · The enclosure
Requirements have accumulated from the electronics and are listed: the card nest sized by the range you measured at stage 4, a screwed battery compartment, the speaker firing up or forward, and small enough that a four-year-old can carry it with two hands.
What this page still owes you
- A photograph of each stage, which is worth more than the schematic for anyone who has not soldered before
- Wire colours and lengths, and where the ground rail goes
- Browser flashing, so no toolchain has to be installed — the S3’s native USB makes this possible and it is not yet built
- The enclosure files
- The section that decides whether anyone else finishes one: what went wrong, and what it looked like when it did
Meanwhile the simulator is the whole interaction in a tab, and the studio already records books. Everything except the box is real.