_stition expansion module

Headphones module: a DAC and a 3.5 mm jack

A PCM5102A board with the jack already on it, six wires and four solder bridges. About $3.50 and under an hour, on any of my e-reader builds.

What it adds

Wired headphones. A small DAC board turns the board's digital audio into sound.

The ESP32-S3 has no proper audio output of its own. A small DAC board turns its digital audio into a clean headphone signal, and this one has the 3.5 mm jack already on it.

The board is a purple PCM5102A (sold as GY-PCM5102). It talks to the ESP32 over I2S: three signal wires, plus power. In the reader firmware it plays the Sound test for now; on the speed reader it is also what the upcoming sequencer plays through (a separate firmware, see that guide).

This is a _stition expansion module: one add-on that fits several of my builds. Your build's own guide says where it sits in that case; this page is the how-to. Everything here is free and open source. Questions? Ask on the _stition Discord.

Works with

The speed reader today. More of my e-reader builds coming.
  • Speed reader min (wide 5.79 in). Supported. Pins in the pin table, case position in the speed reader guide.
  • WiFi e-reader (5.76 in). Coming. Needs pins and firmware support.
  • Solar e-reader. Coming.

Parts

About $3.50 for the DAC board. Bring your own wired headphones.
PartWhat to buyPriceNotes
DACPCM5102A DAC board with a 3.5 mm jack (the purple GY-PCM5102)About $12 for 2Six header pins: VIN, GND, LCK, DIN, BCK, SCK.
HeadphonesAny wired headphones with a 3.5 mm plug$0 if you have someCheck how big a plug your build's case takes (the speed reader takes plugs up to 9 mm across).

Some links are affiliate links: if you buy through them, the shop pays me a small cut at no extra cost to you. It funds the next guide.

Wiring

Six wires in header order. VIN on 3V3, SCK to ground.

In the board's header order:

  • VIN to 3V3. Not 5V: on these dev boards the 5V pin is an input, so it is not a reliable supply.
  • GND to any GND pin.
  • LCK (word select, left or right) to the host's I2S word select pin.
  • DIN (audio data) to the host's I2S data pin.
  • BCK (bit clock) to the host's I2S bit clock pin.
  • SCK to GND. It is not a board pin. Tied to ground, it tells the DAC to make its own clock from BCK, which saves a wire.
Headphones wiring: DAC VIN to 3V3, GND to GND, LCK to GPIO 4, DIN to GPIO 5, BCK to GPIO 6, and the DAC's SCK to GND
The pins shown are the speed reader's. Other host builds use the pins in the table above.

Pins for your build

One column per build. Read down yours.
Module pinSpeed reader min (wide 5.79 in)WiFi e-reader (5.76 in)Solar e-reader
VIN3V3comingcoming
GNDGNDcomingcoming
LCKGPIO 4comingcoming
DINGPIO 5comingcoming
BCKGPIO 6comingcoming
SCKGNDcomingcoming

The numbers are the GPIO numbers printed next to the board's pins. Each build's include/pins.h in the firmware is the source of truth if this table and the code ever disagree.

Steps

Set four solder bridges (meter them, the labels can lie), then six wires.

Set the solder bridges

Watch this step

On the back of the board are four small solder bridge pads, numbered 1 to 4, each with an H and an L side. The usual setting is 1 L, 2 L, 3 H, 4 L. Check the silkscreen before you trust it: on mine the H and L labels were printed the wrong way round (the pad marked H was really ground). So meter each side to GND first: the L side is the one that beeps to GND.

Back of a purple PCM5102 DAC board with four solder bridge pads labelled H1L, H2L, H3L and H4L, each joined to one side
Mine, set and working. By the printed labels it reads 1 H, 2 H, 3 L, 4 H, because this board's H and L are swapped: metered, it is 1 L, 2 L, 3 H, 4 L. Meter yours.

CheckYou should see each of the four bridges joined to exactly one side, with no blob touching both.

Wire it

Watch this step

Six wires in header order, per the wiring and your build's column in the pin table. SCK goes to GND, not to a board pin.

CheckYou should hear the multimeter beep between SCK and GND, and between each of LCK, DIN and BCK and its board pin.

Fit the jack in the case

Watch this step

Line the jack's mouth up with the hole in your build's case and fix the board so a plug pushed in does not shove it back. Your build's guide says where it goes.

CheckYou should be able to push a plug all the way home with the case closed, and feel it click.

Check it works

Pick Sound test under WiFi and settings. Both ears, then left, then right.

Plug in your headphones, all the way home, and pick Sound test under WiFi and settings in the reader's menu. It plays a tone sweep in both ears, then the left ear only, then the right ear only. No reflash needed.

CheckYou should hear the sweep in both ears, then the left ear alone, then the right ear alone. Left only all the way through means the plug is not fully in.

No Sound test in your menu? Builds whose firmware does not have it yet can use the tone test from the repo instead. On the speed reader, with PlatformIO:

pio run -e dac_tone -t upload

It replaces the reader firmware with a test that plays the same sweep. Flash the reader back afterwards with the upload command from your build's guide.

Troubleshooting

One ear only is nearly always the plug. No sound is the bridges or SCK.
Headphones play in one ear only.
Push the plug all the way in. On mine it was not fully home through the case wall. If it still plays in one ear, run the Sound test again and check the solder bridges.
The DAC makes no sound at all.
Check that its SCK pin is tied to GND, that VIN is on 3V3, and the four solder bridges on the back. The H and L labels can be printed the wrong way round, so meter them rather than trusting the silkscreen. Then beep out LCK, DIN and BCK against your build's column in the pin table.
The sound is distorted or very loud.
Turn the volume down on the headphones if they have a control, and check the bridges again: a wrong bridge can change how the DAC reads the audio. The four set the PCM5102A's mode pins, printed along the bottom edge: 1 is FLT (filter, L for normal), 2 is DEMP (de-emphasis, L for off), 3 is XSMT (mute, H for sound on) and 4 is FMT (L for the I2S format the firmware sends). A wrong 4 is the usual cause of loud noise instead of music.
There is no Sound test in my menu.
Your build's firmware is older, or the build does not support this module yet. Update the firmware from your build's guide, or use the dac_tone test above.

Still stuck? Post in #ereader on the Discord with a photo of your wiring and which build it is in.

Open source. Firmware under the Apache License 2.0 at github.com/AllanBinder/ereader, and this page under CC BY 4.0. Copy it, change it; just credit the original.