Bela: Real-Time BeagleBone Audio/Analog Cape

Bela is a cape for the BeagleBone Black that’s aimed at artists and musicians. Actually, the cape is much less than half of the story — the rest is in some clever software and a real-time Linux distribution. But we’re getting ahead of ourselves. Let’s talk hardware first.

First off, the cape has stereo input and output as well as two amplified speaker outs. It can do all of your audio stuff. It also has two banks of analogue inputs and outputs, each capable of handling eight signals. In our opinion, this is where the Bela is cool. In particular, the analog outputs are not Arduino-style “analog outputs” where it’s actually a digital output on which you can do PWM to fake an analog signal. These are eight 16-bit outputs from an AD5668 DAC which means that you can use the voltages directly, without filtering.

Then there’s the real trick. All of these input and output peripherals are hooked up to the BeagleBone’s Programmable Realtime Units (PRUs) — a hardware subsystem that’s independent of the CPU but can work along with it. The PRU is interfaced with the real-time Linux core to give you sub-microsecond response in your application. This is a big deal because a lot of other audio-processing systems have latencies that get into the tens of milliseconds or worse, where it starts to be perceptible as a slight lag by humans.

The downside of this custom analog and audio I/O is that it’s not yet supported by kernel drivers, and you’ll need to use their “Heavy Audio Tools” which compiles Pd programs into C code, which can then drive the PRUs. Of course, you can write directly for the PRUs yourself as well. If you just want to play MP3s, get something you have a bunch of simpler, better options. If you need to do responsive real-time audio installations, Bela is a way to go.

The project is open-source, but we had to do a bunch of digging to find what we were looking for. The hardware is in zip files here, and you’ll find the software here. The demo projects look/sound pretty cool and their Kickstarter is long over-funded, so we’re interested to see what folks make with these.

Stealing 3D Prints By Sound

In the open hardware world, we like to share 3D design files so that our friends and (global) neighbors can use and improve them. But we’ve all printed things from time to time that we’d like to keep secret. At least this is the premise behind this article in Science which proposes a novel method of 3D-printer-based industrial espionage: by recording the sound of the stepper motors and re-creating the toolpath.

Unfortunately, the article is behind a paywall so we’re short on the details, but everyone who’s played the Imperial March on their steppers has probably got the basic outline in their mind. Detecting the audio peak corresponding to a step pulse should be fairly easy. Disentangling the motions of two axes would be a bit harder, but presumably can be done based on different room-acoustic filtering of the two motors. Direction is the biggest question mark for us, but a stepper probably has a slightly audible glitch when reversing. Keeping track of these reversals could do the trick.

What do you think? Anyone know how they did it? Does someone with access to the full article want to write us up a summary in the comments?

[Thanks LVfire via Ars Technica]

[Edit: We were sent a copy of the full article (thanks [PersonUnknown]!) and it doesn’t explain any technical details at all. Save yourself the effort, and have fun speculating, because reading the article won’t help.]

Audio Out Over UART

There’s a reason that the bog-standard serial port will never die. It’s just so robust and simple. When you need a console that will absolutely work with minimal software and hardware, UART is the way to go. Because of this, UART hacks abound. Here’s a new one to us, and a challenge to our readers.

[Tiziano Bacocco] decided to use UART signals as a type of PWM to create audio. That’s right, he’s plugging the serial TX line straight into a speaker. This gives you eight possible PWM output voltage levels. The trick is using some Python code (using the awesome pyserial module) to down-quantize the audio data to fit these eight possible values and then push them out at the correct sampling rate. ffmpeg is used to pre-process the files.

Continue reading “Audio Out Over UART”

Put Words in Your Dog’s Mouth With A Talking Dog Collar

It’s just a little past Halloween, but Adafruit’s talking dog collar, modeled after the movie Up, is still a nice fusion between crafting and hacking.

One reason that Adafruit is so popular is that every time they sell us something, they give us some of the worlds best tutorials and libraries for free. For this project they’re using their Bluetooth LE board and their Audio FX board with a few more mundane vitamins to construct the collar. We’re sure the enterprising hacker could find alternatives if they so choose.

The collar is made of leather and 3D printed props. They went with alkaline batteries rather than lithium, to keep their doggy companion a little safer. All the electronics are hidden under the various props and the wiring is routed behind the belt. To control the app, the different sound bytes are mapped to buttons on their Bluetooth-to-serial phone app.

It’s a good starter tutorial, and the concept applied differently would definitely be good for at least one good prank on a coworker or friend.


EP Composes a New Chiptune Each Time

[Captain Credible] is a chiptune music artist. He wanted to release an EP, but a regular old em-pee-three was too lame for him, so he made a tiny board with a coin cell, an ATtiny85, and a 3.5mm socket on it.

Rather than just writing some code to generate the tones for a pre-composed song, his “Dead Cats” EP generates the music itself. Using the arduino-tiny library, which adds the tone() function to the ATtiny, he has the chip pick its own time signature, key, subdivisions, and tempo. The melody and drum beat is randomly generated into an array. In addition to that, there are some code “one-liners” which insert unique sounds. After that the code just loops through the music.

If you don’t like the song, simply unplug the audio cable and plug it back in. The 3.5mm jack he chose has a built-in micro-switch, so the board is only powered up if someone is listening. If you’d like to see the circuit diagram, purchase the EP, or take a look at the code, all of that is available on his site.

A Pi Powered Recording Studio

In the mid-90s, you recorded your band’s demo on a Tascam cassette tape deck. These surprisingly cheap four-track portable studios were just low tech enough to lend an air of authenticity to a band that calls itself, ‘something like Pearl Jam, but with a piano’. These tape decks disappeared a decade later, just like your dreams of being a rock star, replaced with portable digital recording studios.

The Raspberry Pi exists, the Linux audio stack is in much better shape than it was ten years ago, and now it’s possible to build your own standalone recording studio. That’s exactly what [Daniel] is doing for our Raspberry Pi Zero contest, and somewhat predictably he’s calling it the piStudio.

Although the technology has moved from cassette tapes to CompactFlash cards to hard drives, the design of these four-track mini recording studios hasn’t really changed since their introduction in the 1980s. There are four channels, each with a fader, balance, EQ, and a line in and XLR jack. There are master controls, a few VU meters, and if the technology is digital, a pair of MIDI jacks. Since [Daniel] is using a Raspberry Pi for this project, he threw in an LCD for a great user interface.

As with all digital recorders, the money is in the analog to digital converters. [Daniel] is using a 24-bit, 216kHz, four-channel chip, Texas Instruments’ PCM4204. That’s more than enough to confuse the ears of an audiophile, although that much data will require a hard drive. Good thing there will be SATA.

Although you can buy an eight-channel solid state recorder for a few hundred dollars – and [Daniel] will assuredly put more than that into this project, it’s a great application of a ubiquitous Linux computer for a device that’s very, very useful.


The Raspberry Pi Zero contest is presented by Hackaday and Adafruit. Prizes include Raspberry Pi Zeros from Adafruit and gift cards to The Hackaday Store!
See All the Entries || Enter Your Project Now!

Wifi Enabled Center Speaker

[Ronald] has been improving his audio set-up for a while now, his latest revision culminating in this WiFi enabled center channel speaker. It all started with feature creep as you can see in this direct quote, “Being an engineer, I couldn’t stop here, not now that I had a way of adding more features…”

He had purchased a new amplifier for his system, but was irritated that the loudness setting would re-enable itself every time he switched inputs. First he thought he might just have a little board that intercepted the signals from his remote and tacked on the loudness off signal. It occurred to him that it would be even cooler if he could control it from his computer or phone. So he opened the case on his new amp and discovered an i2c break-out. We can guess how it went after that.

In version 2.0 he kept most of his work from 1.0, but wanted to simplify the set-up and build it all into a center speaker unit since an amplifier and two speaker cabinets takes up too much room. He fit a similar set-up as before in the center speaker casing, but added a touch screen and a few other improvements.  Though, strangely, he ran into some problems upgrading to the Raspberry Pi 2.0 and had to revert.

The final result is very nice, though obviously not done. As the engineer’s mantra goes, “If it ain’t broke, it doesn’t have enough features yet.”