Powering Bela
The best ways to get power to your board
When you have finished programming your project you may want to make it fully embedded and power it with a battery or external wall plug. In this guide we discuss the best ways to power your Bela board.
Table of contents
Power source
Using an external power supply
Bela Mini, Bela Gem Stereo, Bela Gem Multi
These boards can be powered via the USB port or by connecting an external 5V power supply between one of the GND pins and P1.01. See here for more details on powering the PocketBeagle that is used by Bela Mini or here for more details on powering the PocketBeagle 2 that is used by Bela Gem.
Bela and CTAG
You can power Bela from an external 5V DC power supply either with a USB cable plugging into the BeagleBone’s mini or micro USB B port or a barrel jack. If you use the mini/micro USB port then you can use a standard 5V USB plug which are commonly used for phone chargers to give power via the USB B port. If you are using a barrel jack then it needs to be 5.5mm x 2.1mm with the negative voltage outside and the positive voltage inside (often referred to as “centre positive” or “tip positive”).
On the Bela cape, connector J1 (not populated by default) can be used as an alternate means of supplying power to the speaker amplifiers. Pin 1 of J1 is connected to the same pins on the BeagleBone Black as the barrel connector (P9, pins 5 and 6).
Only 5V power supplies of the correct polarity should be used with the barrel connector or J1. Connecting more than 5V to the barrel connector, or connecting the supply backwards, may destroy the BeagleBone Black and the Bela cape.
Using batteries and power banks
Standard 5V power banks which are commonly used to charge mobile phones, and come in all sorts of sizes and capacities, are an easy option for powering both Bela and Bela Mini. These can be used via the USB port or the barrel jack with an appropriate USB to barrel jack cable.
An embedded Bela project, the Air Harp by Christian Heinrichs, which is powered with a USB power bank commonly used for charging phones.
If you would like to use a LiPo battery to power your project then it is a good idea to use a booster like the following to jump the LiPo power supply up to 5V: https://learn.sparkfun.com/tutorials/sparkfun-5v1a-lipo-chargerbooster-hookup-guide/all
The solution with a booster will generate 5V from a 3.7V LiPo and so all analog I/O will work. Note that on Bela Mini and Bela Gem you should wire the Power to P1.01 and GND to any of the available grounds, and not to the dedicated VBAT or battery socket mentioned below. Only raw cells should be connected to VBAT.
Powering from less than 5V will cause the USB and analog I/Os to misbehave.
Bela Mini, Bela Gem Stereo, Bela Gem Multi
The PocketBeagle and PocketBeagle 2 powering Bela Mini, Bela Gem Stereo and Bela Gem Multicomes with native support for LiPo batteries. Pin 14 on the P2 header is the positive input for a single cell lithium (LiOn/LiPo) battery. P2 Pin 15 is the battery ground.
Bela Gem Multi also comes with a dedicated JST S2B-PH-K-S connector, as found on many LiPo cells aimed at the maker market.
The wiring of this connector is not universal, so always double check the polarity of your battery before connecting it here.
The data sheet lists a supply voltage for the battery input as between 2.75V and 5.5V. We have tested some common 3.7V LiPo batteries like these and they work great.
Recharging LiPos
If you want the LiPo battery to recharge while the board is powered over USB, you additionally have to connect a 10k resistor between P2.15 and P2.16. To check the battery is charging on the BeagleBone Black or PocketBeagle:
- run
i2cget -y -f 0 0x24 0x03to check the PMIC charging status via I2C - output should be
0b0001000 - see PMIC datasheet for more info
You can also find an extensive discussion of using LiPo batteries with Bela Mini on our forum.
Limitations when powering from less than 5V
Powering any Bela board from a battery with less than 4.5V will cause the analog inputs and outputs to misbehave. The USB Host will also stop working. If you need to use these we highly recommend using a 5V supply and - if you are using a LiPo - a booster to provide 5V from the LiPo’s 3.7V output.
Analog inputs at low voltage on Bela Gem
On Bela Gem Stereo or Multi, you can keep using the analog inputs while powering from an external power source with less than 4.5V by changing the ADS8166 ADC’s reference to 3.3V. To do this you should remove the cape from the PocketBeagle 2, turning it around and, using a fine-tip soldering iron, minimal solder and a lot of care, short the correct solder bridge:
- on Bela Gem Stereo: JP2, which is the unlabelled solder bridge close to C12 and, C13 and C14
- on Bela Gem Multi: JP7, which is clearly labelled
Once you’ve bridged the solder bridge, the ADC’s internal 4.096V voltage reference will no longer be used, but the PB2’s 3.3V line will be used instead. This hardware change needs to be accompanied by a software change to set the folllowing values on the ADS8166:
- set bit 3 of register
PD_CNTL(PD_REF) to 1 - set register
OFST_CALto 011b
Powering off and on
The board will power on automatically when it is given power. To turn it off gracefully with a physical switch, you can use one of these options:
- Bela button: short tap stops the currently running project, 2 second hold press triggers shutdown
- Power button: when on, a short tap triggers shutdown; when off, a short tap triggers a boot
The Bela button is available on all capes as a physical button, while the Power button is available only on the BeagleBone Black and PocketBeagle 2. Both signals are always available on the headers so that they can be connected to external buttons:
| Function | BeagleBone (Bela, CTAG) | PocketBeagle (Bela Mini) | PocketBeagle 2 (Bela Gem Stereo, Bela Gem Multi) |
|---|---|---|---|
| Bela button | P9.27 | P2.34 | P2.06 |
| Power button | P9.09 | P2.12 | P2.12 |
Using the speaker amplifiers on Bela
The internal power amplifier which drives the speaker outputs (on the Bela cape only) is powered only when the barrel jack is in use.
J1 also provides a way to power the speaker amplifiers on the Beaglebone Green, which does not have a barrel connector. Alternatively, by desoldering ferrite bead FB4 from the Bela cape (located right next to J1), the speaker amplifiers can be powered from a separate supply to the rest of the Beaglebone.
