Merging modern software development with electrons and metal
Random header image... Refresh for more!

BeagleBone Black: Great Control Potential for $45

The BeagleBone Black is out, and many are comparing it to the Raspberry Pi (RPi) and Arduino.  Compared to the previous BeagleBone, the major changes are the price ($45, down from $90), a HMDI output,  more speed (1Ghz vs 720MHz),  more memory (512MB DDR3L instead of 256MB DDR2) and 2G on-board eMMC flash memory.  The BeagleBone Black also has a 100BaseT Ethernet port, a USB 2.0 HS host port, a USB 2.0 client (device) port, and a microSD slot.

If you just want a little Linux box for learning and compact computing tasks, the BB-B is just a little more than the RPi: a little more expensive ($45 vs $25/$35), a little faster (1GHz vs 700MHz), a little more flash (2G eMMC vs nothing) — and a lot less popular (by volume, the RPi has outsold by BeagleBoard + BeagleBone by at least 10:1, although that probably will change now with the Black’s lower price).

But the BeagleBone’s great potential is as a controller, not a RPi clone, since it has excellent digital peripherals (better than many microcontrollers)  available on its 2 46-pin connectors.

This Bone isn’t perfect.  I really wish the new Bone had 1G Ethernet (since it has 1G MACs) instead of 100M Ethernet.  Since the BeagleBone’s pins are heavily multiplexed, you can’t use all the peripherals at the same time.  Some expansion pins are also used by the system (e.g. one of the I2C channesl must be shared with the cape ID memory).   (11/1/2013 – from following the BeagleBone group, I’d say pin conflicts can be a big issue, though it’s far to note this is true on most embedded processors.  Also, note that the only potentially shareable cape pins are the “bus” pins such as I2C and SPI).

So what’s available on the expansion connectors?

Expansion Communications

  • 1 McASP buffered serial port (e.g. for audio devices)
  • 2 SPI ports
  • 2 I2C ports
  • 4 UART ports
  • 2 CAN ports

Memory and Parallel Bus

  • 2 MMC channels (the BB-Black uses one of these for its eMMC memory).
  • GPMC (General Purpose Memory Controller, a 100 MHz 16-bit external bus)

Timers and DIO

  • 4 Timers
  • 2 eCAP (enhanced capture) units
  • Up to 66 GPIO (general purpose I/O)

Analog

  • 7 Multiplexed 1.8V analog inputs going to a 100KHz 12-bit ADC (the eighth channel is used by the system).

Motion Control Peripherals

  • 3 HRPWM (high resolution PWM) systems with 6 outputs.
  • 3 eQEPs (enhanced quadrature encoder inputs, used with incremental encoders).

At a glance, I’d say TI has “borrowed” theF28xHRPWM, eQEP, and eCAP peripherals for various other chips, including the Sitara chip used in the BeagleBone.  The F28x DSPs have a good selection of motion control software available from TI, such as the various InstaSPIN libraries and controlSuite.  TI has ported some of their motion control software to the Stellaris and Hercules lines, but not to the Sitara.  It’d be great if they did, but not even TI has infinite resources, and the payback probably isn’t there; after all, the volume motor control market is in stuff like cars and clothes washers, and those guys aren’t going to replace a $3 DSP with a $15+ Sitara module (MPU, DRAM, flash, etc).

PRUSS (Programmable Realtime Unit Sub-System)

I’ve always been intrigued by programmable co-processors, going back to the days of the Freescale (Motorola) MC68332, which has a TPU (Timing Processing Unit).  I’m pretty sure the TPU was mainly used in high volume applications (not by many hobbyists), although Circuit Cellar Ink did run a series on programming it.  The MC68332 was used for motion control in several Galil controllers.

TPUs and improved TPUs were also used in a variety of ColdFire and PowerPC microcontrollers.  Freescale also developed a communications co-processor, the QUICC Engine, which was used in a variety of PowerPC MCUs such as the MPC8360.  Recently, I think Freescale has moved away from co-processors, possibly due to the increased speed of MCUs.  For example, none of the QorIQ PowerPC chips have the QUICC Engine.

TI has used similar co-processors before, such as the HET (High End Timer), NHET, and N2HET on many Hercules safety MCUs, the CLA (Control Law Accelerator) on some C28x DSPs, and the original PRUSS on earlier Sitara MCUs.

The BeagleBone’s unit is officially called the PRU-ICSS (Programmable Realtime Unit – Industrial Communications SubSystem); it’s easy to see why, since peripherals include 1 12Mbps UART (perfect for Profibus), 2 Ethernet MII’s, 1 MDIO, and 1 eCAP.  TI provides drivers using the PRU-ICSS for real time industrial networks such as Profibus, EtherCAT, and Ethernet PowerLink.

The PRU-ICSS has two 32-bit processors inside that run at 200 MHz, with each instruction taking one cycle, so it’s great for deterministic tasks, especially if the BeagleBone is running a non-real time OS.  TI has released PRU development tools, and a Linux driver.

I think the PRU-ICSS can be used for a lot of things that it wasn’t designed for, and open source is already making a difference.  For example, there’s the PyPRUSS software.  The PRU is already being used for stepper control by BeBoPr and Replicape capes.  Another possible PRU use is producing precise, high speed digital waveforms for test.

5/23/2013: some additional PRU notes: according to a g+ discussion by Charles Steinkuehler, the GPIO logic can only be updated every 40nS, which limits its maximum GPIO frequency.  Also, there’s a good BBB PRU overview and getting started guide here11/1/2013: I’ve seen various discussion on how fast the PRU can toggle, so do your own research first if you need ultra-fast bit toggling.

5/28/2013: here’s another creative use of the PRU: interface to a serial mode LCD.

Capes

