Stefan Antoszko's Pink Noise Generator Packs a TI MSP430 and "a Handful of Resistors and Capacitors"

Mimicking the pink noises found in nature, this soothing project was an experiment in simulation and calculation.

Gareth Halfacree
2 months ago β€’ HW101

Computer engineering student and electronic audio hobbyist Stefan Antoszko has built a "pink noise" generator, using a Texas Instruments MSP430G2231 microcontroller as a white noise source and building a three-stage filter to achieve the desired pink output.

"I used an MCU [Microcontroller Unit] as a white noise source using a 32-bit Linear Feedback Shift Register (LFSR)," I passed it into a three-stage high-shelf filter with offset frequencies to approximate a -3dB slope which is characteristic of pink noise. My main goal from this project was to learn how the values for [others'] shelf filters were chosen so I decided to derive the equations for them by hand."

To start, Antoszko had to get the TI MSP430 to generate white noise β€” choosing to use a linear feedback shift register, in which a combination of higher bits are XORed together and then pushed to the front of the register. "Since the MSP430 is a 16-bit MCU, initially I tried the 15-bit loop where you XOR the first and 15th bit and push that to the front," Antoszko notes. "However, this had a really short cycle length and I could clearly hear the sequence repeating."

Settling on a 32-bit variant with two 16-bit registers, Antoszko had a suitable source of white noise β€” but desired pink noise, also known as fractional noise and likened to the sound of a waterfall. To get that required filtering the microcontroller's output, using "a handful of resistors and capacitors."

For the experience, Antoszko calculated what each stage required by hand β€” taking into account how each prior stage has already affected the signal β€” and came up with a three-stage filter using five resistors and five capacitors.

"[The MSP430] is well suited for this application because I only need one shift register, one output pin, and a 1MHz clock is more than sufficient," Antoszko concludes. "Additionally, it operates at a low Vcc voltage [of] <3.3V which comes in handy if I want plug the final signal right into Line In."

The full project write-up is available on Antoszko's Hackaday.io page.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles