Real-Time Audio For The PocketBeagle

The BeagleBone has long been a favorite for real-time I/O, and now with the release of the PocketBone — the tiny key fob-sized BeagleBone — there are ever increasing uses for this tiny little programmable real-time Linux module. The Bela Mini, just released, is the latest add-on cape to take advantage of the processing power of the micro-sized PocketBone.

The Bela Mini is a shrinkification of the original Bela, a cape add-on for the BeagleBone. The original breaks out eight analog inputs and eight analog outputs, both sixteen-bits deep. With the addition of powered speaker outputs, the Bela turns the BeagleBone into the perfect tiny audio-Linux-thing, with a special emphasis on Pure Data and other audio wizardry.

The Bela Mini does away with the powered speaker outputs, and instead replaces those ports with stereo audio in and stereo audio out on a three-pin connector. Compared to the original Bela, the Mini loses the eight sixteen-bit analog outputs, but still keeps the analog inputs.

There have been many attempts to add real-time audio to microcontrollers and Linux boards, but few examples have lived up to the hype. Most of the time, this comes down to the choice of microcontroller or module; an ATmega-based Arduino doesn’t have real analog outputs and instead relies on PWMing a digital signal. A Raspberry Pi-based Pure Data box does not have a real-time I/O. This is where the choice of the PocketBone shows its strength. The PocketBone uses the same chip as the BeagleBone, and with that comes the Programmable Real-Time Units (PRUs). This enables the Bela to interface with signals with a dedicated controller in real-time. It’s exactly what you want for audio applications.

11 thoughts on “Real-Time Audio For The PocketBeagle

  1. It’s (conceptually) exactly what you want for audio applications but also many other applications as well. Still, not quite the same as a MEGA in terms of actual pins. Is there some kind of hybrid real time but also high I/O but also actually Linux running hardware boards out there that isn’t something like $200 per board and otherwise closed source?

    Sort of like this but more of a Raspberry crossed with a MEGA to make a PiMEGA type hardware?

    Maybe some kind of general purpose Linux that also supported and included a real time hardware module for actual I/O but that was built in and did not require workarounds?

    1. You just described the Beaglebone.

      It’s basically a 1Ghz Linux box (soft real-time) tied to two 200Mhz Teensy-ish (hard real-time) microcontrollers, in memory. You actually have more and much faster I/O with a Beaglebone than with a Mega, but the Pocketbeagle just doesn’t have the room to bring them all out.

      As for the ‘real time hardware module’, what you described is included in Debian as ‘overlays’ and the images have about 100 of them ready to load.

      1. What kind of practical downsides do the Debian overlays bring? Are they pseudo real time?

        1Ghz is at least decent speed and the BB is sort of getting close. As is typical, the smaller versions tend to restrict I/O. The BB feels close but not quite right just yet.

        BEAGLEBOARDX15 is $259.99 MSRP though as well.

        Are there any low cost but also hybrid Linux and actual real time but also has a decent amount of I/O as well boards out there, preferably in a small form factor? Teensy like would be fantastic.

        1. There was such an XMOS board, their startKIT, but unfortunately it has been discontinued.

          Some of their processors contain flash memory, USB PHYs, and Ethernet PHYs. Since they are hard realtime, *software* is sufficient for capturing such traffic at the same time as your “interesting” processing is occurring.

          I have considered creating a tiny board with one of their 4000MIPS *hard* realtime processors. The hardware would be simple, but I haven’t investigated whether or not their USB comms/debug software is available.

      2. Nobody forces you to use Linux with Beaglebone. There’s TI-RTOS available for free, which can enable hard real time for you without all overhead that brings Linux.
        However, some of functionality (like PowerVR SGX 3D acceleration) will be unavailable

  2. If you want *commercially important* examples of hard real-time controllers actively being used for audio/USB work, then look at the XMOS xCORE devices and products.

    Why is it so good? Because they have excellent hardware (easy) *and* excellent software/IDE (difficult). Oddly, people concentrate on the easy bit (4000MIPS processors, expandable) – but without software the hardware is not very interesting.

    The XMOS IDE will *predict* *exactly* how many cycles your program will take to execute, based on examining the optimised binary that will be executed. None of this rubbish about measuring the executing time, and hoping you happen to have measured the maximum time :)

    http://www.xmos.com/
    https://www.digikey.co.uk/products/en?keywords=xmos
    http://uk.farnell.com/b/xmos?rd=xmos

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.