Note: this page contains old ACME related information. We keep it here for reference only.
For latest ACME updates, please visit this page:
BayLibre ACME (Another Cute Measurement Equipment)
This page contains basic documentation for the BayLibre Another-Cute-Measurement-Equipment (ACME) software suite.
Please note, that the project itself is still work-in-progress and the software suite should be treated as a Proof-of-Concept.
Part of the Baylibre Team has been dealing with power measurements and optimizations for many years, accumulating frustrations by all the limited and/or adhoc solutions that were available:
Hence the ACME initiative was launched, with the objective of getting rid of all these limitations and providing the community with the most flexible low-cost but high-perf solution!
The proposed solution comes as an extension for the BeagleBone Black (the ACME Cape), designed to provide multi-channel power and temperature measurements capabilities to the BeagleBone Black (BBB). It comes with power and temperature probes integrating a power switch (the ACME Probes), turning it into an advanced all-in-one power/temperature measurement solution.
The ACME initiative also proposes a new standard (free of charge) for power measurement connector (the ACME Power Connector), to solution the issue of development boards not being ready for power measurements.
The ACME initiative is completely open source, from HW to SW drivers and applications.
ACME Cape and Probes HW schematics may be downloaded from this link.
Simply download an image according to your application, untar and flash (using dd) onto an SDCard. The first time, log into the BeagleBone-Black using minicom (115200 bauds) to setup your credentials and hostname if needed.
Download link for a standalone device with an Oscilloscope-like GUI and also on-board sigrok command line tools.
Download link for a remotely operated device for automation in a test infra using host-side client tools.
If you are looking for a fairly automated build environment retrieve the 'repo' style repository like following:
The board will be reachable with AVAHI, by default its name is baylibre-acme.local, however, you may have to first log into it through minicom to set your credentials if not already done.
Please refer to the README as it may be more up to date.
Sigrok is a portable, cross-platform, Free/Libre/Open-Source signal analysis software suite that supports various device types (e.g. logic analyzers, oscilloscopes, power monitors, and many more). Sigrok is actively developed and maintained. We have chosen sigrok as the default front-end for ACME. For more information refer to sigrok.org.
Sigrok packages have several external dependencies and are somewhat difficult to cross-compile. In order to make it easier for users to enjoy sigrok on their ACME enabled BeagleBone Black we have prepared sigrok packages for buildroot. They are now available in upstream thanks to BayLibre's contributions.
In order to generate the root file system containing all sigrok packages and dependencies:
The above config file will make buildroot generate an image containing the command-line utility sigrok-cli and the graphical user interface pulseview (based on Qt5), which can be run through a minimal window manager - fluxbox - which is configured as well.
Such buildroot-generated root file system is mostly ready to work, but in order to automate the initialization of ACME probes you can put the following script into /etc/init.d. This will initialize the probes, reload the drivers and start the X-server and fluxbox window manager for both the HDMI port and in a virtual console accessible via vncviewer.
You can use this script as is or use it as an example.
ACME uses mainline Linux version >= 4.0 plus a simple device tree patch available here.
The kernel can be compiled by standard debian toolchain using this config file.
After patching and configuring linux execute:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make zImage modules dtbs
After the build finishes copy zImage and am335x-boneblack.dtb onto the boot partition of the SD card and install modules on the rootfs partition by: ARCH=arm make modules_install INSTALL_MOD_PATH=<SD card mount point>
.
The defconfig for BeagleBone is am335x_evm.
To rebuild (using the same toolchain as the kernel):
git clone git://git.denx.de/u-boot.git && cd u-boot ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make am335x_evm_config ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make
Typical boot process for BeagleBone Black using u-boot includes two u-boot phases:
The BeagleBoard ROM bootloader first loads a file called “MLO” from the SD card. This requires special formatting of the SD card and copying of the “MLO” file to the SD card. The “MLO” file is provided by u-boot's Secondary Program Loader (SPL) functionality. It is placed into the u-boot folder upon build.
The U-Boot SPL configures the off-chip memory and then loads the full u-boot. The file is typically called “u-boot.img” and SPL will typically look for it in the root folder of a FAT partition, but other options are possible.
Example uEnv.txt for ACME:
bootargs=console=ttyO0,115200n8 root=/dev/mmcblk0p2 rootwait bootcmd=load mmc 0 0x80F80000 am335x-boneblack.dtb; load mmc 0 0x80200000 zImage; bootz 0x80200000 - 0x80F80000 uenvcmd=boot
For detailed sigrok-cli and pulseview manual please refer to:
We are only presenting ACME-specific configuration options here.
Executing sigrok-cli –show –driver=baylibre-acme
displays various info about detected probes and supported options:
# sigrok-cli --show --driver=baylibre-acme Driver functions: Continuous sampling Sample limit Time limit Sample rate baylibre-acme - BayLibre ACME with 10 channels: P1_ENRG_PWR P1_ENRG_CURR P1_ENRG_VOL P2_ENRG_PWR P2_ENRG_CURR P2_ENRG_VOL P7_TEMP_IN P7_TEMP_OUT P8_TEMP_IN P8_TEMP_OUT Channel groups: Probe_1: channels P1_ENRG_PWR P1_ENRG_CURR P1_ENRG_VOL Probe_2: channels P2_ENRG_PWR P2_ENRG_CURR P2_ENRG_VOL Probe_7: channels P7_TEMP_IN P7_TEMP_OUT Probe_8: channels P8_TEMP_IN P8_TEMP_OUT Supported configuration options across all channel groups: continuous: limit_samples: 0 (current) limit_time: 0 (current) samplerate (1 Hz - 500 Hz in steps of 1 Hz)
Sigrok expects ACME to be initialized i.e. probes enabled by setting proper GPIOs & ina2xx/tmp401 drivers loaded. Script available in Additional configuration section handles such initialization.
Each probe is seen by libsigrok as a channel-group composed of three (power-probe) or two (temperature-probe) channels. Configuration settings in libsigrok are split into general options and channel-group specific options. You can display channel-group specific options by appending the –channel-group=<channel group name>
to the above command:
# sigrok-cli --show --driver=baylibre-acme --channel-group=Probe_1 Driver functions: Continuous sampling Sample limit Time limit Sample rate baylibre-acme - BayLibre ACME with 10 channels: P1_ENRG_PWR P1_ENRG_CURR P1_ENRG_VOL P2_ENRG_PWR P2_ENRG_CURR P2_ENRG_VOL P7_TEMP_IN P7_TEMP_OUT P8_TEMP_IN P8_TEMP_OUT Channel groups: Probe_1: channels P1_ENRG_PWR P1_ENRG_CURR P1_ENRG_VOL Probe_2: channels P2_ENRG_PWR P2_ENRG_CURR P2_ENRG_VOL Probe_7: channels P7_TEMP_IN P7_TEMP_OUT Probe_8: channels P8_TEMP_IN P8_TEMP_OUT Supported configuration options on channel group Probe_1: probe_factor: 10 (current) power_off: on (current), off
The following image represents which probe number is attributed to which ACME cape connector.
ACME supports the following global configuration options:
continuous
limit_samples
limit_time
samplerate
The first three allow to affect data acquisition by specifying a samples limit, limiting the time of sampling or acquiring data until interrupted by user.
The samplerate
option allows to specify the update interval for measurements. Setting this also affects the internal update interval of the ina226/tmp435 chips. The samplerate argument is given in Hz and the accepted range for ACME is 1-500 Hz:
# sigrok-cli --driver=baylibre-acme --samples=3 --channels=P8_TEMP_IN,P8_TEMP_OUT --config samplerate=10 FRAME-BEGIN P8_TEMP_IN: 24.500000 °C P8_TEMP_OUT: 25.813000 °C FRAME-END FRAME-BEGIN P8_TEMP_IN: 24.500000 °C P8_TEMP_OUT: 25.813000 °C FRAME-END FRAME-BEGIN P8_TEMP_IN: 24.500000 °C P8_TEMP_OUT: 25.813000 °C FRAME-END # sigrok-cli --driver=baylibre-acme --samples=3 --channels=P8_TEMP_IN,P8_TEMP_OUT --config samplerate=503 sr: baylibre-acme: Maximum sample rate is 500 Failed to set device option 'samplerate': invalid samplerate.
Naturally all standard sigrok-cli parameters work for ACME as well - e.g. –output-format
:
# sigrok-cli --driver=baylibre-acme --samples=3 --output-format=csv --channels=P8_TEMP_IN,P8_TEMP_OUT,P7_TEMP_IN,P7_TEMP_OUT ; CSV, generated by libsigrok 0.3.0 on Thu Jan 1 00:37:48 1970 ; Channels (4/10): P7_TEMP_IN, P7_TEMP_OUT, P8_TEMP_IN, P8_TEMP_OUT ; Samplerate: 10 Hz 26.000000,27.625000,24.563000,25.688000 26.000000,27.625000,24.563000,25.688000 26.000000,27.625000,24.563000,25.688000
Power-probes use the probe_factor
option to allow to change the shunt resistor calibration value. The arguments is the desired resistance in mOhms:
# sigrok-cli --driver=baylibre-acme --channel-group=Probe_1 --config probe_factor=80 --set # sigrok-cli --driver=baylibre-acme --channel-group=Probe_1 --get probe_factor 80
As the shunt resistor value depends on the expected current range to be measured, ACME power probes have been populated with different shunt resistor values:
Unfortunately there is no automatic detection mechanism available in revision 1. It is easily scriptable though using sigrok-cli.
Additionally USB- and jack-probes are equipped with a power-switch allowing to remotely cut/restore the power to the measured device. This can be triggered by the power_off
config option:
# sigrok-cli --driver=baylibre-acme --channel-group=Probe_1 --config power_off=true --set # sigrok-cli --driver=baylibre-acme --channel-group=Probe_1 --get power_off true # sigrok-cli --driver=baylibre-acme --channel-group=Probe_1 --config power_off=false --set # sigrok-cli --driver=baylibre-acme --channel-group=Probe_1 --get power_off false
All the above options are advertised by libsigrok to all types of front-ends. PulseView for instance interprets them and displays proper widgets in the device configuration pop-up, so they're available in the GUI as well.
The main limitation is that currently there is no way for libsigrok to send its data over the network, so both pulseview and sigrok-cli must be used locally on the BeagleBone Black. In case of sigrok-cli it isn't such a problem - it suffices to just use ssh/telnet/serial port to access the console, but in order to use pulseview you need either a monitor connected to the BeagleBone Black HDMI port or vncviewer and an X-server using a virtual frame buffer. And of course a minimal window manager.
The following features are currently being worked on and should be available in upstream sigrok soon:
The integration of the IIO driver into sigrok is Work In Progress. This is done in the form of a “generic-iio” driver that maps the IIO ontology for industrial devices/scan_elements into the Sigrok ontology for hardware monitoring channel-groups/channels.
This integration of IIO also makes possible to remotely connect to the ACME using its IP address with the traditional “conn” driver option.
Example:
$> sigrok-cli --driver generic-iio:conn=$ACME_IP --samples 3
For more information pertaining to IIO with acme, see this section
A sample applet is available to record the power-data and generate basic statistics. Please refer to https://github.com/BayLibre/iio-capture
in the example folder of libiio, you will find a small application called iio-monitor, that can come in handy to display real-time values install libcdk5-dev, and build it!
Please send all bug reports and feature requests to acme@baylibre.com or directly to sigrok or buildroot mailing lists for sigrok and buildroot related problems with ACME.
Legacy software for ACME is deprecated and no longer supported. If you really need some features, which are not yet available in sigrok, please refer to the legacy manual.