Project · September 2026 · in progress

Vinyl ADC: a discrete stereo converter

A stereo audio ADC built from op-amps and logic gates. Born on four hand-milled PCBs and measured at 67.9 dB dynamic range against a simulated 68 dB; now one four-layer Raspberry Pi HAT made by PCBWay, which records a turntable with about 8 dB more range than the milled boards did.

Analog electronicsDelta-sigma ADCSPICEDSPKiCadPCB designRaspberry Pi3D CADAudio

View on GitHub ↗

Personal project. I designed the converter, simulated its analog behavior, and split the circuit into four boards that could be milled in-house. With PCBWay sponsoring fabrication, it is now one four-layer board that the Raspberry Pi plugs into.

The build story in under thirty seconds: from four milled boards to one PCBWay board. Sound on.

Rev D: made by PCBWay

Rev D: the converter as one four-layer Raspberry Pi HAT, with eight status LEDs along the front edge
Rev D, 140 × 136 mm: both channels on the left, clock and supply over the Raspberry Pi 4 underneath, status LEDs along the front. CAD render.

One board, four layers, made by PCBWay, and the best-measuring version of this converter so far.

Every board before this one was isolation-milled single-sided, which is why the converter was four stacked boards with dozens of wire links, and why its first bring-up spent a day on a supply rail that reached one board only through solder wicked up an unplated hole. When PCBWay offered to sponsor the fabrication, I could finally draw the converter the way a mixed-signal circuit wants to be drawn: one board, a solid ground plane, an analog supply island behind its own choke, status LEDs, and the Pi as a HAT underneath. I’m grateful to PCBWay for that; this section is about what their boards did for the project.

The four milled boards of the original Vinyl ADC, stacked, next to the single PCBWay rev D board
Before and after: the four-board milled stack, and rev D as PCBWay made it.
The bare rev D board from PCBWay, component side: green solder mask and white silkscreen
The bare board as it arrived: component side.
The bare rev D board, copper side, with the Raspberry Pi socket footprint and the board legend
And the copper side, where the Raspberry Pi plugs in.

What PCBWay made

Rev D, per board
Stack-up4 layers with a solid ground plane, 1.6 mm FR-4, 1 oz copper
Finishsolder mask both sides, white silkscreen, HASL lead-free
Holes649 plated barrels: 636 through-holes and 13 vias, on each of five boards
Routing1,020 tracks, the narrowest 0.25 mm; drills down to 0.4 mm
Legends184 reference designators at 1 mm, the smallest labels 0.8 mm
Close-up of the rev D silkscreen: reference designators and the designer credit, crisp at under a millimetre
Legends under a millimetre tall come out clean and sharp.
Close-up of rows of plated through-holes with HASL finish
Every barrel plated and tinned, every via tented under the mask.

Why a fab board, for a converter

A delta-sigma modulator switches at 1.536 MHz right next to integrators that resolve microvolts. On one milled layer, ground was whatever copper was left between tracks; on rev D a whole inner layer is ground, under every signal. Every joint is soldered from one side and carried through by a plated barrel, so the fault that cost the most time in September cannot happen. And there are five identical boards, where every milled board was a one-off.

Milled stackRev D by PCBWay
Boards4 × 100 × 100 mm1 × 140 × 136 mm
Copper1 layer, milled4 layers, solid ground plane
Wire linksdozensnone
Bring-uptwo days, two hidden faultsboth channels healthy and matched at the first capture

The record decides

Same turntable, same phono stage, levels set so music peaks at −6 dBFS on both builds, stylus lifted:

20 Hz–20 kHzMilled stack, bench supplyRev D, Raspberry Pi supply
Idle floor, A-weighted−61.1 dBFS−69.7 dBFS
Idle floor, 200 Hz–2 kHz−68.6 dBFS−73.7 dBFS
Idle floor, 2–20 kHz−59.6 dBFS−76.5 dBFS
Music to floor, A-weighted54.2 dB63.7 dB

About 8 dB more range from the groove to the file, and a floor 5–17 dB lower above 200 Hz. Rev D does that on the supply that cost the milled boards the most, and these figures were taken on the Pi’s own clock, before its crystal was running. What remains is 50 Hz hum common to both channels, which is the turntable’s grounding rather than the converter; the board has a tonearm terminal for that next experiment.

On the bench

With its own crystal running, an Analog Discovery 3 generator into the input and the other input shorted:

