---

Wednesday, July 31, 2013

Raspberry Pi vs. BeagleBone Black

The Raspberry Pi has some competition, in the shape of the BeagleBone Black. I thought it might be useful to compare these two boards and highlight their relative advantages.



Both boards are Linux-based single board computers about the size of a credit card. You can attach monitors, networks, keyboards and mice to both of them and both of them have GPIO connectors that allow you to attach and control external electronics. This makes them suitable for all sorts of DIY projects, from home automation to robot control.

About the Raspberry Pi

The Raspberry Pi, managed to create a huge amount of interest around the world, even before its release. The concept of a $35 computer grabbed the world's attention, and when the boards arrived, it was a long while before the backlog of orders could be satisfied.





While the project started in the UK as a platform for getting kids to learn to program, the board has been adopted around the world as a platform for hobbyists and educationalists.
There are two models of Raspberry Pi, and in this comparison I will concentrate on the more powerful model B.


About the BeagleBone Black

Historically, the BeagleBone Boards have been around for a while selling at around the $85 mark. BeagleBone has its roots in Texas Instruments. These boards have always been popular as a high-end alternative to an Arduino. They are great for those situations where you need to attach a screen or need some serious processing power. However, the arrival of the BeagleBone Black with a price tag of $45 puts these boards in direct competition with the Raspberry Pi. I am not sure why anyone would buy any model of BeagleBone except the BeagleBone Black, as the regular BeagleBone costs almost twice as much for an almost identical board.




Features

Lets start comparing some of the features of these two boards.

Operating System

Both devices have a number distributions available for them. The Raspberry Pi models do NOT come with an operating system. You must either buy a blank SD card (4 GB or more) and install your own disk image onto it using one of many tools available to do this from your PC, Mac or Linux box.

The 'standard' and most used distribution for Raspberry Pi is 'Raspbian' which is based on Debian. There are also many other distributions, including single purpose distributions for making a media center with XBMC. Adafruit also have their own distribution 'Occidentalis' that is based on Raspbian, but is aimed squarely at Makers wishing to interface hardware to the device.

You can also buy an SD card with an operating system already installed on it. This is probably a good idea if you are new to the Raspberry Pi.

On the other hand, the BeagleBone Black has on-board flash storage, with  Ångström Linux pre-installed, making it fully ready to go, straight from the box. 

Ångström Linux is not a particularly popular distribution, and the makers of the BeagleBone Black also provide a micro-SD card slot on the underside of the board, which can be used either to boot directly onto an operating system installed on a micro SD card, or with the press of a button, to upload a disk image from the micro SD card directly into the 2 GB on-board storage. 

Ångström is fast and small and will allow the BeagleBone Black to boot and establish a network connection in about 10 seconds, compared with 20 or 30 seconds for a Raspberry Pi running Raspbian. 

I have only used Ångström on the BeagleBone Black, but its website indicates that amongst others, Android and Ubuntu are also available.

The Raspberry Pi has made the most of its head start and the community has produced a reliable and well featured distribution in Raspbian, allowing plug and play simplicity even for things like USB WiFi adaptors. No doubt BeagleBone will soon catch up.


Processor and Memory

Both boards have more than enough power for use as an embedded controller and almost enough power to make a useable stand-alone Linux computer. They both use ARM processors:

The Raspberry Pi has a 700 MHz processor and the BeagleBone Black 1 GHz.
Both boards have 512 MB of RAM
Both boards have 3D graphics acceleration and floating point hardware support


Connectors

Both boards have good video capability and can connect to an HDMI monitor or TV. The Raspberry Pi has a full size HDMI socket, while the BeagleBone Black has a micro HDMI connector that requires an adaptor (only a few dollars). These adaptors are the same as those used to connect a smart phone or tablet with HDMI output.

The Raspberry Pi also has a Composite Video output on the yellow RCA socket. This allow it to be connected to the type of small 12V monitors intended for CCTV use. 

The Raspberry Pi has two USB ports, where the BeagleBone Black has just one. The Raspberry Pi also has a separate audio output jack and a cable connector to which an optional camera module can be attached.


GPIO

GPIO (General Purpose Input Output) refers to the double row of pins on the Raspberry Pi and the two double rows of sockets down each side of the BeagleBone Black. 

If you are using the device as a general purpose low-power Linux computer, then you probably do not care about the GPIO features, but if your attraction to these boards is that you want to connect them to external electronics then these are important.

Physically, the pins of the Raspberry Pi as opposed to the sockets of the BeagleBone Black make the Pi susceptible to destruction simply by a misplaced screwdriver or wire shorting two pins together. While you can still destroy the BeagleBone Black with a jumper wire, it is that bit harder.

The BeagleBone Black also wins hands down in terms of sheer numbers of GPIO pins (over 70 compared with 17 on the Raspberry Pi). Although, depending on what else is going on with the boards, in both cases not all the pins are always available.

A bit advantage of the BeagleBone Black is that it also has 7 analog inputs, making it much easier to connect sensors. The Raspberry Pi has none and requires an extra analog to digital convertor chip to read analog sensors.

You can find details of the BeagleBone Back connectors here and the Raspberry Pi here.



Expansion Boards

The Raspberry Pi has an ever growing range of expansion boards that plug into the GPIO socket and provide other features. Of these, the PiFace is probably most popular.


