Generating Stereo FM Signals, Thanks To Python

A casual understanding of how AM radio works is pretty easy to come by, and standard FM is only a little more complicated. Things can go off the tracks a bit with stereo FM, though — figuring out how they squeeze two separate audio tracks onto one radio signal is a bit of a head-scratcher. In that case, wrapping your head around the concept might be helped by mocking up a stereo FM signal with an arbitrary waveform generator and a little bit of Python.

Not that [Sebastian] of Baltic Lab was unfamiliar with multiplex FM theory, mind you. As he explains it, his goal was to generate a valid stereo FM signal with a different pure tone on each channel, 700 Hz on the left and 2,200 Hz on the right. Luckily, [Sebastian] has a nice AWG, the Siglent SDG1032X, which has an Ethernet connection that can be used to control it remotely along with PyVISA, a Python package for controlling instruments using the Virtual Instrument Software Architecture protocol.

The meat of this project, and what really helps drive home the concept of putting multiple audio signals onto an FM signal, lies in the Python code that generates the component parts. [Sebastian] does a great job explaining how he programatically generates the sum and difference signals along with the 19 kHz pilot tone, and puts them all together into one waveform. The output of the program is used to generate a series of values that are sent to the arbitrary waveform generator, which outputs the desired FM signal. Looking at the output on a spectrum analyzer, the two audio tones are clearly visible, as are the attenuated pilot tone and some other spikes a little further up.

Just add an antenna to the setup and you’d have the world’s dullest FM radio station — but at least it’d be in stereo. Or if you want to check out the origin story for FM radio, we’ve got something for that too.

Know Audio: Stereo

In our occasional series charting audio and Hi-Fi technology we have passed at a technical level the main components of a home audio set-up. In our last outing when we looked at cabling we left you with a promise of covering instrumentation, but now it’s time instead for a short digression into another topic: stereo. It’s a word so tied-in with Hi-Fi that “a stereo” is an alternative word for almost any music system, but what does it really mean? What makes a stereo recording, and how does it arrive at your ears?

From West London Trains, To 3D Audio

A steam train passing through a station, from a distance in black and white
The driver of this Great Western Railway train had no idea that he was making audio history.

As most of you will know, a mono recording uses a single microphone and a single channel while a stereo one uses two microphones recording simultaneously a left and right channel. These are then played back through a pair of speakers, and the result is a sense of spatial field for the listener. Instruments appear to come from their relative positions when recorded, and the sense of being in the performance is enhanced.

Stereo recording as we know it was first perfected as one of the many inventions credited to Alan Blumlein, then working for EMI in London. We have one of his stereo demonstration films in “Trains at Hayes“, filmed from the EMI laboratories overlooking the Great Western Railway, and featuring a series of steam-hauled trains crossing the field of view with a corresponding stereo sound field. His work laid down the fundamentals of stereo recording, including microphone configurations and what would become the standard for stereo audio recording on disk with the channels on the opposite sides of a 45 degree groove. Continue reading “Know Audio: Stereo”

Teensy Spectrum Analyzer Has 170 Channels

While high-fidelity audio has come a long way in the past several decades, a lot of modern stereo equipment is still missing out on some of the old analog meters that were common on amplifiers and receivers of the 60s through the 80s. Things like VU meters don’t tend to be common anymore, but it is possible to build them back in to your sound system with the help of some microcontrollers. [Mark] shows us exactly how to reclaim some of the old-school functionality with this twin audio visualizer display.

Not only does this build include two displays, but the microcontroller is keeping up with 170 channels in real-time in order to drive the display. What’s more impressive is that it’s being done all on a Teensy 4.1. To help manage all of the data and keep the speed as fast as possible it uses external RAM soldered to the board, and a second Teensy audio board is used to do the real time FFT analysis. Most of the channels are sent to the display hosting the spectrum analyzer but two are reserved for left and right stereo VU meters on the second display.

The project from [Mark] is originally based on this software from [DIYLAB] so everything is open-source. While it was originally built for a specific piece of hardware, [Mark] has it set up with a line in and line out plus a microphone input so it can be used for virtually any audio hardware now. For another take on the classic VU meter, take a look at this design based on an Arudino instead.

Continue reading “Teensy Spectrum Analyzer Has 170 Channels”

Modern Features In Classic Radio

As consumer electronics companies chase profits on tighter and tighter margins, it seems like quality is continually harder to find for most average consumer-grade products. Luckily, we don’t have to hunt through product reviews to find well-built merchandise since we have the benefit of survivorship bias to help us identify quality products from the past that have already withstood the test of time. [Tom] has forever been fond of this particular Sony TV/radio combo from the ’70s so he finally found one and set about modernizing it in a few key ways.

