My story studio can write, illustrate, voice and animate children's stories on a home PC. The obvious next question from a small person is: can I listen to it in bed? A tablet at bedtime is not the answer, so this project is the opposite of a screen: a sturdy little box with a speaker and one big knob. Put a picture card on the lid and the matching story plays. Lift the card and it pauses. Put it back tomorrow and it carries on where it left off.
Where the project is today: design stage. This post is the complete design: parts, wiring, software, power budget and test plan. Nothing has been built and tested yet, and code samples are labelled as design sketches.
How it works
Each card has a cheap NFC sticker inside; an NTAG213 costs a few pence. The tag's only job is to provide a unique ID number, and the box looks that ID up in a small file on the microSD card to find which story to play. Nothing needs to be written to the cards, so any NFC tag works and a lost card can be replaced in seconds.
Audio is decoded on the ESP32-S3 and sent digitally over I2S to a MAX98357A, a tiny chip that combines a digital-to-analogue converter with a class-D amplifier of around 3 W. That keeps the analogue path short and quiet, with no hiss from long wires.
The hardware
| Part | Why this one | Approx. £ |
|---|---|---|
| Adafruit ESP32-S3 Feather | The 4 MB flash, 2 MB PSRAM version. Built-in LiPo charging over USB-C and a battery monitor, so no separate charger board; the audio library needs the PSRAM. | 15–20 |
| MAX98357A I2S amplifier breakout | Digital audio in, speaker out. Runs straight from the battery (2.5–5.5 V). | 5–8 |
| 3 W 4 Ω speaker, 40–50 mm | A full-range driver; a sealed back box improves the bass a lot. | 3–8 |
| PN532 NFC module (I2C mode) | Reads 13.56 MHz tags such as NTAG213 through a thin lid. | 8–15 |
| NTAG213/215 stickers or cards ×20 | One per story, stuck behind printed artwork. | 6–10 |
| microSD breakout + 32 GB card | SPI, 3.3 V. Stories live here as plain MP3 files. | 10–16 |
| EC11 encoder + large knob | With push switch: volume, play/pause and wake-up in one control. | 3–5 |
| 2000 mAh protected LiPo | JST-PH connector. Check the polarity: it is not standard between sellers. | 8–12 |
| Enclosure: 3D-printed PETG or plywood | Rounded corners, screwed shut, no small parts. | 5–15 |
That comes to roughly £65 to £110, depending on suppliers and how fancy the box is.
Power: one cell, no separate charger
The Feather charges the LiPo from USB-C and runs from it when unplugged. The amplifier takes its supply straight from the battery pin, so the board's 3.3 V regulator only has to power the ESP32 and the NFC reader. A rough budget while a story plays: the ESP32-S3 decoding MP3 with Wi-Fi off, around 50–80 mA; NFC polling a few times a second, perhaps 20–50 mA on average; and the amplifier, 100–250 mW at sensible bedtime volumes. From a 2000 mAh cell, that suggests something like 6 to 12 hours of listening. It will be measured, not trusted.
Wiring
Pin names below are the Feather's printed labels, and the assignment is a proposal to check against the board's pinout before soldering. Set the PN532 module's mode switches to I2C.
The I2S signals can go to almost any GPIO on the S3, so they sit on pins that are easy to route. The encoder's switch is on a pin that can wake the chip from deep sleep.
Software design
The firmware uses the Arduino core for ESP32 with the ESP32-audioI2S library (MP3, AAC, FLAC and WAV decoding from SD straight to I2S), Adafruit's PN532 driver, and the built-in Preferences library for keeping settings in flash. Audio decoding runs in its own high-priority task, so card reads and button presses can never cause a stutter.
| Module | Responsibility | Notes |
|---|---|---|
| cards | Poll the PN532 every 200 ms and debounce card arrival and removal | 300 ms in, 1.5 s out |
| library | Load /cards.json from the SD card and map tag IDs to story files | unknown card: amber |
| player | Play, pause and resume MP3 files; report the position | own high-priority task |
| resume | Save and restore the position in each story; clear it when a story finishes | NVS key per card |
| controls | Encoder: volume with a hard cap, press to pause, long-press for parent mode | volume capped |
| power | Sleep after 10 minutes idle, wake on the knob, warn when the battery is low | reader powered down |
Cards, debouncing and resume
Children do not place cards neatly. A card slid across the lid should not start three stories, and a wobble should not pause one. So a card must sit still for 300 ms before its story starts, and must be gone for 1.5 seconds before the story stops. When it stops, the current position is saved against that card, so every story remembers its own place:
// Design sketch - NOT TESTED ON HARDWARE.
constexpr uint32_t CARD_PRESENT_MS = 300; // ignore brushes and bounces
constexpr uint32_t CARD_GONE_MS = 1500; // lifting the card stops the story
void onCardTick(const TagId &tag, bool present, uint32_t now) {
static TagId current; // card currently on the lid
static uint32_t seenAt = 0, goneAt = 0;
static bool started = false; // start once per placement
if (present) {
goneAt = 0;
if (tag != current) { current = tag; seenAt = now; started = false; return; }
if (!started && now - seenAt >= CARD_PRESENT_MS) {
started = true;
const Story *story = library.find(tag); // from /cards.json
if (story) player.play(story->file, resume.load(tag)); // seconds in
else led.flash(Colour::Amber); // unknown card
}
} else if (started) {
if (!goneAt) goneAt = now;
if (now - goneAt >= CARD_GONE_MS) { // really lifted
resume.save(current, player.positionSec()); // NVS
player.stop();
current = TagId{};
started = false;
}
}
}
The mapping file is deliberately human-editable, so a parent can add stories with nothing more than a PC and a card reader:
{
"04a1b2c3d4e5f6": { "title": "The Moon Who Lost Its Glow", "file": "/stories/moon-glow.mp3" },
"04c7d8e9fa0b1c": { "title": "Pip and the Thunder Drum", "file": "/stories/thunder-drum.mp3" }
}
Preferences keys are limited to 15 characters, so each card's resume position is stored under a short hash of its 7-byte ID rather than the ID itself.
Sleep and wake
Ideally a card would wake the box by itself, but that means keeping the NFC reader's radio field running, which would flatten the battery within a day or two. The compromise is simple and child-friendly: turning or pressing the big knob wakes the box. After ten minutes without a story playing, it saves everything and drops into deep sleep with the NFC reader powered down.
Parent mode
Holding the knob for five seconds starts a Wi-Fi access point and a small web page for uploading stories and assigning cards: tap an unknown card, pick a story from the list, done. Wi-Fi stays off the rest of the time, which helps the battery and means the box has no internet connection to worry about.
Preparing the stories
Spoken word does not need music-grade bitrates. Mono MP3 at 64 to 96 kbps sounds clean on a small speaker:
| Format | Size per hour | Hours on 32 GB |
|---|---|---|
| Mono MP3, 64 kbps | about 29 MB | ~1,100 |
| Mono MP3, 96 kbps | about 43 MB | ~740 |
| Stereo MP3, 128 kbps | about 58 MB | ~550 |
The story studio already produces narrated audio, so preparing a story is a single ffmpeg command, with loudness normalisation so that one story is not much louder than the next:
# Mono, 96 kbps, loudness-normalised for a small speaker
ffmpeg -i story.wav -af loudnorm=I=-18:TP=-2 -ac 1 -b:a 96k story.mp3
Safety, because it is for children
- Battery: only a protected LiPo cell, charged by the board's own charger and fully enclosed, with no way for little fingers to reach it.
- Volume: a hard maximum set in parent mode. The knob can never go past it, even after a reboot.
- Construction: no small detachable parts, screws rather than clips, rounded edges and a knob that cannot easily be pulled off.
- Heat: the amplifier and charger are checked for temperature during a long charge-while-playing test.
Testing plan
- Cards: slid across, wobbled, two at once, unknown cards, and a card held at the edge of the reader's range.
- Resume: power cut mid-story, battery empty mid-story, and swapping cards back and forth.
- Audio: every file in the library decodes, no clicks on pause and resume, volume cap respected after a reboot.
- Battery: measured run time at bedtime volume, standby drain over a week, charging while playing.
- Robustness: a drop from table height, with the battery removed for the first attempt.
What's next
The first prototype will be breadboarded with the Feather, the amplifier and a speaker, playing a single story from SD, before the NFC reader joins in. Then the enclosure, and then the test that matters most: handing it to an actual child and watching what they do with it.
The same design-first approach runs through my ESP32-S3 vehicle computer write-up.


