1
0 Comments

Building an ESP32 Bible Audio Player: From Custom PCB to Mobile App Control

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.

Why ESP32 Instead of Raspberry Pi

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.

The Custom PCB Design

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:

  • ESP32-WROOM-32 module
  • MAX98357A I2S audio amplifier (3W output into 4 ohm speaker)
  • TP4056 lithium battery charger with protection
  • MCP73831 for power management
  • Three tactile buttons: Play/Pause, Next Track, Volume Up
  • RGB LED for status indication
  • Micro-USB for charging and firmware updates

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.

Firmware: Zephyr RTOS for Audio Playback

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:

  1. Audio playback — Reads MP3 files from flash, decodes them, and feeds samples to the I2S peripheral at 44.1kHz/16-bit
  2. Button handling — Debounced input with configurable long-press and double-press actions
  3. Bluetooth control — Runs a GATT server that exposes playback state, track list, and volume control

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.

The Mobile App: React Native with BLE

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.

Why This Beats a Raspberry Pi for This Use Case

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.

Lessons Learned

A few things we'd do differently next time:

  • Use external flash — We stored audio on the ESP32's internal flash, which limited us to about 2 hours of MP3 at 128kbps. Next time, we'll add a QSPI flash chip for 64MB or more.
  • Add NFC — For the Office Vending machine scenario, NFC would let users tap their phone to select a chapter without opening the app. We're planning this for v2.
  • Better enclosure — Our 3D-printed case works but looks DIY. For production, we'd go with injection molding.

Shipping the Prototype

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.

on July 27, 2026
Trending on Indie Hackers
Stop losing deals in the gap between "sounds good" and getting paid User Avatar 64 comments Building a startup costs $0. Your tooling budget costs $500K. Here's why. User Avatar 50 comments We scanned 50,000 domains. Your cold email list is really four systems. User Avatar 39 comments 787 tools for developers. 5 for nurses. Two weeks of tracking 14,000 indie launches. User Avatar 38 comments 67K impressions in 2 days from a single Daily-Dev post — here's what happened User Avatar 24 comments 🚀 I built Brickbeam — an AI-powered assistant that helps LEGO fans turn their messy piles of bricks into real builds. User Avatar 21 comments