Among the modifications to this 1978 Sony FX-300 include the addition of a modern color display, Bluetooth, an upgraded FM radio, and a microphone. At the center of all of this new hardware is a Teensy 4 which [Tom] has found to be quite powerful and has enough capabilities to process the audio that’s being played in order to make visual representations of the sound on the screen. He also implemented a bitcrusher filter and integrated it into the controls on the original hardware. He’s using an optimized version of this library to cram all of that processing ability into such a small chip, and the integration of all this new hardware is so polished that it looks like it could be an original Sony stereo from the modern era.

While some may complain about restomod-type builds like this, we don’t really see any need to be arbitrarily or absolutely faithful to bygone eras even if the original hardware was working properly in the first place. What works is taking the proven technology of the past and augmenting it with modern features to enjoy the best of both worlds. Much like this hi-fi stereo which blends the styles and technology of the 90s with that of the 60s in an equally impressive way.

Binaural Hearing Modeled With An Arduino

You don’t have two ears by accident. [Stoppi] has a great post about this, along with a video you can see below. (The text is in German, but that’s what translation is for.) The point to having two ears is that you receive audio information from slightly different angles and distances in each ear and your amazing brain can deduce a lot of spatial information from that data.

For the Arduino demonstration, cheap microphone boards take the place of your ears. A servo motor points to the direction of sound. This would be a good gimmick for a Halloween prop or a noise-sensitive security camera.

Continue reading “Binaural Hearing Modeled With An Arduino”

Stereo Recording Made Easy With A 3D-Printed Mount

When making a recording it can be surprisingly difficult to capture a good stereo image. A well-known technique is the ORTF microphone arrangement in which two cardoid microphones sit at 110 degrees to each other and 17cm apart, and thus pick up a readily reproducible stereo separation. It’s something that we’ve been known to do in our student days with a pair of Shure SM58s and a stack of Post Office elastic bands, but [marsairforce] has done a much nicer job with a very neat 3D-printed microphone clip.

Designed in OpenSCAD, the first iteration printed on a resin printer proved to be too brittle for the task, so a second version was printed on an FDM machine. This incorporated significant strengthening, as well as a screw mount for a microphone stand. The result is an extremely useful and cheap addition to any recording set-up, and anyone who has wrestled with achieving a good stereo image will appreciate it. You can see some of what went into it in the video below the break.

If this is your field of interest, you might also wish to look at a binaural microphone.

Continue reading “Stereo Recording Made Easy With A 3D-Printed Mount”

Motorized Magic Over HDMI

There is a certain warmth that seems to emanate from stereo receivers of the 70s, 80s, and 90s. Despite their large footprint and considerable heft, the soft glow of the indicator lights and solid kerthunk of switches provide a sense of coziness. When [Tom] recently swapped his receiver for a 1970s Pioneer SX-950, he found himself getting up from the couch to adjust the volume when watching TV far too often for his liking. Resolving to do something about it, he added some magic in the form of a motorized volume knob. One of the coolest tricks for stereos was to have a small motor attached to the volume knob so that it could turn the volume up or down via a remote.

The first obstacle came when [Tom] had to forgo the center tap on the potentiometer to get a motorized one. This meant the volume compensation feature would be disabled, which is but a small price to pay for convenience. After scouring the internet, he finally had the part in hand only to discover some troublesome capacitors in the way. The new pot had a rather large motor hanging off the back that the previous one didn’t have. Fortunately, there was a good bit of space between the PCB and the bottom of the chassis, so Tom was able to just flip the capacitors to the underside of the board and bend them on their sides.

The next problem to solve was how to change the volume remotely. IR was considered as well as optical cable control signals. What [Tom] did instead was to implement HDMI CEC (consumer electronics control). CEC was well documented and seemed simple to implement on an ATTINY4313 with the help of a half-H driver. The CEC protocol implemented by [Tom’s] TV seemed to be very sensitive to timing, so an external crystal was used to get more precise timing and additional handshaking was implemented to get the TV to accept the microcontroller as valid. A few fail-safes were added to make sure the motor didn’t burn out if something went wrong with the CEC protocol and a nice enclosure wrapped up the build quite nicely.

We’ve seen CEC implemented before on a PIC 18F87J50, but as a sender of CEC commands not a receiver. [Tom’s] code is available on GitHub and might prove useful if you’re looking to implement CEC on an AVR.

Thanks [Tom] for sending this one in!