Last month, our team finished a project that turned into something we didn't expect: a dedicated Bible audio player running on an ESP32, controlled entirely from a mobile app over Bluetooth. The client wanted something their elderly parents could use without touching a screen — just pick up the device, press a button, or tap their phone. We ended up designing a custom PCB, writing the firmware from scratch, and building both iOS and Android companion apps.
Here's how we did it.
We get this question a lot from raspberry pi developers who assume a Pi is the default for any audio project. And sure, a Raspberry Pi can play audio. But for this use case — a single-purpose device that needs to boot instantly, consume under 100mW, and fit in a palm-sized enclosure — the ESP32 made more sense.
The ESP32-WROOM-32 module we chose has dual-core Xtensa LX6 processors, built-in Bluetooth Classic and BLE, I2S audio output, and enough flash (16MB) to store compressed audio. No SD card needed. No Linux boot time. Power on, and the audio starts in under two seconds.
For Raspberry Pi Developers used to running full OS stacks, this approach feels restrictive at first. But once you strip away the overhead, you realize how much you can do with bare-metal firmware and a well-designed PCB.
We laid out a 4-layer PCB in KiCad. The board measures 60mm x 40mm — small enough to fit inside a 3D-printed enclosure that looks like a vintage radio. Key components:
The audio path is straightforward: the ESP32 reads MP3 files from its internal flash, decodes them using the ESP-ADF (Audio Development Framework), and streams the decoded audio over I2S to the MAX98357A. The amplifier drives a small 40mm speaker mounted in the enclosure.
We added a 500mAh LiPo battery, which gives about 8 hours of continuous playback. The ESP32 deep-sleep mode draws 10µA, so the device can sit idle for weeks without needing a charge.
We wrote the firmware using Zephyr RTOS instead of Arduino. Why? Better threading, proper power management, and native Bluetooth stack support. The firmware handles three main tasks:
The Bluetooth profile is simple: three characteristics — PlaybackCommand (write), CurrentTrack (read/notify), Volume (read/write). The phone app writes a byte to PlaybackCommand to play, pause, or skip. The ESP32 notifies the app when the track changes.
For the companion app, we used React Native with the react-native-ble-plx library. The app scans for the device (advertised as "BiblePlayer-XXXX"), connects, and discovers the GATT services.
The UI is minimal: a list of books and chapters, a play/pause button, volume slider, and a progress bar. When the user selects a chapter, the app writes the track index to the PlaybackCommand characteristic. The ESP32 responds by loading the corresponding MP3 file and starting playback.
We also added a "sleep timer" feature: the user can set the device to stop playback after 15, 30, or 60 minutes. The ESP32 handles this with a simple timer in firmware — no app involvement needed after setting.
If you're an raspberry pi developer, you might wonder why we didn't just use a Pi Zero with a USB speaker. Here's the thing: the Pi Zero draws about 100mA idle. The ESP32 draws 80mA while playing audio. In deep sleep, the Pi still pulls 50mA. The ESP32 pulls 10µA.
For a device meant to be portable and battery-powered, that difference matters. Also, the ESP32 boots in under a second. The Pi takes 30 seconds minimum.
And for the Office Vending Machine use case — imagine a kiosk in a break room where employees can pick up a device, tap their phone to select a chapter, and listen while they work — the ESP32's low cost ($3-5 per module) makes it feasible to deploy dozens of units. A Pi Zero costs $10-15, plus SD card, plus power supply. The math works out differently.
A few things we'd do differently next time:
We shipped the first working prototype to the client in 6 weeks: custom PCB, programmed firmware, 3D-printed enclosure, and both mobile apps. The client's parents have been using it daily for three months now. No crashes, no battery issues, no complaints.
If you're building a single-purpose audio device — Bible player, audiobook player, podcast player, museum audio guide — consider the ESP32 before reaching for a Raspberry Pi. The learning curve is steeper, but the result is smaller, cheaper, and more power-efficient.
Need help with your own custom PCB and firmware project? Our team handles everything from concept to production. We build the hardware, write the firmware, design the enclosure, and ship working prototypes. Drop us a line.