Milled stack, best channelRev D, left
Dynamic range (AES17, A-weighted)67.9 dB78.7 dB
THD at −6 dBFS0.03 %0.019 %
Crosstalk−92.4 dB−97.8 dB

That is 11 dB more dynamic range than the milled boards ever reached, and 10 dB past what the design was simulated for. The right channel measures 72.2 dB: it carries an extra in-band floor that the milled stack’s right channel had as well, now traced to its modulator loop and still being chased.

The one rev D fault found so far is mine, not the fab’s: two comparator inputs swapped in the schematic, which keeps both clip LEDs lit; the fix is two resistors on the underside. Full record: the rev D bring-up log and the rev D page of the bench guide.

Rev D assembled on its Raspberry Pi 4, the status LEDs lit
Assembled and running on its Raspberry Pi 4.
Rev D board turning through a full orbit
Rev D on its Raspberry Pi 4. CAD render.
Rev D seen from directly above, every part and legend readable
From above: channel L over channel R on the left, each reading left to right like its schematic, the probe headers in one column, the digital and supply blocks over the Pi, and the front row of LEDs and buttons.
The rev D board lifting off the Raspberry Pi's header and seating again
The HAT on and off the Pi's 40-pin header. CAD render; Raspberry Pi 4 model from the FreeCAD parts library (CC BY 3.0).

An enclosure for rev D

Rev D gets a box of its own, shaped around the board rather than around a stack: 155 × 168 × 51 mm, a black PETG tray with the Raspberry Pi screwed to its floor and the HAT on three posts above it, a front plate that carries the controls, and a 3 mm laser-cut acrylic lid so the board stays on show.

The rev D enclosure closed: a black tray, a silver front plate with eight status lights and two orange buttons, and a clear acrylic lid
Closed. Eight printed light pipes carry the status LEDs to the front plate, and the two buttons press the board's power and record switches. CAD render; the acrylic lid is drawn tinted.
The rev D enclosure with the lid removed, showing the HAT inside the tray behind the front plate
Lid off: the HAT in the tray, with a gutter along the left wall for the terminal-block wires.
The back and side of the rev D enclosure: Ethernet and USB openings, panel RCA inputs and a ground post, and the Pi's USB-C and HDMI ports
The back: panel RCA inputs and a ground post for the turntable, the Pi's Ethernet and USB, and its USB-C, HDMI and audio ports along the side.

Every part was checked in CAD against the board’s 3D models and the Raspberry Pi’s, with real plugs in every port, before anything was printed; that check moved the port openings, the light-pipe walls and two pockets over the board’s screw heads. It has not been printed yet; that, and measuring the parts the models only estimate, come next.

Boards sponsored by PCBWay. Thank you for making the best version of this project possible.

The milled original

The four populated Vinyl ADC circuit boards
The four milled boards without the enclosure: power, right channel, left channel and digital interface, from bottom to top.

The challenge

Comparator delay limited the sampling rate. A third-order loop and delay compensation reached about 68 dB SNR in simulation. SPICE also caught a reversed charge pump that connectivity checks missed.

Measured results

The converter now runs in stereo and has been measured on the bench. The left channel came out within a fraction of a decibel of what SPICE predicted:

SimulatedMeasured
SNR / dynamic range~68 dB67.9 dB
Frequency response, 20 Hz–16.3 kHz—±0.06 dB
THD at −20 dBFS—0.032 %
Crosstalk—−92 dB
Frequency response of both channels, third-octave points from 20 Hz to 16.3 kHz, flat within about a tenth of a decibel
Both channels, measured at third-octave points. The whole vertical scale is a third of a decibel — the traces are flat within about 0.12 dB, which is the decimator's FIR filter behaving as designed. The sweep stops at 16.3 kHz because the next third-octave step would pass 20 kHz.

For a machine whose source is a record, the benchmark is the source: a good pressing delivers 60–70 dB, so the converter is not the limit. Signal generation was an Analog Discovery 3, whose own 14-bit generator bounds any distortion or noise figure near −80 dB — several of the intermodulation results sit at that floor and are measuring the instrument, not the converter.

How one bit gets there

The converter doesn’t measure the voltage. It compares, a million and a half times a second, and outputs a single bit each time — so the density of ones carries the signal, not their value.

192 modulator bits from each channel drawn as filled cells, a fine irregular hatch at half density
125 microseconds of the real output, both channels, with the inputs shorted. A fine irregular hatch sitting at half density means the loop is modulating. When the right channel was broken it looked completely different — long solid bars, oscillating rail to rail instead of tracking its input.

