Assessing BeableBone Black capabilities

Hi,

My name is Fisher, I’m doing a Masters in control system research and need to choose a controller board for my project.

It will control a 6 wheel car (wild thumper) to keep a rod (inverted pendulum) upright.

I am looking to understand the BBB in more detail to know if I should consider it or not.

I will be using the controller board with Simulink from Mathworks in the same way it can be used with RPi or Arduino. I hope to control the 6 motors with PWM, read a few voltages with ADC, may be use some I2C and SPI etc.

The BBB may be a strong choice for me if I can use the 2 x IO processors to do realtime stuff while the CPU does other things.

I have a few questions, mainly how its used/programmed compared to the Raspberry Pi as they can both run Debian Linux.

  • Are there BBB python libraries for general things like PWM, ADC, I2C and other general IO like in RPi?
  • How different is the BBB to use and program to RPi?
  • The BBB seems to have 2 x IO processors in its PRU-ICSS, I think they are 200MHz each, how easy is it to use them for inputs, outputs and calculations separate from the CPU? Is there a kernel module?
  • The PRU-ICSS does not really seem to be documented except for in a GIT project, the documents there seem to have info from Texas instruments (who make the CPU) but not official. Is this subsystem used by others? How?
  • PWM seems to be 2 types: hi and low resolution, 3 of each to make 6 in total. The hi seems to have 2 outputs per unit, can they have separate duty cycles? I would like to control 6 separate motors.
  • The BBB seems to have an 8 channel, 12 bit ADC
  • Are any issues with the board such as can’t use certain IO’s at the same time, such as using 6 PWM outputs with 2 ADC, I2C or SPI?
    Here is the GIT project for the PRU that I have found, Ti seems to refer to it as well, I think in a forum of theirs.

https://github.com/beagleboard/am335x_pru_package

To my knowledge, the BBB has:

  • 1GHz ARM v8 32 bit CPU from Ti

  • 3D GPU with max 720p through HDMI

  • 2 x IO processors in the PRU-ICSS

  • 3 hi resolution PWM (eHRPWM)

  • 3 low resolution PWM (eCAP)

  • Some quadrature encoder inputs

I appreciate any input from anyone.

Thanks,

Fisher

Hello Fisher!

A lot of questions …

The eHRPWM modules use a 16 bit counter (max. resolution 17 bit in up-down mode). Each A output has extended time resolution capability, while the B output only has conventional PWM capabilities.

The eCAP modules use a 32 bit counter. (AFAIR just one header pin is connected.)

There’re 3 eQEP modules.

There’s an 8 channel ADC in the CPU, but the last channel (AIN7) is not connected to a header pin (instead it measures the board voltage). So 12 bit / 7 channel ADC is available.

Find some inspiration on using the PRUSS in my project libpruio. Here’s a direct link to the online-documentation.

Good luck for your project.

Sorry, I’ve to correct myself:

There’re two eCAP pins connected:

  • eCAP0 = P9_42 mode 4

  • eCAP2 = P9_28 mode 0 (also pr1_ecap0, the PRUSS eCAP module in mode 3)

Hello Fisher. TJF gave some good answers. I’d also add that:

Are there BBB python libraries for general things like PWM, ADC, I2C and other general IO like in RPi?
-Adafruit_BBIO is really good and well-supported

How different is the BBB to use and program to RPi?
-Since they both run linux, in general programming them is the same. The BBB uses the Device Tree/Cape Manager system which can make the initial learning curve a little steep… not sure if the RPi uses Device Tree by default.

The BBB seems to have 2 x IO processors in its PRU-ICSS, I think they are 200MHz each, how easy is it to use them for inputs, outputs and calculations separate from the CPU? Is there a kernel module?
-Once you get the workflow set up, it’s pretty straightforward to use them for IO. The main processor is probably better suited for calculations.

The PRU-ICSS does not really seem to be documented except for in a GIT project, the documents there seem to have info from Texas instruments (who make the CPU) but not official. Is this subsystem used by others? How?
-I’ve seen it used for 3D print motion and heater control, CNC motion control, etc. Knowing that most instructions take 5ns gives you extremely precise timing… you can have your own high-resolution timers, generate PWM, generate audio waveforms, decode video signals, sample sensors, etc… the sky really is the limit. You can share memory with the main processor and do complex computational tasks(eg computer vision) while having realtime IO. All the information is available online, but it’s all scattered which makes the learning curve pretty steep. I’m working on a beginner’s guide to the PRU based on my own learning experience to hopefully make it easier to get started.

PWM seems to be 2 types: hi and low resolution, 3 of each to make 6 in total. The hi seems to have 2 outputs per unit, can they have separate duty cycles? I would like to control 6 separate motors.
-TJF answered this. I’d add that you can also generate your own high-resolution PWM using the handy PRU-ICSS.

