Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • docs/docs.beagleboard.io
  • jkridner/docs
  • lorforlinux/docs.beagleboard.io
  • harshilbhatt2001/docs.beagleboard.io
  • Krishna_13/docs.beagleboard.io
  • gpioblink/docs.beagleboard.io
  • dhruvag2000/docs.beagleboard.io
  • jiande/docs.beagleboard.io
  • beagleplay/docs
  • beaglev-ahead/docs
  • sabeeh.khan14/docs.beagleboard.io
  • yoder/docs.beagleboard.io
  • jdneal/docs.beagleboard.io
  • ayush1325/docs.beagleboard.io
  • vishnumaiea/docs.beagleboard.io
  • andrei1998/docs-beagleboard-io-zephyr-demo
  • andrei1998/docs.beagleboard.io
  • nmenon/docs.beagleboard.io
  • epenguin/docs.beagleboard.io
  • paul_buxton/docs.beagleboard.io
  • anujdeshpande/docs.beagleboard.io
  • melta101/docs.beagleboard.io
  • krvprashanth/docs.beagleboard.io
  • samdai/docs.beagleboard.io
  • bustedwing1/docs.beagleboard.io
  • cshegedus/docs.beagleboard.io
  • wmat/docs.beagleboard.io
  • Roger18/docs.beagleboard.io
  • himanshuk/docs.beagleboard.io
  • vvaishak/docs.beagleboard.io
  • alecdenny/docs.beagleboard.io
  • san.s.kar03/docs.beagleboard.io
  • andrei1998/docs-beagleboard-io-fixes
  • SomeInterestingUserName/docs.beagleboard.io
  • edge-ai/docs
  • andrei1998/docs-beagleboard-io-rtc
  • devarsht/docs.beagleboard.io
  • andrei1998/docs-beagleboard-io-deepak-fork
  • superchamp234/docs.beagleboard.io
  • lranders/docs.beagleboard.io
  • kushalkr/docs.beagleboard.io
  • mkorpershoek/docs.beagleboard.io
  • prajnark/docs.beagleboard.io
  • touchhowling/docs.beagleboard.io
  • RobertCNelson/docs.beagleboard.io
  • Shankari02/docs.beagleboard.io
  • LucienMorey/docs.beagleboard.io
  • ketanthorat/docs.beagleboard.io
  • jjateen/docs.beagleboard.io
  • Whiz-Manas/mana-docs-beagleboard-io
  • beagley-ai/zephyr/docs.beagleboard.io
  • giuliomoro/docs.beagleboard.io
52 results
Show changes
Showing
with 2658 additions and 28 deletions
boards/beagley/ai/images/Beagle_Y-AI_pin_out.png

418 KiB

boards/beagley/ai/images/components-location/back.png

1.15 MiB

boards/beagley/ai/images/components-location/back.webp

148 KiB

boards/beagley/ai/images/components-location/front.png

1.28 MiB

boards/beagley/ai/images/components-location/front.webp

152 KiB

