The STM32 Makes For A Cheap DIY USB Soundcard

Soundcards used to be giant long 8-bit ISA things that would take up a huge amount of real estate inside a desktop computer. These days, for most of us, they’re baked into the motherboard and we barely give them a second thought. [Samsonov Dima] decided to whip up a cheap little sound card of their own, however, built around the STM32.

The soundcard is based specifically on the STM32F401. readily available on the “Green Pill” devboards. A digital-to-analog converter is implemented on the board based on two PWM timers providing high-quality output. There’s also a simulated software sigma delta ADC implemented between the audio streaming in via USB and the actual PWM output, with some fancy tricks used to improve the sound output. [Samsonov] even found time to add a display with twin VU meters that shows the audio pumping through the left and right channels.

Without test gear on hand, we can’t readily quantify the performance of the sound card. However, as per the Youtube videos posted, it appears more than capable of recreating music with good fidelity and plenty of fine detail.

If you need a cheap, simple USB sound card that you can hack away on, this might be the one for you. If you need something more suitable for a vintage PC, however, consider this instead. Video after the break.

Continue reading “The STM32 Makes For A Cheap DIY USB Soundcard”

Retro Gaming With Retro Joysticks

One of the biggest reasons for playing older video games on original hardware is that emulators and modern controllers can’t replicate the exact feel of how those games would have been originally experienced. This is true of old PC games as well, so if you want to use your original Sidewinder steering wheel or antique Logitech joystick, you’ll need something like [Necroware]’s GamePort adapter to get them to communicate with modern hardware.

In a time before USB was the standard, the way to connect controllers to PCs was through the GamePort, typically found on the sound card. This has long since disappeared from modern controllers, so the USB interface [Necroware] built relies on an Arduino to do the translating. Specifically, the adapter is designed as a generic adapter for several different analog joysticks, and a series of DIP switches on the adapter select the appropriate mode. Check it out in the video after the break. The adapter is also capable of automatically calibrating the joysticks, which is necessary as the passive components in the controllers often don’t behave the same way now as they did when they were new.

Plenty of us have joysticks and steering wheels from this era stored away somewhere, so if you want to experience Flight Simulator 5.0 like it would have been experienced in 1993, all it takes is an Arduino. And, if you want to run these programs on bare metal rather than in an emulator, it is actually possible to build a new Intel 486 gaming PC, which operates almost exactly like a PC from the 90s would have.

Continue reading “Retro Gaming With Retro Joysticks”

Spice With A Sound Card

In years gone by, trying out a new circuit probably would have meant heating up a soldering iron. Solderless breadboards have made that even easier and computer simulation is easier still, but there’s something not quite as satisfying about building a circuit virtually. [Thedeuluiz] has a way to get some of the best of both worlds with the RTSpice project.

The idea is simple in concept, although not as simple in execution. The program does a Spice-like simulation of a circuit and can accept input and produce output from a PC’s sound card. Obviously, that means you can’t simulate RF circuits — at least not at the input and the output. It also means the simulation has to run lightning fast to keep up with the sound card sample rate. According to the author, it works best with modest circuits but exactly how big you can go will depend on your hardware.

Continue reading “Spice With A Sound Card”

Sniffing RFID Readers With A Piece Of Paper

We feature plenty of printed projects here on Hackaday, though they tend to be of the three dimensional type thanks to the proliferation of affordable 3D printers. But in this case, [Milosch Meriac] has managed to put together a printable design that’s not only a very cool hack, but is made up of a scant two dimensions. His creation, which could perhaps be considered something of an interactive circuit diagram, allows anyone with a paper printer and a few passive components to make a functional low-frequency RFID sniffer.

[Milosch] tells us the goal of the project is to lower the barrier for experimenting with the RFID technology that’s increasingly part of our everyday lives. Rather than having to use something expensive and complicated such as an oscilloscope, experimenters can simply plug their DIY RFID sniffer into their computer’s line-in jack and explore the produced waveform with open source tools.

To create a paper RFID sniffer, you start by printing the image out on a thick piece of paper, like card stock. You then apply foil tape where indicated to serve as traces in this makeshift PCB, and start soldering on the components as described in the text. [Milosch] says the assembly procedure is so simple even a kid can do it, and the total cost of each assembled sniffer is literally pennies; making this an excellent project for schools or really any large group.