Thanks TJF and Mechael,

Thank you very much for your input, yes, I’m asking lots of questions because the board I will choose, I will use for maybe the next 3 or more years and it may also be used for other projects at the university.

Sorry, I have a few more questions, hopefully I can clear up the main things and make my choice.

Thankfully there seem to be more options for powerful mainstream hobby boards (starting with the Pi, now the Beagle boards and Cubie etc), so I’m trying to understand the differences, are there any more boards I should be considering?. I’m hoping to clear some things up so I can finish my comparison report, it might be nice to have a comparison wiki for it to be easier to see the differences and people can more easier choose a board that suits their project.

There is a wikipedia page that is detailed for certain things, not for others and not all filled in, but a good start:
http://en.wikipedia.org/wiki/Comparison_of_single-board_computers

For the PWM, I read that the hi resolution (eHRPWM) can do 2 outputs, can I control 2 motors with one eHRPWM unit?

TJF, what do you mean about different modes when you referred to PWM? Is this to do with multiplexing pins/ports or PWM function modes for either the eCAP or eHRPWM units? Are there modes for other features besides PWM?

I have found 2 pages which state that the board has 8 PWM outputs, though on the BeagleBone page, I see 14 pins, most are A and B outputs of the HRPWM units, can they all do individual PWM outputs? How can I work out how many motors I can separately control? Would be very nice if I can individually control 2 motors for each HRPWM unit (maybe same frequency but different duty cycles for A and B pins).
http://beagleboard.org/Support/bone101

http://section9.choamco.com/2012/07/beagleboard-vs-beagleboard-xm-beaglebone-vs-raspberry-pi/

7 ADC channels should be more than enough for me, nice that they are 12 bit, what max sample rate can be used? The AM355x Ti datasheet states that the ADC can do 200 thousand samples a second, is this correct?

I get the feeling that certain features of the chip have not been implemented in software, is the PRU the only one or are there others? What other items need implementing or improving? I have read about someone complaining that the PWM under usual circumstances is limited to 100Hz due to a kernel bug.
http://stackoverflow.com/questions/23050738/beaglebone-pwm-limited-to-100-hz

I read some people complaining about the Anstrom distro that comes installed, I also read on the elinux.org BBB page that the BBB project will move over from Angstrom to Debian, is Debian or Ubuntu fully functional? What do most people use?

So it seems that the PRUSS or PRU-ICSS (depending where you read what its called) may not have all its features implemented, is that correct? Have things mainly been implemented according to what the person making the code wanted it to do?

If I choose this board, my main reason may be for the PRU subsystem, I may end up contributing to projects to either fix or implement certain features. How can I easily understand what PRU features are completed and fully functional vs ones that need work or are not even implemented?

Sorry for all the questions, I have not found a page which has this information together, would be nice to feed this sort of info back to the BBB main site.

I almost didn’t hear about the 2 IO processors in the PRU because its not in the AM355x datasheet, just mentions PRU with nothing that made me realise how useful it could be.

Fisher

PWM

There’re 14 header pins connected to a PWM signal. But some of them connect to the same signal. (Your bike has more than 20 gears but only about 14 gear ratios.)

The CPU can generate 10 PWM signals in parallel, either by using a ePWM module (16 bit timer, A and B output) or by using an eCAP module in pwm mode (32 bit timer). Maximum speed of all modules is 100 MHz.

The CPU has 3 PWMSS devices, each with one ePWM module and one eCAP module. Additional the PRUSS device has an eCAP module. In total that’s 32 + 31 + 1 = 10 outputs. But the PRU-eCAP and the PWMSS-0.eCAP are both connected to the same header pin P9_42, so you can use maximal 9 outputs at the same time (but some of the pins are used by HDMI or mcasp0 by default).

Each module can operate at an individual frequency (but A and B output of ePWM modules work at the same frequency).

OS

Current boards are shipped with Debian OS.

PRUSS

I never read “IO processors” in the documentation. The PRUSS device is a subsystem with two processors optimized for real time tasks (which are mainly IO tasks). In BBB an optimized version is used (ARMv33xx using compiler pasm -V3 option). In this version some old features are dropped and some new are added.

The instruction set is good for simple integer data manipulation (even multiplication is supported). But it’s not good for higher tasks like floating point calculations. It’s limited to 2000 instructions (you must stop the module to load/override the instructions.)

The PRUSS has some in-build modules (as said the eCAP, but also IEP, UART, …) and direct connection to some IO pins (16 in / 15 out each - not all are connected to the header pins).

RPi & Arduino

IMHO RPi is similar to BBB (but a little slower and less complete). And the PRU subsystem is the two Arduino boards sitting on it (but with 3.3V IO).