BeagleBone capes are similar to Arduino shields: they’re boards that stack onto the BeagleBone’s expansion bus.  Theoretically, you can use up to 4 capes at one time, but the practical limit is typically much less, since the expansion pins have many different uses, and if the capes fight over the pins, the result won’t be pretty.

Capes currently available or available soon include RS232, RS485, Profibus, 1-wire, CAN (with driver and connector), prototyping area,  stepper motor drivers, camera, WiFi, LCD touchscreens, and FPGAs.  The variety of capes make it that much easier to create a one-off BeagleBone system to perform a specific task.  Most capes cost more than the BeagleBone Black.

Operating Systems

Operating system support includes several Linux variants (including the  Xenomai real time framework for Linux), Android, Minix3 (port in progress), several commercial RTOS’s (at least QNX, Integrity, Nucleus+), SYS/BIOS, and the no-OS StarterWare.

Linux adds a lot of power, but it also adds a lot of complexity, especially when all you want to do is simple I/O.  To make the BeagleBone easier to use, the BeagleBoard folks have produce Bonescript, a node.js based language featuring Arduino-style functions.  Bonescript can run in a brower or in the Cloud9 IDE.

TI has realized that not everyone wants or needs a OS, so TI created StarterWare.  StarterWare components include peripheral drivers, the IwIP TCP/IP stack, MMC/SD drivers, and simple graphics borrowed from StellarisWare.

StarterWare can also be combined with an OS; TI’s SYS/BIOS combines StarterWare with a RTOS, and is used by the real time Ethernet drivers for the Sitara AM3359-based ICE (Industrial Communications Engine).  Since the BeagleBone uses a similar CPU (AM3358 or AM3359), it should be easy to get the Sitara SYS/BIOS working (although the EtherCAT client won’t work on a AM3358).

The BeagleBone’s Place In The Linux World

There are other ultra low cost (<$50) Linux boards, including the aforementioned Raspberry Pi, the OLinuXino ($30-$80), the Aria G25 SOM, the Cosmic board (based on the intriguing Freescale Vybrid SoC) and possibly others.  If you just want to run Linux, and maybe use some I2C, SPI, or UART ports, all will do the job.

The i.MX233 and Allwinner A13-based OLinuXino’s have two big advantages: they’re easier to use in your own design because they do not use any BGA chips (which are unaffordable to assemble in small quantities), and the schematics are in Eagle PCB (which is much more affordable than Allegro which is used by the BeagleBone).

The BeagleBone’s big advantages are its peripherals (especially the PRUSS, GPMC, HRPWM, and eQEPs, which give it a big edge in control applications) and its expanding cape ecosystem, which make it easier to get something built without doing a lot of custom design.  It really is a kind of Raspberry-Duino.

Beagle CNC

The BeagleBone is a natural for CNC with its networking, fast CPU, PRU-ICSS, PWMs, and QEPs.  Here are some BeageBone CNC resources:

The BeagleBone’s Place In The Embedded World

All of the ultra low cost Linux boards provide a lot of bang for the buck.  For example, the BeagleBone Black versus the Arduino Due (~$50) looks like no contest: 1GHz vs 84MHz, 512M DRAM vs 96K SRAM, 2G flash vs 512K flash.  The Due has better analog I/O, but the ‘Bone has better digital I/O, Ethernet, high speed USB, and more.

Arduinos are still going to be around because of its extensive ecosystem and ease of use.  Heck, BASIC Stamps are still around.  For example, my nephew is getting an Arduino because of its simplicity, the size of Arduino ecosystem (it’s so easy for him to find examples), and because he’s not ready to benefit from the BeagleBone’s extra features.

Custom PCBs with microcontrollers aren’t going anywhere, either.  Think about the challenges in fitting a RPi or BeagleBone into a case that fits your product, but still provide access to all of the connectors…  And, if you don’t need the extra compute power, these little Linux boards still add cost, complexity, size, and power compared to a single chip microcontroller.

I think BeagleBone could use an easy to hack, close to the metal solution such as a straight port of eLua, or a “eLua-JIT” port consisting of the LuaJIT Just-in-Time Lua compiler, libraries similar to eLua’s, resting on the base of StarterWare or maybe SYS/BIOS + StarterWare.

I think the BeagleBone is similar to the PC: frequently used in embedded applications because they provide great price/performance, and rapid development because there’s lots of hardware, software, and documentation available.  Similarly, the BeagleBone might cost more than a full custom solution, but for one-off or small volume projects can provide a much quicker solution with its software (Linux, Android, etc) and available capes.  (To be fair, the Arduino already provides a similar environment for rapid prototyping).

My verdict: next time I order from Mouser/Digikey/Newark, I’ll be adding a BeagleBone Black; my next challenge will be finding time to play with it…

P.S. – After I wrote all of this, I realized that most of my post also applies to the original BeagleBone — except the Black’s price is 50% lower, and that makes all the difference in the world.  Last year, if I had needed a little Linux controller board, I would have seriously considered the RPi over the BeagleBone; now, using the Black is the obvious choice for me.

P.P.S. 11/1/2013 – I’ve done some more updating.

2 comments

1 Ben GRAS { 05.08.13 at 12:11 pm }

Hey, thanks for mentioning Minix! I happened to come across your post googling for some BBB specs and it’s a pleasant surprise seeing that you’ve noticed we are working on a port!

2 Tony { 05.08.13 at 4:22 pm }

Ben, thanks for your feedback. I actually saw the Minix port in the BeagleBoard.org feed, but didn’t forget when I was doing my probably-too-extensive research for this post. I’ve always been intrigued by microkernel and real time operating systems (that’s one reason I have a Playbook tablet, since it’s based on QNX), and I wonder how hard it would be to port the real time Minix variants to the BBB (B3? B-cubed?).
–Tony

Leave a Comment