.. _industrial-comms-cape:
Beaglebone Industrial Comms Cape
################################
For industrial communication applications. Provides an array of communication protocols including one RS485, one CAN,
two analog 4–20 mA current loops, and two 3A 50V interfaces allowing the control of high current loads.
.. figure:: images/BeagleBoneCommsCapeA2-400x279.png
:align: center
:alt: BeagleBone Comms Cape
* `Order page <https://beagleboard.org/capes#comms>`_
* `Schematic <https://openbeagle.org/beagleboard/capes/-/tree/master/beaglebone/comms>`_
.. note::
This cape also boasts compatiblity with the :ref:`beaglev-fire-home`. Documentation for it's setup can be found
at :ref:`beaglev-fire-comms-cape-gateware-usage`.
Electrical Specifications
**************************
- **RS485**: `MAX13487E/MAX13488E datasheet <https://datasheets.maximintegrated.com/en/ds/MAX13487E-MAX13488E.pdf>`_
- **CAN**: `SN65HVD230 datasheet <https://www.ti.com/product/SN65HVD230>`_
- **2x 4-20mA current loop inputs**
- **2x 3A 50V sinks for high-current loads**
Mechanical Specifications
*************************
.. list-table::
:header-rows: 1
* - Feature
- Specification
* - Layers
- 2
* - PCB Thickness
- 0.062"
* - RoHS Compliant
- Yes
Documentation
*************
.. list-table::
:header-rows: 1
* - Feature
- Availability
* - Open Source
- Yes
* - System Reference Manual
- Not yet
* - Schematics
- PDF, EAGLE
* - PCB Files
- PDF, EAGLE
* - Gerber Files
- Not yet
* - Bills of Materials
- Not yet
Test Code
*********
.. code-block:: bash
# For the RS485, you just need
config-pin p9.11 uart
config-pin p9.13 uart
# and then use /dev/ttyS4
# For the CAN, you just need
config-pin p9.24 can
config-pin p9.26 can
# and then you can use something like
# https://openbeagle.org/-/snippets/15 ,
# but replace can0 with can1
# For the 4-20mA loop, the ADC overlay should already be loaded and you can
cat /sys/bus/iio/devices/iio:device0/in_voltage5_raw
cat /sys/bus/iio/devices/iio:device0/in_voltage6_raw
# but you'll need to do the voltage to data conversion
# For the sink drivers, you can do:
# Sink A
config-pin p9.15 gpio
echo out > /sys/class/gpio/gpio48/direction
echo 1 > /sys/class/gpio/gpio48/value
# Sink B
config-pin p9.23 gpio
echo out > /sys/class/gpio/gpio49/direction
echo 1 > /sys/class/gpio/gpio49/value
# and that should turn them on.
......@@ -43,11 +43,14 @@ across the corresponding Boards without changing any code at all.
Find the instructions below on using each cape:
* :ref:`bone-cape-relay`
* :ref:`industrial-comms-cape`
.. toctree::
:maxdepth: 2
:hidden:
/boards/capes/cape-interface-spec
/boards/capes/relay
cape-interface-spec
relay
comms
motor_cape
.. _bone-cape-motor:
BeagleBoard.org BeagleBone Motor Cape
#####################################
The Motor Cape, as the name suggests, is a simple Cape with two, L298P drivers on it.
It contains the two drivers and each can be operated independently from the BeagleBone.
.. figure:: images/BeagleBoneMotorCapeA2-400x281.png
:align: center
:alt: BeagleBone Motor Cape Rev. A2
BeagleBone Motor Cape Rev. A2
* `Order page <https://beagleboard.org/capes#motor>`_
* `Schematic <https://git.beagleboard.org/beagleboard/capes/-/tree/master/beaglebone/Motor>`_
.. note::
The following describes how to use the device tree overlay under development.
The description may not be suitable for those using older firmware.
Installation
************
Special configuration is required. When you plug the Motor Cape into your BeagleBone-AI64,
it will automatically become recognized.
You can check to see if the Motor Cape is recognized with the following command.
.. code-block::
sudo beagle-version | grep UBOOT
Your output should look similar:
`UBOOT: Booted Device-Tree:[k3-j721e-beagleboneai64.dts]`
`UBOOT: Loaded Overlay:[k3-j721e-beagleboneai64-BBORG_MOTOR.kernel]`
A list of currently loaded device tree overlays are displayed here.
If you see `k3-j721e-beagleboneai64-BBORG_MOTOR.kernel` in this list, it has been loaded correctly.
If it is not loaded correctly, you can also load it directly
by adding the following to the overlay options
(which can be reflected by changing the file /boot/firmware/extlinux/extlinux.conf) to reflect the text below.
.. code-block::
fdtoverlays /overlays/k3-j721e-beagleboneai64-BBORG_MOTOR.dtbo
Usage
*****
.. code-block:: shell-session
ls /sys/class/leds/
The directory "m1_high", for instance, exists in the following directory.
The GPIOs can be controlled by modifying the files in its directory called `brightness`.
.. code-block:: shell-session
echo 1 > /sys/class/leds/m1_high/brightness
This allows you to adjust the `brightness`.
Entering 1 for `brightness` turns it ON while entering 0 for `brightness` turns it OFF.
The two drivers can access all four connectors for the motors.
Changing the file from m1_high to m2_high will grant you access to
the motor2 headers on the Motor Cape which is a file located in /sys/class/leds/m2_high/.
Also, once the below commands to get PWM accessible on the BBAI-64 are installed and commanded,
you can find your files in your FS on the BBAI-64 via `/dev/beagle/pwm/P*`.
Code to Get Started
*******************
* For instance, a kernel that I found to work is kernel: `6.1.83-ti-arm64-r64`
* An image I found to work is: `BeagleBoard.org Debian Bookworm Xfce Image 2024-07-04`
Before using the Motor Cape, some installation steps are needed:
1. `sudo apt update`
2. `cd /opt/source/dtb-6.1-Beagle/ && git pull`
3. ./build_n_install.sh
Also, a neat shell script to have access to PWM and GPIO for utilizing the Motor Cape from the
BBAI-64 is located below. I called it set_up_pwm.sh:
.. code-block:: bash
# Here is our shell script that can be run with sh set_up_pwm.sh (sudo is needed)
sudo beagle-pwm-export --pin p9_16
sudo beagle-pwm-export --pin p9_14
sudo beagle-pwm-export --pin p8_13
sudo beagle-pwm-export --pin p8_19
* An image I found that works is `https://www.beagleboard.org/distros/bbai64-debian-12-6-2024-07-04-xfce`
There are newer images and kernels if you want to update and there are older ones in case you
would like to go back in time to use older kernels and images for the Motor Cape. Please remember
that older firmware will work differently on the BeagleBoneAI-64 and may have unintended details.
C Source with File Descriptors
******************************
You can name this file Motor_Test.c and use gcc to handle compiling the source into a binary like so:
`gcc Motor_Test.c -o Motor_Test`
.. code-block:: c
// From Sean J. Miller on element14 with my twist for the BBAI-64 and Motor Cape
// Since its conception, the links have changed and have since been lost!
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
void GPIO_One(int Gpio) {
FILE *bright;
bright = fopen("/sys/class/leds/m1_high/brightness", "w");
fseek(bright, 0, SEEK_SET);
fprintf(bright, "%d", 1 * Gpio);
fclose(bright);
}
void setupPWM(int enable) {
FILE *pwm;
pwm = fopen("/dev/beagle/pwm/P9_16/enable", "w");
fseek(pwm, 0, SEEK_SET);
fprintf(pwm, "%d", 1 * enable);
fclose(pwm);
}
void setupPeriod(int period_one) {
FILE *period;
period = fopen("/dev/beagle/pwm/P9_16/period", "w");
fseek(period, 0, SEEK_SET);
fprintf(period, "%d", 10 * period_one);
fclose(period);
}
void pwm_duty(int the_duty_multiplier) {
FILE *duty;
duty = fopen("/dev/beagle/pwm/P9_16/duty_cycle", "w");
fseek(duty, 0, SEEK_SET);
fprintf(duty, "%d", 100 * the_duty_multiplier);
fclose(duty);
}
int testInteger = 0;
int main() {
printf("Setting up\n");
setupPWM(0);
while(1) {
printf("Enter an integer, Please: ");
scanf("%d", &testInteger);
if (testInteger >= 3) {
setupPWM(1);
setupPeriod(140);
pwm_duty(8);
GPIO_One(1);
}
usleep(2500);
if (testInteger < 2) {
setupPWM(0);
setupPeriod(80);
pwm_duty(8);
GPIO_One(0);
}
usleep(2500);
}
pwm_duty(0);
setupPWM(0);
GPIO_One(0);
return 0;
}
Python3 Source to Lock and Unlock a Door with a Solenoid Motor
**************************************************************
If you find the daunting task of simplifying an easy one, please take this source and change it.
Make it suit your needs. I will call this file MotorLib.py. Then, we can use all of which it entails
in another file and have our GPIO files also work since the L298 drivers use two peripherals on the
TDA4VM on the BBAI-64, i.e. GPIO and PWM respectively.
.. code-block:: python
# This is the library called MotorLib.py for the Motor Cape
from pathlib import Path
class Pwm:
def __init__( self, path, *, frequency=None, period=None, value=None, duty_cycle=None, enabled=None ):
"""path can either be absolute or relative to /dev/beagle/pwm/
Any remaining arguments are passed to configure() as-is. You should typically provide the desired
frequency (or period) and initial value (or duty_cycle).
"""
path = Path( '/dev/beagle/pwm/', path )
self.path = path
if not path.exists():
raise FileNotFoundError(f'Directory not found: {path}')
if not path.is_dir():
raise NotADirectoryError(f'Not a directory: {path}')
self._enabled = bool( int( (path/'enable').read_text() ) )
self._period = int( (path/'period').read_text() )
self._duty_cycle = int( (path/'duty_cycle').read_text() )
self.configure( frequency=frequency, period=period, value=value, duty_cycle=duty_cycle, enabled=enabled )
def disable( self ):
if not self._enabled:
return
(self.path/'enable').write_text('0')
self._enabled = False
def enable( self ):
if self._enabled:
return
if self._period == 0:
raise RuntimeError("Cannot enable PWM when frequency is unconfigured (i.e. period is zero)")
(self.path/'enable').write_text('1')
self._enabled = True
def configure( self, *, frequency=None, period=None, value=None, duty_cycle=None, enabled=None ):
"""Configure one or more PWM parameters. You can specify:
- frequency (in Hz) or period (in ns)
- value (in range 0.0-1.0) or duty_cycle (in ns)
- enabled (bool)
If frequency (or period) is specified then
- value (or duty_cycle) must also be specified
- enabled defaults to True
Otherwise any parameters left unspecified are maintained unchanged.
"""
if frequency is not None or period is not None:
if value is None and duty_cycle is None:
raise RuntimeError("When configuring PWM frequency or period you must also specify value or duty_cycle")
if enabled is None:
enabled = True
else:
if enabled is None:
enabled = self._enabled
if frequency is not None:
if period is not None:
raise RuntimeError("Cannot configure both PWM frequency and period")
if frequency <= 0:
period = 2**32
else:
period = round( 1e9 / frequency )
if period not in range( 1, 2**32 ):
raise RuntimeError(f"PWM frequency must be in range {1e9/(2**32-1)} .. {1e9/1} Hz")
elif period is not None:
period = round( period )
if period <= 0 or period >= 2**32:
raise RuntimeError("PWM period must be in range 1 .. 4294967295 ns")
else:
period = self._period
if value is not None:
if duty_cycle is not None:
raise RuntimeError("Cannot configure both PWM value and duty_cycle")
if period == 0:
raise RuntimeError("Cannot set PWM value when frequency is unconfigured (i.e. period is zero)")
if value < 0.0 or value > 1.0:
raise RuntimeError("PWM value must be in range 0.0 .. 1.0")
duty_cycle = round( value * period )
elif duty_cycle is not None:
duty_cycle = round( duty_cycle )
if duty_cycle < 0 or duty_cycle > period:
raise RuntimeError(f"PWM duty_cycle must be in range 0 .. period ({period}) ns")
else:
duty_cycle = self._duty_cycle
if not enabled:
self.disable()
if duty_cycle < self._duty_cycle:
(self.path/'duty_cycle').write_text( str( duty_cycle ) )
self._duty_cycle = int( (self.path/'duty_cycle').read_text() )
if period != self._period:
(self.path/'period').write_text( str( period ) )
self._period = int( (self.path/'period').read_text() )
if duty_cycle != self._duty_cycle:
(self.path/'duty_cycle').write_text( str( duty_cycle ) )
self._duty_cycle = int( (self.path/'duty_cycle').read_text() )
if enabled:
self.enable()
@property
def enabled( self ):
return self._enabled
@enabled.setter
def enabled( self, enabled ):
if enabled:
self.enable()
else:
self.disable()
@property
def period( self ):
return self._period
@period.setter
def period( self, period ):
if self._duty_cycle > 0:
raise RuntimeError("Cannot set period when PWM value is non-zero (i.e. duty_cycle is non-zero)")
self.configure( period=period, duty_cycle=0, enabled=self._enabled )
@property
def frequency( self ):
if self._period == 0:
return None
return 1e9 / self._period
@frequency.setter
def frequency( self, frequency ):
if self._duty_cycle > 0:
raise RuntimeError("Cannot set frequency when PWM value is non-zero (i.e. duty_cycle is non-zero)")
self.configure( frequency=frequency, duty_cycle=0, enabled=self._enabled )
@property
def value( self ):
if self._period == 0:
return None
return self._duty_cycle / self._period
@value.setter
def value( self, value ):
self.configure( value=value )
@property
def duty_cycle( self ):
return self._duty_cycle
@duty_cycle.setter
def duty_cycle( self, duty_cycle ):
self.configure( duty_cycle=duty_cycle )
# support being used as context manager to automatically disable pwm when exiting scope
def __enter__( self ):
return self
def __exit__( self, exc_type, exc_val, exc_tb ):
self.disable()
The next file is not our library but our file to run on the command line to call MotorLib for our
use case, e.g. opening a door by unbolting our locking solenoid and/or locking it back.
.. code-block:: python
#!/usr/bin/python3
# This is for Motor1 on the Headers of the Motor Cape
# Use for PWM on /dev/beagle/pwm/
from pathlib import Path
from MotorLib import Pwm # see https://pastebin.com/R70P1wAn
from time import sleep
pwm1b = Pwm('/dev/beagle/pwm/P9_16/', frequency=50, value=0)
GPIO = Path('/sys/class/leds/m1_high/brightness')
GPIO.write_text('0')
try:
while True:
port = float(input("Please type a 0 or a 1 : "))
if port == 0:
GPIO.write_text('1')
sleep(1)
frequency=150
pwm1b.value=1.0
sleep(1)
elif port == 1:
GPIO.write_text('1')
sleep(1)
frequency=70
pwm1b.value=0.1
sleep(1)
except KeyboardInterrupt:
GPIO.write_text("0")
pwm1b.enabled = False
print("Unlatching and Closing... ")
pass
These are a few examples on how to use the Motor Cape and TDA4VM (Cortex-A72) supported BeagleBoneAI-64 SBC.
......@@ -3,11 +3,14 @@
BeagleBoard.org BeagleBone Relay Cape
#####################################
Relay Cape, as the name suggests, is a simple Cape with relays on it.
The Relay Cape, as the name suggests, is a simple Cape with relays on it.
It contains four relays, each of which can be operated independently from the BeagleBone.
.. image:: images/BeagleBoneRelayCapeA2-400x274.png
.. figure:: images/BeagleBoneRelayCapeA2-400x274.png
:align: center
:alt: BeagleBone Relay Cape Rev. A2
BeagleBone Relay Cape Rev. A2
* `Order page <https://beagleboard.org/capes#relay>`_
* `Schematic <https://git.beagleboard.org/beagleboard/capes/-/tree/master/beaglebone/Relay>`_
......@@ -43,14 +46,14 @@ by adding the following to the U-Boot options
Usage
*****
.. code-block::
.. code-block:: shell-session
ls /sys/class/leds
The directory "relay1", for instance, exists in the following directory.
The LEDs can be controlled by modifying the files in its directory.
.. code-block::
.. code-block:: shell-session
echo 1 > relay1/brightness
......@@ -66,9 +69,9 @@ Code to Get Started
Currently, using sysfs in .c files, libgpiod-dev/gpiod in .c files, and
python3 files with the Relay Cape work well!
* For instance, a kernel that I found to work is kernel: `5.10.140-ti-r52`
* For instance, a kernel that I found to work is kernel: `5.10.168-ti-r77`
* Another idea, an image I found that works is `BeagleBoard.org Debian Bullseye Minimal Image 2022-11-01`
* Another idea, an image I found that works is `BeagleBoard.org Debian Bookworm IoT Image 2023-10-07`
There are newer images and kernels if you want to update and there are older ones in case you
would like to go back in time to use older kernels and images for the Relay Cape. Please remember
......@@ -77,16 +80,15 @@ that older firmware will work differently on the BeagleBone Black or other relat
C Source with File Descriptors
******************************
You can name this file GPIO.c and use gcc to handle compiling the source into a binary like so:
You can name this file Relay_Test.c and use gcc to handle compiling the source into a binary like so:
`gcc GPIO.c -o GPIO`
`gcc Relay_Test.c -o Relay_Test`
.. code-block::
.. code-block:: c
/*
This is an example of programming GPIO from C using the sysfs interface on
a BeagleBone Black/BeagleBone Black Wireless or other am335x board with the Relay Cape.
This is an example of programming a Relay on the Relay Cape for the BeagleBone Black or other am335x board with the Relay Cape.
Use the Relay Cape attached to the BeagleBone Black for a change in seconds and then exit with CTRL-C.
......@@ -148,32 +150,32 @@ You can name this file GPIO.c and use gcc to handle compiling the source into a
C Source with LibGPIOd-dev and File Descriptors
***********************************************
Also...if you are looking to dive into the new interface, libgpiod-dev/gpiod.h, here is another form of
source that can toggle the same GPIO listed from the file descriptor.
Also...if you are looking to dive into the new interface, libgpiod-dev/gpiod, here is another form of
source that can toggle the same relay listed from the file descriptor.
One thing to note: `sudo apt install cmake`
1. mkdir GPIOd && cd GPIOd
2. nano LibGPIO.c
2. nano Relay.c
3. add the below source into the file LibGPIO.c
3. add the below source into the file Relay.c
.. code-block::
.. code-block:: c
/*
Simple gpiod example of toggling a LED connected to a gpio line from
the BeagleBone Black Wireless and Relay Cape.
the Relay Cape on the BeagleBone Black.
Exits with or without CTRL-C.
*/
// This source can be found here: https://github.com/tranter/blogs/blob/master/gpio/part9/example.c
// It has been changed by me, Seth, to handle the RelayCape and BBBW Linux based SiP SBC.
// It has been changed by me, Seth, to handle the Relay Cape and BBB Linux based SoC SBC.
// kernel: 5.10.140-ti-r52
// image : BeagleBoard.org Debian Bullseye Minimal Image 2022-11-01
// kernel: 5.10.168-ti-r77
// image : BeagleBoard.org Debian Bookworm IoT Image 2023-10-07
// type gpioinfo and look for this line: line 20: "P9_41B" "relay1" output active-high [used]
// That line shows us the info. we need to make an educated decision on what fd we will use, i.e. relay1.
......@@ -237,18 +239,20 @@ One thing to note: `sudo apt install cmake`
.. code-block::
cmake_minimum_required(VERSION 3.22)
cmake_minimum_required(VERSION 3.25.0)
project(gpiod LANGUAGES C)
add_executable(LibGPIO LibGPIO.c)
add_executable(Relay Relay.c)
target_link_libraries(LibGPIO gpiod)
target_link_libraries(Relay gpiod)
6. cd build && cmake ..
7. make
8. ./LibGPIO
8. ./Relay
These are a few examples on how to use the Relay Cape and am335x supported BeagleBone Black SBC.
These are a few examples on how to use the RelayCape and am335x supported BeagleBone Black Wireless/BeagleBone Black SBCs.
......@@ -40,6 +40,8 @@ started.
beagley/ai/index.rst
beagleplay/index
pocketbeagle-2/index
pocketbeagle/index
beaglebone/ai-64/index
beaglebone/ai/index
beaglebone/black/index
......@@ -47,7 +49,6 @@ started.
beaglebone/index
beaglev/ahead/index
beaglev/fire/index
pocketbeagle/index
beagleconnect/freedom/index
beagleconnect/index
beagleboard/index
......
.. _pocketbeagle-2-introduction:
Introduction
###############
PocketBeagle 2 is based on `Texas Instrments AM6232 SoC <https://www.ti.com/product/AM623>`_, it's dual A53 cores can
provides higher performance than classic PocketBeagle. The new design comes with pre-soldered headers,
3-pin JST-SH 1.00mm uart debug port, USB-C port, MSPM0L1105, 512MB RAM, and LiPo Battery charger.
.. table::
:align: center
:widths: auto
+----------------------------------------------------+---------------------------------------------------------+
| .. image:: images/product/pocketbeagle-2-front.* | .. image:: images/product/pocketbeagle-2-back.* |
| :width: 700 | :width: 700 |
| :align: center | :align: center |
| :alt: PocketBeagle 2 front | :alt: PocketBeagle 2 back |
+----------------------------------------------------+---------------------------------------------------------+
.. _pocketbeagle-2-comparison:
Comparison
***************
The board is intended to provide functionality well beyond classic PocketBeagle,
while still providing compatibility with PocketBeagle's expansion headers as
much as possible. There are several significant differences between the designs.
.. _pocketbeagle-comparison-table, PocketBeagle comparison:
.. table:: Table: PocketBeagle comparison
+-------------------+---------------------+----------------------------+
| Feature | PocketBeagle 2 | PocketBeagle original |
+===================+=====================+============================+
| SoC | AM6232 | AM3358 |
+-------------------+---------------------+----------------------------+
| Arm CPU | Cortex-A53 (64-bit) | Cortex-A8 (32-bit) |
+-------------------+---------------------+----------------------------+
| Arm cores | 2 x 1GHz | 1 x 1GHz |
+-------------------+---------------------+----------------------------+
| RAM | 512MB DDR4 | 512MB DDR3 |
+-------------------+---------------------+----------------------------+
.. todo::
add cape compatibility details
.. _pocketbeagle-2-features-and-specificationd:
PocketBeagle 2 Features and Specification
********************************************
This section covers the specifications and features of the board and provides a high level
description of the major components and interfaces that make up the board.
.. _pocketbeagle-2-features,PocketBeagle 2 features tabled:
.. table:: Table: PocketBeagle 2 Features and Specification
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| | Feature |
+=========================+=========================================================================================================================================+
| **Processor** | `Texas Instruments AM6232 <https://www.ti.com/product/AM623>`_ |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| **SDRAM Memory** | 512MB DDR4 (Kingston D2516AN9EXGXN-TU) |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| **PMIC** | TPS6521903 |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| **Debug Support** | 3 pin 3.3V JST-SH 1.00mm UART debug port (RPI debug probe compatible) |
+ +-----------------------------------------------------------------------------------------------------------------------------------------+
| | 10-pin JTAG TAG-CONNECT footprint |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| **Power Source** | USB C or Cape Header VIN (5V @ 1A) |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| **PCB** | 55 x 35 mm |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| **Indicators** | 1x Power, 1x Battery charging, and 4x User Controllable LEDs |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| **SD/MMC Connector** | microSD (1.8/3.3V) |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| **User Input** | 1. Power Button |
| | 2. User/Boot Button |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| **Weight** | 12.7gm |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
.. _pocketbeagle-2-component-locations:
Board Component Locations
***************************
This section describes the key components on the board. It provides information on their location
and function. Familiarize yourself with the various components on the board.
.. _pocketbeagle-2-components:
Board components
================
This section describes the key components on the board, their location and function.
.. tab-set::
.. tab-item:: Front components location
.. figure:: images/components/front.*
:width: 1240
:align: center
:alt: PocketBeagle 2 board front components location
PocketBeagle 2 board front components location
.. table:: PocketBeagle 2 board front components location table
:align: center
+----------------------------+---------------------------------------------------------------------------+
| Feature | Description |
+============================+===========================================================================+
| AM6232 SoC | Internet of Things (IoT) and gateway SoC with dual core A53 @ 1GHz |
+----------------------------+---------------------------------------------------------------------------+
| MSPM0 MCU | MSPM0 MCU to provide ADC and EEPROM functionality |
+----------------------------+---------------------------------------------------------------------------+
| U, P and C LEDs | USR1 - USR4 (U) user LEDs, Power (P) & Charging (C) LED indicator |
+----------------------------+---------------------------------------------------------------------------+
| USB C | Power and connectivity. |
+----------------------------+---------------------------------------------------------------------------+
| User button | User action button, hold down to boot from sdCard on a board with eMMC |
+----------------------------+---------------------------------------------------------------------------+
| Power button | Hold down to toggle ON/OFF |
+----------------------------+---------------------------------------------------------------------------+
| TPS6521903 | Power Management Integrated Circuit (PMIC) |
+----------------------------+---------------------------------------------------------------------------+
| 512MB RAM | 512MB DDR4 RAM |
+----------------------------+---------------------------------------------------------------------------+
| JTAG debug port | Tag-Connect JTAG (AM6232) debug port |
+----------------------------+---------------------------------------------------------------------------+
.. tab-item:: Back components location
.. figure:: images/components/back.*
:width: 1240
:align: center
:alt: PocketBeagle 2 board back components location
PocketBeagle 2 board back components location
.. table:: PocketBeagle 2 board back components location table
:align: center
+----------------------------+---------------------------------------------------------------------------+
| Feature | Description |
+============================+===========================================================================+
| microSD | Micro SD Card holder |
+----------------------------+---------------------------------------------------------------------------+
| P1 & P2 cape header | Expansion headers for PocketBeagle capes. |
+----------------------------+---------------------------------------------------------------------------+
| UART debug ports | 3pin JST-SH 1.00mm UART debug port (RPI debug probe compatible) |
+----------------------------+---------------------------------------------------------------------------+
.. _pocketbeagle-2-quick-start:
Quick Start Guide
##################
This section provides instructions on how to hook up your board. This Beagle requires a 5V @ 1A (5W)
power supply to work properly via either USB Type-C power adapter or via cape header pins.
Recommended adapters can be found at :ref:`accessories-power-supplies` section.
.. _pocketbeagle-2-whats-in-the-box:
What’s In the Box
*******************
In the box you will find two main items,
* `PocketBeagle 2 <https://www.beagleboard.org/boards/pocketbeagle-2>`_
* Instruction card
.. note::
A USB-C to USB-C / USB-A to USB-C cable is not included, but recommended for the tethered scenario and creates
a developer experience where the board can be used immediately with no other equipment needed.
.. tip::
For board files, 3D model, and more, you can checkout
`PocketBeagle 2 repository on OpenBeagle <https://openbeagle.org/pocketbeagle/pocketbeagle-2>`_.
.. todo:: Add picture of PocketBeagle 2 box content
Creating bootable microSD card
*******************************
To get started with creating a bootable microSD card, you need folloiwing items,
1. Up to date `bb-imager-rs <https://openbeagle.org/ayush1325/bb-imager-rs/>`_
2. microSD card (8GB or larger)
.. tip::
If required you can manually download the image from
`beagleboard.org distros page <https://www.beagleboard.org/distros/>`_, for example,
https://www.beagleboard.org/distros/pocketbeagle2-debian-12-9-2025-01-15-minimal
.. figure:: images/distro/pocketbeagle-2-distro-selection.png
:align: center
:alt: Distro selection
Distros selection
To begin you have to select PocketBeagle 2 from the list of boards,
then select the image you want to flash, and finally select the microSD card.
After doing this you have to select the config button to configure the image
and then click on the flash button to start the flashing process.
.. figure:: images/distro/bb-imager-selection.png
:align: center
:alt: Board and image selection
Board and image selection
Below image shows the configuration options available for the image.
.. tip::
You can enable Skip ``Verification`` as shown in the image below,
which will make the flashing process faster by skipping the verification step.
.. figure:: images/distro/bb-imager-config.png
:align: center
:alt: Configuration options
Configuration options
Make sure to select the correct microSD card and click on the flash button to start the flashing process.
.. figure:: images/distro/bb-imager-flashing.png
:align: center
:alt: Flashing in progress
Flashing in progress
Once the flashing is done, you will see the following screen.
.. figure:: images/distro/bb-imager-flashing-done.png
:align: center
:alt: Flashing done
Flashing done
Your microSD card is now ready to boot PocketBeagle 2.
.. _pocketbeagle-2-main-connection-scenarios:
Main Connection Scenarios
*************************
This section describes how to connect and power the board and serves as a slightly more detailed
description of the quick start guide included in the box. The board can be configured in several
different ways, but we will discuss the two most common scenarios.
1. Directly tethered to a PC via pocketbeagle 2 USB-C port.
2. With `TechLab Cape <https://www.beagleboard.org/boards/techlab>`_ or `GamePup Cape <https://www.beagleboard.org/boards/pocketbeagle-gamepup-cape>`_ for sensors, USB host, LEDs and Buttons.
.. _pocketbeagle-2-tethered-scenario:
Tethered Connection
====================
In this scenario, the board is directly connected to a PC via USB-C port. This is the simplest way to get started with the board.
Optionally you can connect rpi debug probe to 3-pin JST-SH connector to see boot log, board console access and for general debugging.
.. figure:: images/connection-diagrams/tethered-connection.*
:align: center
:alt: Tethered Connection
Tethered Connection
USB connection
---------------
1. Connect the USB-C cable to the PocketBeagle 2 and the other end to the PC.
2. The board will power up and boot from the microSD card.
3. The board will show up as a USB device on the PC.
4. You can access the board via ``SSH`` or board ``serial`` connection or though ``Visial Studio Code Server`` web interface.
.. tab-set::
.. tab-item:: Visial Studio Code Server
After connecting the board to the PC, you can access the board via a web browser by entering the IP address of the board in the address bar.
.. code-block:: text
https://192.168.7.2:3000/
.. figure:: images/misc/vscode-server.png
:align: center
:alt: Visual Studio Code Server
Visual Studio Code Server
.. tab-item:: SSH
After connecting the board to the PC, you can access the board via SSH executing the following command in your terminal.
.. code-block:: bash
ssh <username>@192.168.7.2
Where ``<username>`` is the username you selected during the microSD card flashing process.
.. figure:: images/misc/ssh-connection.png
:align: center
:alt: SSH connection
SSH connection
.. tab-item:: Serial
PocketBeagle 2 has a built-in UART debug connection. You can connect to the board console using a serial
console application (e.g. Putty) on the PC just like your would connection using any external UART debug probe
If PocketBeagle 2 is the old device connected with UART, on linux you can use `tio` utility, replace ``ttyACMx`` with the actual device name.
.. code-block:: bash
tio /dev/ttyACMx
.. figure:: images/misc/serial-connection.png
:align: center
:alt: Serial connection
Serial connection
Once you have access to the console using any of the methods above, you might want to share interne connection with the board.
You can do this by running ``pb2-internet.sh`` file on your PocketBeagle 2 board. and the follow OS specific steps to share internet connection.
First you have to create ``pb2-internet.sh`` file on PocketBeagle 2 with the following content,
.. code-block:: bash
#!/bin/sh -e
#
if ! id | grep -q root; then
echo "must be run as root"
exit
fi
if [ -f /etc/default/bb-boot ] ; then
. /etc/default/bb-boot
fi
if [ "x${USB_CONFIGURATION}" = "x" ] ; then
USB0_SUBNET=192.168.7
DNS_NAMESERVER=8.8.8.8
fi
/sbin/route add default gw ${USB0_SUBNET}.1 || true
ping -c1 ${DNS_NAMESERVER}
echo "nameserver ${DNS_NAMESERVER}" >> /etc/resolv.conf
#
then execute following commands,
.. code-block:: bash
chmod +x pb2-internet.sh
sudo ./pb2-internet.sh
On PC you have to follow OS specific steps to share internet connection with the board.
.. tab-set::
.. tab-item:: Linux
First you have to identify your WiFi interface name and PocketBeagle 2 Ethernet interface name using following command,
.. code-block:: bash
ip a
If you have your WiFi connected to router and PB2 connected to one of the USB the you should see four interfaces listed
- 1: lo
- 2: wlp0s20f3
- 3: enp0s20f0u2
- 4: enp0s20f0u2i2
Out of which ``wlp0s20f3`` is the WiFi interface and ``enp0s20f0u2`` is the PocketBeagle 2 Ethernet interface.
Once you know the interface names, you have to create ``pc-internet.sh`` file on PC with the following content,
.. code-block:: bash
sudo sysctl net.ipv4.ip_forward=1
sudo iptables --table nat --append POSTROUTING --out-interface wlp0s20f3 -j MASQUERADE
sudo iptables --append FORWARD --in-interface enp0s20f0u1 -j ACCEPT
make sure to update line 2 and 3 with your WiFi and PocketBeagle 2 Ethernet interface names. Then execute following commands,
.. code-block:: bash
chmod +x pc-internet.sh
sudo ./pc-internet.sh
.. tab-item:: Windows
.. todo:: Add steps to share internet connection on Windows
.. tab-item:: MacOS
.. todo:: Add steps to share internet connection on MacOS
UART serial debug connection
----------------------------
1. Connect the rpi debug probe to the 3-pin JST-SH connector on the board.
2. Connect the other end of the probe to the PC.
3. Use command line utility like `tio` with default setting or a serial console application (e.g. Putty) to accress your board.
4. You will see the boot log and can access the board console.
.. figure:: images/misc/serial-debug.png
:align: center
:alt: Serial debug
Serial debug
.. _pocketbeagle-2-cape-scenario:
Cape Connection
================
In this scenario, the board is connected to a cape like `TechLab Cape <https://www.beagleboard.org/boards/techlab>`_
or `GamePup Cape <https://www.beagleboard.org/boards/pocketbeagle-gamepup-cape>`_. This is the most common way to
use the board for sensor interfacing, USB host, LEDs and Buttons.
.. todo:: Add cape connection diagram and steps to use examples.
This diff is collapsed.
This diff is collapsed.
.. _pocketbeagle-2-demos-and-tutorials:
Demos and Tutorials
###################
.. todo:: Add PocketBeagle 2 demos and tutorials.