This board is rugged and intended to compliment the Raspberry Pi's original goal of being an educational tool. By covering up the vulnerable GPIO pins and buffering the inputs and outputs, it goes a long way towards making the Raspberry Pi suitable for classroom experimentation.

There are many other boards available and I do not wish to create a list here that will immediately go out of date. So use your favourite search engine. I cannot however resist the temptation to plug a board of my design, the RaspiRobot Board. Designed for controlling motors.

The BeagleBone Black has a range of expansion boards (called capes) that stem back from the pre-Black era of BeagleBone. You will get a flavour of the wide range of capes available here: http://circuitco.com/support/index.php?title=BeagleBone_Capes 

These boards are not cheap but in the future there are likely to be many low cost community produced Open Source Hardware boards along the same lines as the Arduino community has created.


Power Consumption

Rather than take the manufacturer's word for power consumption, I tested my own Raspberry Pi and BEagleBone Black boards using my trusty lab power supply. Neither board had any extras plugged in. Both are powered from 5V and both were left for a minute or two to settle down before the current was noted.

Raspberry Pi: 320 mA
BeagleBone Black: 220 mA



Programming

The Raspberry Pi was intended to be used as a tool for kids to learn programming. The Raspbian distribution includes Python (2 and 3) as well as Scratch, the visual programming environment and of course C / C++. Indeed the name 'Pi' is a reference to the language 'Python'. There are many useful resources available to get you programming the Pi and libraries for using the GPIO facilities. I would humbly suggest that you might find my book 'Programming Raspberry Pi' useful in this respect. Python is likely to be the first choice for new programmers. I think its a good first programming language. You can edit using the rudimentary IDLE Python development environment or just the 'nano' editor.



You can program the BeagleBone Black in Python. Indeed Python and 'nano' are included in the Ångström distribution. There is also a library for accessing the GPIO features, that will be very familiar to Raspberry Pi users. However, there is another interesting alternative.

One of the things that most impressed me about the BeagleBone Black is the getting started experience. Let me explain why.

When you take the BeagleBone Black out of its box and plug it into your computer with the supplied USB cable. This both powers the BeagleBone Black and provides a virtual network connection to the BeagleBone Black. You need to install some drivers but 10 seconds after you have plugged it in, you can open a browser on your computer to it, where you can do pretty much anything you want, including programming it using a web IDE called Cloud 9 that runs as a web server on the BeagleBone Black on port 3000.



I like this a lot!

The language used here is Bonescript, which is a kind of Javascript, with hooks in for use of GPIO. I have not had chance to give this a really good run (watch this space) as I have been concentrating on programming the board with with Python.

As an alternative to Cloud 9, both the Raspberry Pi and BeagleBone Black can run WebIDE to give a similar approach, but Python capable. 

Price

These prices are correct as of July 31, 2013 taken from the MCM website.

The Raspberry Pi model B is $35, but you will not be able to do anything with it without a 4GB SD card and either an external micro USB power supply or USB lead to power it from your computer, which, taken together will probably bring the price up to something close to the cost of a BeagleBone Black. 

However, if you can live with half the memory and only one USB port and no Ethernet, then the Raspberry Pi model A is just $25!

The BeagleBone Black is $45, but the only other thing that you might need to get started would be a micro HDMI to full-size HDMI adaptor which will cost you about $5. But if you are happy to connect to it from your computer with the USB lead supplied, then you do not need a single other thing.



Conclusion

In my opinion, the Raspberry Pi is better as a general purpose computer and has more maturity and the more active community, simply by virtue of being the more mature product.

The BeagleBone Black, has far superior GPIO capabilities including analog inputs. And, yes,  in theory it can do everything a Raspberry Pi can do and more. But the gap between theoretical possibility and reality is in the process of closing as the product matures.

The BeagleBone Black is American Pi and I for one am very impressed.



About the Author
These are my books. Click on the image below to find out more about them.



6 comments:

Steve G0XAR said...

Simon,

Thanks for an interesting and informative review. I have both the Pi model B and the Beagle bone black. In your review you say that the BBB comes with an SD card....mine did not, but it did come with a slot for one.

I like your Python book very much. I used to be a professional programmer/designer, now I do it for fun. I often get asked to recommend books for beginners. No hesitation in recommending your Python book.

Simon Monk said...

Thanks Steve. I meant to say the BBB comes with a micro SD card slot, not an actual card. I have edited the text now.

Anonymous said...

yes, nice review, thanks

bleeding gums said...

hi simon

great blog here. found your blog when searching for which platform to use.

i'm looking at a processor to deserialize some data (for now) and eventually talk to the pc for streaming audio via the usb port, but this is the later part.

i have used and liked arduino but dont think it is suitable at data speeds of 5+mhz, hence i have looked at fpga etc.

but prices of raspberry and beaglebone make me wonder why bother with fpga!

so in your opinion, what would be a better route for me?

thx!

yeo

Unknown said...

What if you're brand new to electronics, then which is the best choice? Also, do you have any recommendations on what I should start educating myself with? I'm interested in the bbb. Thanks for any responses.

Unknown said...

What if you're brand new to electronics, then which is the best choice? Also, do you have any recommendations on what I should start educating myself with? I'm interested in the bbb. Thanks for any responses.