Audio test
Pink noise generator circuit: what pink means, a three-branch filter and a TL072 build
By Bulan Sarkar, founder of ElectronicsInfoline (since 2000) · About a 12-minute read
Pink noise is the hiss audio people use to test speakers and rooms, because it sounds even to the ear and reads flat on an octave-band analyser. You make it by filtering white noise, and most of the work is in the filter.
This page explains what "pink" means in numbers, then builds a generator on one TL072: a transistor junction as the noise source, a gain stage, and a three-branch filter that holds the pink slope to within ±0.55 dB from 20 Hz to 20 kHz.
A pink noise generator is a white noise source followed by a filter whose output falls by 3 dB per octave, or 10 dB per decade. White noise has equal power in every hertz; pink noise has equal power in every octave, so each octave band of an analyser shows the same level (Analog Devices).
A cheap build uses the reverse-biased base-emitter junction of a 2N3904 as the source, a TL072 stage with a gain of 48, and a 10 kΩ resistor feeding three series R-C branches to ground. With E12 values that network stays within ±0.55 dB of a true pink slope across 20 Hz to 20 kHz.
What pink means
Noise is described by how its power is spread over frequency. White noise has the same power in every hertz: the band from 1,000 to 1,100 Hz holds as much as the band from 10,000 to 10,100 Hz. Plot its power per hertz against frequency and you get a flat line (Analog Devices).
Pink noise has a power per hertz that falls as 1/f. Double the frequency and the power per hertz halves, which is −3.01 dB per octave; ten times the frequency gives a tenth, −10 dB per decade. On a log-frequency plot that is a straight line sloping down. The name is borrowed from light: white light tilted towards the red end looks pink.
Our take: start from white noise, because that is what random sources give you, and add the tilt with a filter. Every pink noise generator on this page works that way.
Why audio uses it: equal power per octave
An octave-band or third-octave analyser, the kind built into room-tuning apps, splits the audio range into bands whose width grows with frequency. Under IEC 61260-1 each octave band is 100.3, very nearly 2, times as wide as the one below, from the 31.5 Hz band (22.4 to 44.7 Hz) up to the 16 kHz band (11.2 to 22.4 kHz) (IEC 61260-1:2014).
Feed white noise into it and each band is twice as wide as the last, so it collects twice the power: the display climbs 3 dB per band, 27 dB from the bottom band to the top. Feed pink noise in and the falling density exactly cancels the widening bands. Every band reads the same, so a flat display means a flat system and any bump is the speaker or the room.
It also tells you what level to expect per band. The audio band is 9.97 octaves wide, so across the ten octave bands of pink noise each one carries a tenth of the total power and reads 10 dB below the overall level. Across the 30 third-octave bands each reads 14.8 dB below it.
A white source: the reversed transistor junction
Any reverse-biased PN junction pushed into breakdown produces noise: the current through it arrives in tiny avalanches instead of a smooth flow. The cheapest way to get that is the base-emitter junction of an ordinary small-signal NPN. Connect the emitter to the positive supply through a resistor, the base to ground, and leave the collector open.
Nexperia rates the 2N3904's emitter-base junction (in its SOT-23 version, the PMBT3904) to 6 V reverse, with under 50 nA leaking at that voltage (Nexperia). Above that it breaks down, at a voltage the datasheet does not give and with a noise level it does not give either. This is the weak point of the source: two transistors from the same bag can differ several times in output. The build allows for it with a level control, and the gain section below says what to change if a part is unusually loud.
Since the junction blocks at least 6 V, a 100 kΩ resistor from 12 V limits its current to 60 µA at most. Running a junction in breakdown beyond its rating can lower that transistor's gain over time, so give it this one job and do not reuse it elsewhere.
The pink filter: three branches, within half a decibel
No single resistor and capacitor gives −10 dB per decade. One RC pole gives −20 dB per decade, twice too steep. The standard trick is to alternate: a pole that starts the gain falling at −20 dB per decade, then a zero that stops it, then another pole. If the poles and zeros are spaced evenly on a log scale, the gain spends half of each decade falling and half flat, and averages −10 dB per decade with a small ripple.
Here a 10 kΩ series resistor feeds three branches to ground, each a resistor in series with a capacitor. At low frequency the capacitors block and the signal passes at full level. As frequency rises each branch in turn starts to conduct, pulling the output down, until its own resistor stops it; the zeros sit at 60.5 Hz, 884 Hz, 15.4 kHz, where each branch's capacitor reactance equals its resistor.
We fitted the six values to a true −10 dB per decade line over 20 Hz to 20 kHz, rounded each to the nearest E12 value, and then recomputed the response of the rounded parts. The filter is −3.0 dB at 20 Hz, −20.4 dB at 1 kHz and −33.2 dB at 20 kHz, and never strays more than ±0.55 dB from the ideal line in between.
| Frequency | Gain | Ideal pink | Error |
|---|---|---|---|
| 20 Hz | −3.01 dB | −2.97 dB | −0.05 dB |
| 50 Hz | −7.25 dB | −6.95 dB | −0.30 dB |
| 100 Hz | −9.96 dB | −9.96 dB | +0.00 dB |
| 200 Hz | −12.45 dB | −12.97 dB | +0.52 dB |
| 500 Hz | −17.07 dB | −16.95 dB | −0.12 dB |
| 1 kHz | −20.42 dB | −19.96 dB | −0.46 dB |
| 2 kHz | −22.80 dB | −22.97 dB | +0.17 dB |
| 5 kHz | −26.54 dB | −26.95 dB | +0.41 dB |
| 10 kHz | −30.27 dB | −29.96 dB | −0.32 dB |
| 20 kHz | −33.16 dB | −32.97 dB | −0.19 dB |
Our take: half a decibel of ripple is far smaller than the peaks and dips a room adds, so the filter will not be what limits your measurement. Use 5 % film capacitors for the three branches; ceramic types with high-K dielectrics change value with voltage and temperature, and the slope goes with them.
- Pink slope
- −3 dB per octave
- Filter error, 20 Hz–20 kHz
- ±0.55 dB
- Gain stage
- ×48 (33.6 dB)
- Supply
- 12 V, one rail
Build it on one TL072
The generator runs from a single 12 V supply, enough to break the junction down and inside the TL072's supply range (Texas Instruments). Two 10 kΩ resistors and a 10 µF capacitor make a 6 V mid-rail that both op-amp halves sit on.
C1 (1 µF) carries the noise from Q1's emitter to U1A's non-inverting input, which R2 (100 kΩ) holds at the mid-rail. Together they pass everything above 1.6 Hz. U1A amplifies by 1 + R4/R3 = 1 + 47 kΩ/1 kΩ = 48, or 33.6 dB. C2 (22 µF) in series with R3 drops the gain to 1 at DC, so U1A's output stays at the mid-rail; it costs nothing above 7.2 Hz.
With a typical gain-bandwidth of 3 MHz (Texas Instruments), a gain of 48 leaves a 62.5 kHz bandwidth, which takes −0.42 dB off at 20 kHz. That is the dashed line in Figure 5. A TL072H, at 5.25 MHz, loses only −0.14 dB.
U1A's output drives the filter directly; an op-amp output is the low-impedance source the filter was designed for. U1B, wired as a follower, reads the filter without loading it. C4 (10 µF) blocks the mid-rail from the output, and with the 10 kΩ level pot it passes everything above 1.6 Hz.
Parts list
- U1: TL072 dual op-amp, with a 100 nF capacitor across pins 8 and 4
- Q1: 2N3904, BC547 or similar small NPN, collector left unconnected
- R1 100 kΩ, R2 100 kΩ, R3 1 kΩ, R4 47 kΩ, R5 and R6 10 kΩ, plus 1 kΩ for R1's supply filter
- RS 10 kΩ; branches 5.6 kΩ + 470 nF, 1.2 kΩ + 150 nF, 220 Ω + 47 nF (film capacitors)
- C1 1 µF film, C2 22 µF electrolytic, C4 10 µF electrolytic, 10 µF for the mid-rail, 100 µF for R1's filter
- RV1 10 kΩ log potentiometer, a 3.5 mm or RCA output jack, a 12 V DC adapter
Setting the level without clipping
Noise has no fixed peak. Its instantaneous voltage follows a bell curve around zero, and its rms value is the curve's standard deviation σ. Peaks beyond ±3σ happen 0.27 % of the time and beyond ±3.29σ only 0.10 %. So a stage that can swing ±V cleanly can carry noise of about V ÷ 3.29 rms before the peaks start clipping.
The tight spot here is U1B's input. On the original TL072 the input has to stay at least 4 V above the negative rail (Texas Instruments), which leaves ±2 V around the 6 V mid-rail. Divide by 3.29 and U1A's output should stay under about 0.6 V rms; the filter only lowers it from there. Measure it on a multimeter's AC range at U1A pin 1. If a loud transistor pushes it higher, change R4 to 22 kΩ (gain 23) or 10 kΩ (gain 11).
A digital white source: the LFSR
A linear-feedback shift register is a row of flip-flops whose input is the XOR of a few of its own bits. With the right taps it walks through every non-zero state before repeating. Xilinx's XAPP052 lists taps 31 and 28 for a 31-bit register, a sequence 2,147,483,647 states long (Xilinx (AMD)). We ran that register through all of them in software to check it.
On an Arduino UNO, Timer2 in CTC mode fires an interrupt every 40 ticks of the 16 MHz clock divided by 8, 50 kHz (Microchip), and each interrupt shifts the register once and writes the output bit to pin 8. That leaves 320 CPU cycles per bit, plenty for one shift and one XOR. At that rate the sequence repeats after 11.9 hours.
// White noise on pin 8 of an Arduino UNO: a 31-bit LFSR, taps 31 and 28,
// clocked at 50 kHz by Timer2. Feed pin 8 through 100k / 1k to C1.
volatile uint32_t lfsr = 1; // any non-zero start
ISR(TIMER2_COMPA_vect) {
uint8_t out = lfsr & 1;
lfsr >>= 1;
if (out) { lfsr ^= 0x48000000UL; PORTB |= _BV(PB0); }
else { PORTB &= ~_BV(PB0); }
}
void setup() {
DDRB |= _BV(PB0); // pin 8 as an output
noInterrupts();
TIMSK0 = 0; // stop millis(): no jitter on the bit clock
TCCR2A = _BV(WGM21); // CTC mode
TCCR2B = _BV(CS21); // 16 MHz / 8 = 2 MHz
OCR2A = 39; // 40 ticks: 50 kHz
TIMSK2 = _BV(OCIE2A);
interrupts();
}
void loop() {}A random bit stream is white only up to about half its clock. Each bit is held for a whole clock period, which shapes its spectrum as sinc²: down −0.58 dB at 10 kHz and −2.42 dB at 20 kHz with a 50 kHz clock. That is fine for room work up to 10 kHz; for a flat top octave, clock faster or add a gentle treble lift.
To use it, drop Q1 and R1 and feed pin 8 to C1 through a 100 kΩ / 1 kΩ divider. The 5 V logic swing becomes 50 mV peak to peak, and after the gain of 48 U1A swings ±1.2 V, inside the ±2 V headroom. Connect the UNO's ground to the generator's ground.
Tips and checks
- Check the mid-rail first: U1 pins 1, 3, 5 and 7 should all read close to 6 V with no signal. If pin 1 sits near a rail, C2 is in backwards or missing.
- Listen before you measure. Through headphones at a low level, pink noise is a soft rush like a waterfall; a hard, bright hiss means the filter is missing or bypassed.
- A free real-time analyser app on a phone, set to octave or third-octave bands, shows whether the output is pink: the bars should be level within a few dB.
- Hum at 50 Hz or 100 Hz on the output points to the supply. Use a regulated adapter and keep R1's 1 kΩ and 100 µF filter.
- If the output is far too quiet, try another transistor. Junction noise varies a lot from part to part, and some do not break down cleanly at 12 V.
- Start any speaker test with the amplifier volume at its lowest. Noise carries a lot of power in the bass and treble, and a tweeter can be damaged before it sounds loud.
What we'd do: build the transistor version on stripboard with film capacitors in the filter, set U1A to under 0.6 V rms with R4, and check the result on a phone analyser before using it on a room. If an Arduino is already on the bench, the LFSR source gives a repeatable signal for tests below 10 kHz.
Questions people ask
What is the difference between white and pink noise?
White noise has equal power in every hertz; pink noise has equal power in every octave. Pink noise falls by 3 dB per octave, so it has more bass and less treble and reads flat on an octave-band analyser.
Can a single RC filter make pink noise?
No. One RC pole falls at 6 dB per octave, twice the pink slope. You need several poles and zeros staggered across the band; three R-C branches hold it within ±0.55 dB over 20 Hz to 20 kHz.
Why use a transistor instead of a zener diode as the noise source?
Both work by reverse breakdown. A small NPN's base-emitter junction is cheap, always in the parts box, and breaks down at a voltage a 12 V supply can reach. Neither part has a noise level in its datasheet, so either needs a level control.
Is pink noise the same as 1/f noise?
Yes. Pink noise is the audio name for noise whose power density falls as 1/f, the same shape as the flicker noise op-amp datasheets show at low frequencies.
What level does each band show on an analyser?
With pink noise over the audio band, each octave band reads about 10 dB below the overall level and each third-octave band about 14.8 dB below it.
Lessons behind the numbers
- Noise basicsThermal, shot and flicker noise, and how each is spread over frequency.
- The decibelWhy halving the power is −3 dB and a tenth is −10 dB.
- Low-pass filtersThe single RC pole and its −20 dB per decade slope.
- Cutoff frequencyWhere 1/(2πRC) comes from, used for every corner on this page.
- Non-inverting amplifierThe 1 + R4/R3 gain of U1A.
- Op-amp limitationsGain-bandwidth, and why a gain of 48 droops at 20 kHz.
- Zener diodeReverse breakdown, the effect the noise source relies on.
- Resistor noiseThe other white noise in every circuit, and how small it is.
- Spectrum analyserHow to see the slope you built.
- How a frequency counter worksAnother test instrument built on the same bench, with an Arduino UNO.
Sources and assumptions
- Analog Devices, MT-048 tutorial, Op Amp Noise Relationships: 1/f Noise, RMS Noise, and Equivalent Noise Bandwidth (Rev. 0, 10/08) (white noise has equal power per hertz; 1/f (pink) noise has a power density falling as 1/f, so equal power in each decade or octave, and its amplitude density falls 3 dB per octave)
- IEC 61260-1:2014, Electroacoustics – Octave-band and fractional-octave-band filters – Part 1: Specifications (base-ten octave ratio G = 10^(3/10); exact mid-band frequencies 1000 · G^x Hz, nominal 31.5 Hz to 16 kHz; band edges at mid-band · G^(±1/2))
- Nexperia, PMBT3904 NPN switching transistor (SOT-23 2N3904), product data sheet v.4 (16 February 2024), pp. 2–3 (VEBO (emitter-base, open collector) 6 V max; IEBO 50 nA max at VEB = 6 V; no breakdown voltage or noise figure is specified for the reverse-biased junction)
- Texas Instruments, TL07xx low-noise FET-input op amps, data sheet SLOS080W (revised July 2025), §5.3 and electrical characteristics (supply 10–30 V (NS/PS packages, M grade) or 4.5–40 V (other devices); input range down to (VCC−) + 4 V on the older devices; gain-bandwidth 3 MHz typ (TL072), 5.25 MHz (TL072H); 37 nV/√Hz at 1 kHz)
- Xilinx (AMD), XAPP052, Efficient Shift Registers, LFSR Counters, and Long Pseudo-Random Sequence Generators, P. Alfke (v1.1, 7 July 1996), Table 3 (taps for a maximum-length 31-bit LFSR: 31 and 28, giving a sequence of 2^31 − 1 states before it repeats)
- Microchip, ATmega48A/PA/88A/PA/168A/PA/328/P data sheet, DS40002061B (2020), §22 8-bit Timer/Counter2, CTC mode (in CTC mode the compare-match interrupt fires every (1 + OCR2A) prescaled clocks; prescaler 8 on a 16 MHz clock gives 2 MHz)
Read on 9 October 2026. Our own choices, not taken from any source: the transistor source with R1 = 100 kΩ, the 12 V single supply and 6 V mid-rail, the gain of 48, the pink filter values (a least-squares fit to −10 dB per decade from 20 Hz to 20 kHz, rounded to E12 and rechecked), the 0.6 V rms limit from a 3.29σ crest factor, the 50 kHz LFSR clock and the 100 kΩ / 1 kΩ divider. Filter errors are for ideal parts; 5 % capacitors move the corners by up to 5 %. The TL072 roll-off uses the typical 3 MHz gain-bandwidth as a single pole.