If you want to play it safe the sniffer can be connected to a USB sound card rather than your machine’s primary sound hardware, and still come in dirt cheap. [Milosch] stops short of explaining the software side of things in this particular project, but any tool which can use input from the sound card as a makeshift oscilloscope should be a good start.

In the past we’ve seen [Milosch] perform low frequency RFID sniffing through the sound card with the powerful baudline tool, but if you want a little more capable hardware, we can point you in the right direction.

Vaporwave For The Parallel Port

FM synthesis is the sound of the 1980s, it’s the sound of shopping malls and Macintosh Plus. It’s the sound of the Motorola DynaTAC, busts of Helios, and the sound of vaporwave サ閲ユ. The chips most responsible for this sound is the OPL2 and OPL3, tiny little FM synthesizers on a chip, produced by Yamaha, and the core of the AdLib and Sound Blaster sound cards. It’s the chip behind the music in all those great DOS games.

Unfortunately, computers don’t have ISA slots anymore, and cards don’t work in 486 and Pentium-based laptops, the latest hotness for retrocomputing enthusiasts. For his Hackaday Prize entry, [serdef] is bringing the sound of the 80s to the parallel port with the OPL2LPT. It’s a sound card for the parallel port that isn’t just a resistor DAC like the Covox Speech Thing.

The design of the OPL2LPT is pretty much what you would expect; it’s an OPL2 chip, opamp, a 1/8″ jack, and a few passive components. The real trick here is in the driver; by default, every DOS game around expects an Adlib card on port 338h, whereas the parallel post is at 378h. A driver takes care of this in software, but it is possible to patch a game to change every write to an Adlib card to a write to a parallel port.

Already, [serdef]’s parallel port graphics card is a real, working product and has caught the attention of Lazy Game Reviews and the 8-Bit-Guy, you can check out those video reviews below.

Continue reading “Vaporwave For The Parallel Port”

Fixing Linux Audio One Chipset At A Time

Linux audio may be confusing for the uninitiated. As a system that has evolved and spawned at least two independent branches over time it tends to produce results that surprise or irritate the user. On the other hand it is open source software and thus can be fixed if you know what you do.

Over at reddit [rener2] was annoyed by the fact that listening to music on his laptop was a significantly worse experience under Linux than under Windows. Running Windows the output of  the headphone jack covered the whole spectrum while his Linux set up cut off the low end resulting in a tinny sound. The culprit in this is the sound card: it has two different output paths for the internal speakers and the headphone jack. The signal for the internal speakers is routed through a high pass filter to spare them the embarrassment of failure to reproduce low frequencies.

When headphones are plugged in, the sound card driver is supposed to make the sound card bypass the filter and deliver the full spectrum. The authors of the Windows driver knew this and had it taken care of. In his video [rener2] runs us through the process of patching the ALSA driver while referencing the documentation of a sound card that he deems ‘similar enough’ to his Realtek ALC288.

Continue reading “Fixing Linux Audio One Chipset At A Time”

Detecting Mobile Phone Transmissions With A Sound Card

Anyone who had a cheap set of computer speakers in the early 2000s has heard it – the rhythmic dit-da-dit-dit of a GSM phone pinging a cell tower once an hour or so. [153armstrong] has a write up on how to capture this on your computer. 

It’s incredibly simple to do – simply plug in a set of headphone to the sound card’s microphone jack, leave a mobile phone nearby, hit record, and wait. The headphone wire acts as an antenna, and when the phone transmits, it induces a current in the wire, which is picked up by the soundcard.

[153armstrong] notes that their setup only seems to pick up signals from 2G phones, likely using GSM. It doesn’t seem to pick up anything from 3G or 4G phones. We’d wager this is due to the difference in the way different cellular technologies transmit – let us know what you think in the comments.

This system is useful as a way to detect a transmitting phone at close range, however due to the limited bandwidth of a computer soundcard, it is in no way capable of actually decoding the transmissions. As far as other experiments go, why not use your soundcard to detect lightning?