Main Content

LauraBox

A children’s juke box controlled by RFID tags, based on an ESP32.

Features:
- Playback of user-defined MP3 playlists
- Playlist selected though RFID tag. Cheap RFID stickers can be placed on any 3D printed model.
- Battery powered, can play while charging
- Four buttons: volume +/-, next/previous track
- Intuitive pause functionality by removing the RFID tag and putting it back on to resume (no limit in pause time, no impact on battery life)
- WiFi download of new MP3s and playlists
- Firmware upgrade via WiFi
- Long standby time (several month)
- Long play time (many hours, if not days)
- Toddler proof :-)

Main components
- EPS32 microcontroller
- MFRC522 RFID board
- PCM5102 I2S stereo audio DAC
- PAM8403 stereo amplifier
- Pair of wideband speakers
- 3.6V Li-ion battery with USB charge controller from a USB power bank (2x 18650-type cells with 2500 mAh)
- SD card to store MP3 files and playlists

Why use the ESP32?
At first I was considering building the box based on a Raspberry Pi. I had an old first generation Pi lying around unused, so I though it would be a good way of using it. I was immediately disappointed by its sound quality. Although this is significantly better on newer models, I learned another lession: The power consumption of a Raspberry Pi is very high, and it takes a long time to boot. Keeping it always running to wait for an RFID card to be detected is out of the question, since I wanted it to run from battery. Adding a small microcontroller (I though of some ATMega) to switch on the Pi only when a card is detected would result in long wait times until the music starts playing. Also the power consumption while playing would be still quite high. A Raspberry Pi typically uses 300 to 500 mA, while an ESP32 just takes a few mA when WiFi is disabled. After short investigation I found the ESP32-audioI2S Arduino library. This makes playback of audio using an ESP32 super easy. Thanks to the ultra low power co-processor of the ESP32 it is possible to cut down the power consumption in sleep mode to around 0.5mA-1.0mA on average (incl. periodic wakeups and RFID reads), which gives you plenty of standby time on battery.”

Link to article