Bela’s audio and sensor capabilities make it the perfect platform for creating musical instruments, modular synths or audio effect boxes. In this page we will review the hardware that’s available on board and look in detail at Bela’s specifications.
Table of contents
- The Bela hardware
- Pin diagram
- Supply voltages
- Unpopulated pads
- Plug-in power
The Bela hardware
There are two types of Bela hardware: Bela, and Bela Mini. Bela consists of a Bela cape on top of a BeagleBone Black computer, and Bela Mini consists of a Bela Mini cape soldered on to a PocketBeagle. Both Bela boards have a lot of analog and digital inputs and outputs for hooking up sensors and controlling other devices. Importantly Bela has stereo audio inputs and outputs allowing you to interact with the world of sound. The below table gives a full overview of what’s available on the Bela hardware.
|16-bit Analog Inputs||8||8|
|16-bit Analog Outputs||0||8|
|1.1W 8ohm speaker outputs||0||2|
|SPI bus||yes||yes (soft)|
|Dimensions (L x W x H)||56mm x 35mm x 21mm||87mm x 54mm x 27mm|
|eMMC (onboard memory)||None; SD card only||4GB|
Alongside the audio, digital and analog I/Os you can also access ethernet, USB (including MIDI), SD card storage and other core features of the BeagleBone Black and pocket beagle. See, e.g.: the loggingSensors example, the various sample-… examples, MIDI and OSC.
With the audio expander capelet it is possible to extend Bela to have six audio inputs and six audio outputs.
Sampling rates and bit depth
|I/O||Sampling Rate||Bit Depth|
Analogue I/O is also software configurable to give 4 channels at 44.1kHz or 2 channels at 88.1kHz.
The voltage ranges shown below are translated into numbers in software: analog inputs are mapped to a range of 0 to 1, while audio maps to -1 to 1.
|Signal||Coupling||Voltage Range||Voltage Tolerance|
The digital I/O on Bela are directly connected through to the pins of the BeagleBone Black or PocketBeagle and so a degree of caution is needed when using any voltages over 3.3V.
NEVER exceed 3.3V on the digital I/O on the two side headers or you will damage the CPU of the BeagleBone. Always be careful when using 5V with the digital inputs!
The levels of audio I/O depend on the adjustable settings of the audio codec which you can configure via the Settings tab in the IDE. You can comfortably plug in a guitar, a dynamic microphone, a piezo pickup, most things really, as you have up to 59.5dB of gain at your disposal. You can refer to the TLV320AIC3104 datasheet for more technical details.
The audio input range is 1.8Vpp when the gain in the IDE (PGA) is set to 0dB. This is mapped to values between -1 and 1 when using
audioRead(). The headphone output of Bela is 2.6Vpp AC coupled when the headphone output level is set to 0dB. This maps to values between -1 and 1 when using
The analog inputs have a range of 0V to 4.096V which is mapped to values between 0 and 1 when using
analogRead() in your projects. Similarly the analog outputs have a range of 0V to 5V which is mapped to values between 0 and 1 when using
On our CTAG board the multiple Audio I/O channels are 2.5Vpp, that is 1.2dBu or -1.1dBV.
To see which pins are available to you when using Bela check out our interactive pin diagram: https://learn.bela.io/pin-diagram. By hovering over the highlighted pins in this diagram you can see the function of that pin and how it should be referenced within your code. This interactive reference map is also available in the Pin Diagram tab of the IDE.
There are several places where you can access power supply voltages on the BeagleBone Black and Bela cape. For the pins below, refer to the interactive diagram above or to the BeagleBone header pinouts compiled by Derek Molloy.
3.3V is available from the BeagleBone connector P9 pins 3 and 4. This is in the corner of the BeagleBone near the 5V power socket. Always use 3.3V with digital I/O!
5V is available from three sources:
The Bela cape, on the Analog Out connector. This 5V source is in series with a 100 ohm resistor. This makes it the safest 5V source to use for experimentation and exploration, because a short circuit is unlikely to power off the board or cause damage. On the other hand, the resistor means it is not suitable for supplying more than a few milliamps of current.
P9 pins 7 and 8. This is the SYS_5V supply on the BeagleBone Black, which is the regulated supply coming from the USB port. It will always be available regardless of how the BeagleBone is powered, but it has a limit of 250mA of current.
P9 pins 5 and 6. This is the VDD_5V supply on the BeagleBone Black, which is only available when the BeagleBone Black is powered from the DC barrel connector. It is not available on the BeagleBone Green, which does not have the DC connector. Given a suitable power supply, these pins can supply up to 1A of current. These are the pins used to power the audio amplifiers on the Bela cape.
The 3.3V supply has much better noise performance than the 5V supply. Therefore, if you are using one of these supply voltages as a reference in a sensitive analog circuit, we recommend you use the 3.3V supply, or a separate low-noise voltage reference.
On the Bela cape there are a number of unpopulated through-hole pads. An advanced user may want to solder headers or pins or components to enable the advanced features listed below. Refer to the board diagram for further details.
- 5V power supply input on J1. This can be used to power the BeagleBone and the Bela cape (the 5V pin is the same as P9_05/P9_06 and the barrel jack).
- DC-coupled, balanced (differential) line outs on J9.
- DC-coupled, unbalanced (single-ended) line outs on J10.
- J9 and J10 pinout. Note that GND pins on J10 where NC before Bela cape Rev B2 (Sept 2017):
- Vref. This is a high-impedance low-noise reference voltage used internally by the analog ADC. If you were to use this as a voltage reference in your circuit, you should provide a high-impedance buffer.
- MicBias (Bela cape rev B2 onwards only): this provides plug-in power from the TLV320AIC3104. The user may want to solder a 1k resistor from MicBias to one of the inputs in order to provide 2V or 2.5V (selectable via software) plug-in power to an electret capsule. See e.g.: section 11.2.1 of the datasheet.
The connectors we used for audio input and the headphone output on the Bela and Bela Mini cape, as well as the CTAG breakouts are standard three-way Molex-style crimp housings with 2.54mm pitch, like these. The speaker outputs use two-way Molex-style crimp housings with 2.54mm pitch, like these. You can also use female jumpers instead if you like, such as these. If you are stacking a PCB on top, you could use a socket header such as this.
Pre-assembled audio connectors with a Molex-style connector on one end and a 3.5mm stereo female socket at the other come with every Bela board, and spares can be purchased directly from our online shop.
Mounting Bela in a guitar pedal
The best option when you want to mount a Bela board in a guitar pedal, for example a Hammond case, is often to remove the existing 3.5mm connector and solder the wires directly to the 1/4 inch connector panel mount connector.
There are also some considerations about signal level/quality when using Bela as a guitar effect. In most cases (i.e.: if you are going into a distortion or other non-linear effect without an external band-limiting pedal (e.g.: EQ) pedal before), you will probably also want an additional low-pass filter on the audio output.
You can install an RC low-pass filter (resistor in series, capacitor to ground) for each channel, using as values R = 390ohm and C = 22nF if using the headphone out or R = 4.7k and C=2.2nF if using the line out (J9 on Bela). This is to avoid the high-frequency (beyond audio range) noise present at the output of the sigma-delta converter from being somehow aliased back into the audio range from the non-linearity of the next stage.
Some microphones (mostly electret-based) require “plug-in power” to work. Plug-in power is a small voltage used to power an on-board preamplifier. Normally microphones are not too strict about the exact voltage level, and common values range from 2V to 3.3V. In order to use microphones that require plug-in power on Bela, you have to connect the relevant audio input pins to an appropriate voltage source through a 1k resistor. Make sure you check the specifications of your microphones for the suitable voltage range before you follow the instructions below.
On Bela cape Rev B2 and above
The MicBias pin provides 2.5V and is the ideal voltage source for plug-in power. Depending on your use case, you may want to solder a wire, a 1x1 socket header or the resistor straight to this pin.
On any other Bela and BelaMini cape
Use the 3.3V pin (P9.03/P9.04 on Bela or P1.14/P2.23) as the voltage source.
Microphones are unlikely to work properly with CTAG capes, as they only have line inputs, and do not have a microphone preamplifier. You could still use the 3.3V (P9.03/P9.04) if you wanted to give it a try. Maybe you are lucky and your microphone has a high enough output voltage.
- Identify the appropriate voltage source for your board, as described in the preceding paragraphs.
- Identify the relevant audio input pin(s). Check your board diagram to identify the left and right input pins of the 3-pin IN connector. The Left pins is the central pin and the Right pin is the one that is closest to the OUT connector.
- On a breadboard, set up the following circuit: connect the voltage source through a 1k resistor to the audio inputs you want to provide plug-in power to. In the example diagram below, we are providing plug-in power to both audio inputs. You may decide to only connect the L or R input, depending on your needs. You may have to use socket wires to connect the audio input pins from the cape to the breadboard, and then you can use more wires to connect the breadboard to the audio connector.
- once you are happy with the breadboarded connections, you may decide to solder the resistors in place on your Bela cape. This is particularly easy on a Bela RevB2 or higher cape, as the MICBIAS pin is conveniently located in proximity of the audio input connector.
IMPORTANT: Perform these hacks at your own risk: they void the warranty on your hardware
Drive the speaker amps through an effect loop or using an external signal
The “hot” signal of the line-level output of the Bela cape is connected to the input of the speaker amplifier through unpopulated pads J9/J10 (see above). By cutting the signal traces that go from J9 to J10, you can insert an external effect loop between the Bela codec’s audio out and the input of the speaker amplifier. You can even decide to simply use the “Fx return” signal to inject an arbitrary external signal into the speaker amps, for instance if you want to send to the speaker the signal from two of the channels of a CTAG board.
Cut along the dashed line in the picture below, and insert the effect loop where indicated. If one day you want to undo your mod, simply join back together the pads adjacent to the traces you cut. Please refer to the full circuit diagram and schematic for your board revision.