Trading resolution for speed that way produces an enormous amount of quantisation noise. The trick is that a third-order feedback loop doesn’t remove that noise, it moves it — out of the audio band and up into frequencies nothing needs, where the decimation filter discards it.

Noise power density of both 1-bit streams from 20 Hz to 768 kHz, flat at about -127 dBFS per hertz in the audio band then climbing steeply
The noise density of both 1-bit streams, measured from the raw capture. Flat at about −127 dBFS/Hz across the audio band, then climbing roughly 68 dB per decade above it. The two channels lie on top of each other, which is the point: after the repairs their loops are indistinguishable. The spike near 13 kHz is the modulator's own idle tone.

A record through it

Measurements with a signal generator say what the converter can do. This is what it did with a record on the turntable — the first side ripped end to end, as the ripper delivered it to the library.

Spectrogram of 24 seconds of Everything in Its Right Place from the vinyl, 20 Hz to 20 kHz on a log axis, with the keyboard's chord tones as horizontal bands labelled by note, the beats as vertical stripes, and below it a lane showing which note is loudest at each moment and a lane of beat activity
Twenty-four seconds of Everything in Its Right Place off the vinyl. Colour is level against the passage's own average at each pitch, so what stands out is what you hear: the horizontal bands are sustained notes — the keyboard's chord tones, named at the right — and the vertical stripes are the beats. Under the picture, on the same time axis: which note is loudest at each moment, and the beat activity. This rip was made before the right-channel repair — the ripper noticed the oscillating loop and fell back to mono, copying the left channel to both sides — so a true stereo rip is the next thing on the list.
The same twenty-four seconds, exactly as ripped: 48 kHz, lossless. Mono fallback — the left channel on both sides. Excerpt of Everything in Its Right Place, Radiohead, from KID A MNESIA (XL Recordings, 2021), reproduced here only to demonstrate the converter that captured it.
Average spectrum of the record excerpt plotted over the converter's idle noise floor, about 70 dB apart at 1 kHz
The same excerpt's average spectrum over the converter's own idle floor, measured with the inputs shorted and the same FFT. The record sits about 70 dB above the floor at 1 kHz; the shaded band is the converter's headroom. The record's own noise above 10 kHz is the groove, not the electronics.

Getting there took finding two faults in the right channel that had hidden each other. Its negative supply reached the board only through solder that had wicked up an unplated hole beneath a connector body, where no iron can reach — the board’s own KiCad data showed ten connections that depend on a joint on the component side. Underneath that sat a short to ground on the feedback DAC’s output, which left the loop with no feedback at all: every integrator ran into the rails and the whole channel oscillated at 42 kHz. Both channels now shape noise identically at the bitstream level.

The measurement itself needed debugging before the hardware could be trusted. Because the ADC generates its own sample clock at 48009 Hz rather than exactly 48000, test tones landed about 190 ppm low and walked out of the analysis window in proportion to frequency — which looked convincingly like a steep analogue rolloff above 5 kHz, and wasn’t.

Status of the milled stack: Both channels work and are characterised. The right channel’s loop is provably identical to the left, but its input path costs it 9 dB of noise, with an intermittent level trimmer the leading suspect. Absolute input level, running from the Raspberry Pi’s own 5 V, and the enclosure as a physical print are still open. The full test and verification record covers the method, the instrument’s limits and everything not yet verified; the assembly guide and bench log include graphical probe connections and actual readings.

Printable enclosure for the milled stack

Rounded branches leave all four sides open so the boards remain visible. The enclosure is 144 × 144 × 105 mm, adding 40 mm for the taller stack and cable routing. Solid mounting islands surround the connectors. Thicker corner ribs support the four M3 heat-set lid inserts, while the original acrylic lid pattern is retained.

The mesh is a single watertight part and has been sliced with organic supports. Supports are required for the branch overhangs and upper rim; a successful slice is not a physical strength or fit test. The print package includes STL and 3MF files, reference print settings and a small insert-fit coupon. Board spacing in the animation is illustrative.

A full orbit around the printable organic lattice enclosure
The 105 mm tall lattice enclosure, with a clear acrylic lid and reinforced connector islands. CAD render; physical print validation is pending.

Download the enclosure and printing instructions · Download all three GIFs

The PCB stack and acrylic lid lift out of the lattice enclosure and reassemble
The CAD assembly opens to show the PCB stack and lid.

Code, design files & full documentation →

← All projects