Back to timeline
school Dec 2025

From noise to tone

Generate white noise digitally on an FPGA, then band-pass it sharply enough in the analog domain that the output sounds like a tone instead of a hiss. Digital side: a Linear Feedback Shift Register on a Lattice ICE40HX1K. Analog side: a Delyiannis-Friend active band-pass on a soldered veroboard.

The noise generator

A Linear Feedback Shift Register (LFSR) is a shift register whose input is an XOR of a few selected taps. If the taps are chosen by a primitive polynomial, the register produces a maximum-length pseudo-random sequence of length 2L − 1 before repeating. This is a so-called m-sequence, whose autocorrelation properties make it look like white noise on the relevant time scale.

Built in IceStudio with a button on the dev board feeding the reset line, so a button-press kicks the register out of any all-zeros lock-up state. The FPGA output is a 3.3 V pulse stream, effectively a 1-bit DAC, passed through a passive RC lowpass to take the worst of the switching edges off.

IceStudio block diagram of the LFSR: a clock and prescaler on the left, four parallel rows of shift-register stages making up a 31-bit register, with the tap signals XORed together and fed back into the input. The reset 'stoy' signal comes off a button and an LED.
The LFSR in IceStudio. 31 bits, XOR-fed, with a button-driven reset.
Spectrum analyser plot from 0 to 2000 Hz. A wide scatter of points sits roughly flat around −20 dB across the whole range. Visually 'white' noise.
FFT of the raw FPGA output. Flat-ish across the audio band. Looks like white noise, sounds like a hiss.

The Delyiannis-Friend filter

A single-op-amp active band-pass topology that gets high Q with a small component count. Design centre f₀ = 920 Hz, Q = 12. Component-value formulas:

R₃ = 1 / (πBC)
R₁ = R₃ / (2H₀)
R₂ = R₃ / (4Q² − 2H₀)

With C = 22 nF, the ideal values worked out to R₃ ≈ 189 kΩ, R₁ ≈ 18.9 kΩ, R₂ ≈ 333 Ω. Realised as series combinations of stock resistors (120 k + 68 k, 12 k + 6.8 k).

Close-up of a black Elektra Verksted veroboard with a couple of through-hole resistors and a violet wire soldered between pads.
Veroboard, mid-assembly.
Wider view of the same Elektra Verksted veroboard with the full filter populated: series resistor pairs, capacitors, and the op-amp soldered in.
Fully populated, ready for measurement.

Measured vs designed

The Q drop is the headline failure mode. Three plausible culprits: capacitor tolerances at this frequency are 5%+ and dominate the band shape; the op-amp has finite gain-bandwidth at higher Q-factors and effectively rolls off the peak; and the breadboard / veroboard layout introduces stray capacitance and resistance in parallel with the design.

Despite the lower Q, the output FFT shows a clear spectral peak around f₀ and the listening test confirmed a recognisable tonal character. Mission accomplished, even if the bandwidth was wider than designed.

Magnitude-vs-frequency curve (Hz, log scale) for the filter, peaking at 957.99 Hz, with the −3 dB points marked at 906.74 Hz and 1051.27 Hz. The 920 Hz design target is shown as a green vertical line just left of the measured peak.
Measured filter response. Peak 958 Hz, −3 dB band 145 Hz wide → Q ≈ 6.6.
FFT of the full system output ('System utgang') from 0 to 2000 Hz. A clear amplitude bump rises around 1 kHz against the otherwise flat noise floor.
System output FFT. The band-pass has carved a tone out of the flat noise.

Writeup

Back to timeline