Wednesday, October 24, 2012

Arduino Uno vs BeagleBone vs Raspberry Pi



This is a post specifically aimed at our budding Makers out there.
We like to build stuff here at Digital Diner.  There is always some sort of project going on.  These days, most of our projects include some sort of digital component - a microprocessor.  If you haven't gotten bitten by the Maker bug yet, we strongly encourage it.  It can be incredibly rewarding.  If you have even a minimal understanding of programming, there are websites, platforms and tools to help you develop your skills to the point where you actually create a hardware device with buttons, knobs and servos - a real physical world gadget.  Software is fun, but when you can make your project physical it is even better.  

There are so many great platforms for creating digitally enabled devices that its gotten hard to figure out which one to use.  For example, we are currently building a hydroponic garden project and had to choose a controller to run the pumps, read the sensors etc.  We were surprised at the number of choices that were available to us.  It can be a little confusing for the beginner.  To help, we've taken three of the popular models and compared them so that you can choose the right tool for your next project.  Spoiler: we recommend all three.

The three models (all of which we use here at Digital Diner) are the Arduino, Raspberry Pi and BeagleBone.  We chose these three because they are all readily available, affordable, about the same size (just larger than 2" x 3") and can all be used for creating wonderful digital gadgets.  Before we get to the comparison, here is a brief introduction to each one.  

Arduino Uno
The Arduino Uno is a staple for the Maker community.  Arduinos come in various sizes and flavors, but we chose the Arduino Uno as an example of the prototypical Arduino.  It has an easy to use development environment, an avid user base and is designed to be easy to interface all sorts of hardware to.

Raspberry Pi
The Raspberry Pi is the newcomer to the game.  It isn't really an embedded computer.  It is actually a very inexpensive full-on desktop computer.  It is barebones, but at $35 for a real computer, its worthy of note, and it is a great platform for lots of Maker projects.

BeagleBone
The BeagleBone is the perhaps the least known of these platforms, but an incredibly capable board worthy of consideration for many projects.  It is a powerful Linux computer that fits inside an Altoid's mint container.



All three boards features that make them valuable to the hobbyist.  Below is a chart I put together outlining the features of the three for comparison.  If you aren't familiar with what all these mean, that is fine.  However, there are a few differences that make each of these gadgets shine in their own types of applications.


First, the Arduino and Raspberry Pi and very inexpensive at under $40.  The BeagleBone comes in at nearly the cost of three Arduino Unos.  Also worthy of note is that the clock speed on the Arduino is about 40 times slower than the other two and it has 128,000 (!) times less RAM.  Already, you can see the differences starting to come out.  The Arduino and Raspberry Pi are inexpensive and the Raspberry Pi and BeagleBone are much more powerful.  Seems like the Raspberry Pi is looking really good at this point, however, it's never that simple.  First, its price isn't quite as good as it seems because to run the Raspberry Pi you need to supply your own SD Card which will run you another $5-10 in cost.

Also, despite the clock speed similarities, in our tests the BeagleBone ran about twice as fast as the Raspberry Pi.  And perhaps most counterintuitive, the Arduino was right in the mix as far as performance goes as well, at least for a beginner.  The reason for this is that the Raspberry Pi and BeagleBone both run the Linux operating system.  This fancy software makes these systems into tiny computers which are capable of running multiple programs at the same time and being programmed in many different languages.  The Arduino is very simple in design.  It can run one program at a time and it programmed in low level C++.

An interesting feature of the BeagleBone and the Raspberry Pi is that they run off of a flash memory card (SD Card in the case of Raspberry Pi and MicroSD Card in the case of BeagleBone).  What this means is that you can give these boards a brain transplant just by swapping the memory card.  You can have multiple configurations and setups on different cards and when you swap cards, you'll be right where you left off with that particular project.  Since both of these boards are fairly sophisticated, it even means that you can easily change operating systems just by creating different cards to swap in.


So why would you choose one platform over the other?

For the beginner, we recommend the Arduino.  It has the largest community of users, the most tutorials and sample projects and is simplest to interface to external hardware.  There are more ways to learn about Arduino for beginners than you can shake a soldering iron at.  The boards are designed to easily interface with a wide variety of sensors and effectors without and external circuitry, so you don't need to know much about electronics at all to get started.  If you haven't played with these before, get one (they're inexpensive) and try it.  It can be a really great experience.

For applications minimizing size we recommend the Arduino.
Arduino Uno

BeagleBone
Raspberry Pi
All three devices are similar in size, although the Raspberry Pi SD Memory card sticks out a bit making it slightly larger overall.  There are so many different flavors of Arduinos it is ridiculous.  Basically, what makes an Arduino an Arduino is a particular microprocessor and a little bit of software.  It uses a very small, inexpensive, embedded system on a chip microprocessor from a company named Atmel.  For advanced projects that need to be really small, you can buy these chips for a dollar or two and put the Arduino bootloader (a program that makes the Arduino give the Arduino its basic functions) on the chip and viola, you have an Arduino.  We have done this for a few projects and it can make for a very tiny little gadget when you don't even have a circuit board.
A variety of different Arduino sizes and form factors


The BeagleBone beside its big brother the BeagleBoard
The BeagleBoard has a larger and more powerful big brother, the BeagleBoard, so if you may need to scale up, the BeagleBone is a good choice.


Side view of the Arduino Uno, BeagleBone and Raspberry Pi
Note the Ethernet ports on the BeagleBone and Raspberry Pi
For applications that connect to the internet we recommend the BeagleBone or Raspberry Pi. Both these devices are real linux computers.  They both include Ethernet interfaces and USB, so you can connect them to the network relatively painlessly.  Via USB, you can connect them to wireless modules that let them connect to the internet without wires.  Also, the Linux operating system has many components built-in that provide rather advanced networking capabilities.
A very small USB WiFi adapter plugs right in to the BeagleBone or Raspberry Pi ,
and the Linux operating system can support these types of devices 

The Arduino supports plug-in peripherals called "shields" that include the ability to connect to Ethernet, but the access to the networking functions is fairly limited.  Plus by the time you buy the Ethernet shield you might as well just get one of the more advanced boards.

For applications that interface to external sensors we recommend the Arduino and the BeagleBone.  The Arduino makes it the easiest of any of the boards to interface to external sensors.  There are different versions of the board that operate at different voltages (3.3v vs 5v) to make it easier to connect to external devices.  The BeagleBone only operates with 3.3v devices and will require a resistor or other external circuitry to interface to some devices.  Both the Arduino and BeagleBone have analog to digital interfaces that let you easily connect components that output varying voltages.  The BeagleBone has slightly higher resolution analog to digital converters which can be useful for more demanding applications.
With that said, it is important note that many things that you would want to connect to, including little sensors, have digital interfaces called I2C or SPI.  All three boards support these types of devices and can talk to them fairly easily.

For battery powered applications, we recommend the Arduino.  The Arduino uses the least power of the bunch, although, in terms of computer power per watt, the BeagleBone is the clear winner.  However, the Arduino has an edge here since it can work with a wide range of input voltages.  This allows it to run from a variety of different types of batteries and keep working as the battery loses juice.

Screen shot from the Raspberry Pi
With a screen, keyboard and mouse, its a full computer

For applications that use a graphical user interface, we recommend the Raspberry Pi.  The Raspberry Pi is really in a category by itself because it has an HDMI output.   That means you can plug in a mouse and keyboard and connect it directly to your TV.  At that point you have a fully functional computer with graphical user interface.  This makes the Raspberry Pi ideal for use as a low cost web browsing device of for creating kiosk-type projects where you may have a display that people interact with.  In fact, just for fun, we installed the Arduino development tools on the Raspberry Pi and we were able to write a small program and download it to an Arduino from the Raspberry Pi.  It's not a very fast computer, but it really is a computer.

BeagleBone code can be developed via a web-based development environment
On your computer you log in to a web server on the BeagleBone and write your code

Arduino Development Tools are simple and clean
You run this on your computer and then compile and download to the Arduino


Summary
The Arduino is a flexible platform with great ability to interface to most anything.  It is a great platform to learn first and perfect for many smaller projects.  The Raspberry Pi is good for projects that require a display or network connectivity.  It has incredible price/performance capabilities.

The BeagleBone is a great combination of some of the interfacing flexibility of the Arduino with the fast processor and full Linux environment of the Raspberry Pi (more so in fact).  So, for example, to monitor our hydroponic garden, we will likely use the BeagleBone since it has good input/output features and can easily connect to the network, so we can have it run a web server to make its readings available to us.

All three of these are staples of our projects here at Digital Diner.  Of course, there are other platforms out there, for example, we monitor our tomato garden using Sun SPOTs, but these three will cover most people's needs until you get fairly advanced.


Where to get them. 
These are the places that we get our supplies here at Digital Diner:
SparkFun - Arduinos and more - a great place for all electronics and Maker stuff
Jameco - Arduinos and more in the Bay area, so a great way to get things that you need today.
Cooking Hacks - Arduinos and more in Spain - similar to SparkFun but for Europe.
Adafruit - An awesome source of boards and parts
Element 14 - supplier of the Raspberry Pi in the US
DigiKey - supplier of the BeagleBone

If you've read this far, congratulations.  We hope you get started building something soon.  Please let us know if you do.



Left to right: Arduino Uno, BeagleBone, Raspberry Pi




Raspberry Pi underside
BeagleBone underside

Arduino Uno underside












17 comments:

  1. Any experience With the PandaBoard? Thoughts?

    ReplyDelete
    Replies
    1. We used the PandaBoard at a previous job for QNX development. I didn't work with it directly, but the people who did seemed to have no complaints. We had a touch screen hooked to it and used it for some serious development. It seemed quite competent.

      Delete
  2. GPIOs on BeagleBone are *66*, not 6! ADCs are 7, not 6.

    Scratch, Squeek, Python, Java, ... are all available on BeagleBone. It can run FULL LATEST UBUNTU---something you can't do on a Pi.

    Work is intermittently on-going for Arduino IDE for BeagleBone: https://github.com/prpplague/Energia.

    Adding USB cable, power supply, SD card, JTAG, serial adapter, etc. to Pi, you are way over the cost of a BeagleBone that effectively includes these (power over USB with provided cable and SD card).

    ReplyDelete
    Replies
    1. Jason,
      Thanks for the comments. Good catch on the typos/omissions in the specs. I've updated them. Although it may not show, BeagleBone is actually one of my favorite dev platforms right now. I started to work on some benchmarks and such that really showed the power of the platform, but realized I would never get this post done if I tried to get all that right.
      I still think that beginners are better off learning with the Arduino just because of the simplicity of the platform, but once you get into more complex applications with networking etc, the BeagleBone really shines.

      Delete
    2. Any word on expected launch date of Arduino IDE for BeagleBone? I'd really like to start my electronics experience with the versatility of the Bone.

      Also, are there other news on the Bone's development and upgrade schedule (i.e. a projected A7 rev)?

      Delete
  3. Thanks for the wonderful comparison .

    ReplyDelete
  4. Sorry to rain on anyones parade but, "I started to work on some benchmarks and such that really showed the power of the platform, but realized I would never get this post done if I tried to get all that right." and "I still think that beginners are better off learning with the Arduino [...]" rather seems like you didn't really care for actually providing your readers with a solid-grounded post with the necessary facts and measurements to form an opinion, but rather just wrote some stuff based on your pre-formed views.

    I do appreciate that as a maker you might not be fit for doing a "full" and proper review and comparison, but this is not really helping anyone apart from the small chart comparing features, which you should fact-check better.

    As I said, I appreciate the effort, but it is probably just confusing people more than enlighting them.

    ReplyDelete
    Replies
    1. This blog post was an extremely helpful starting point for me. I heard about Arduino and Rasberry Pi at Lifehacker and Kickstarter, and only had a vague idea of what they were until i read this post.

      Delete
  5. Sorry you didn't get a benefit from the article. As a scientist by day I recognize that even the most basic of benchmarks can be difficult and proper quantitative information is valuable only if properly gathered. We tried coming up with quantitative comparisons, but the time required to get it right (for example what is fair when comparing a Linux based platform to a directly coded Arduino? It's harder than you think) is not compatible with a blog we write as a hobby (Digital Diner is just our family blog you know). Rather than post potentially misleading information we held that back. We still hope to have more data as time permits.
    However, we did decide that our experience with these platforms could be useful for someone beginning a project. We haven't seen many articles that really help someone who is trying to pick a platform for a project. THe intent was to give heuristics for decision making. Granted, it is based on anecdotal evidence, but we never promised anything more. Our whole blog is aimed at exposing people to ideas and techniques to inspire further exploration. With that in mind I hope it is still valuable to our readers. If not, I'm very sorry. The internet is big. Enjoy the rest of it.

    ReplyDelete
  6. Roger,
    Thanks so much for your post. I have been looking all over for some basic information about these three platforms. I'll probably take your advice and go with the Arduion to start playing with and move up to the other two once I am comfortable with it. After finding this post I'll be reading your other posts to see what other fun stuff your family has been up to!

    ReplyDelete
  7. Well, I made a Segway clone with my Arduino UNO and couldn't be happier with the other projects I've made with it. That being said, it's cool to see new products with cool new options!
    Good review!!!

    Tom

    ReplyDelete
  8. Nice job Tom! We built something similar here (http://digitaldiner.blogspot.com/2012/02/two-wheeled-self-balancing-robot.html), so we know that to actually get it balancing takes a little bit of work. Congrats!

    ReplyDelete
  9. Thanks for the informative articles. I'm planning a small greenhouse for mostly vegetables and some flowers. Will have vent open/close controls, fan controls and hydroponic strawberries.Possibly solar powered eventually. Trying to determine the best way to control it all. The last time I programmed anything was with Basic or before that Fortran on punch cards so it's been a long time. Only electronic things I've built were kits many years ago as well. Looking forward to learning all this as an old man!

    ReplyDelete
  10. Thank you for the comparison and the post.
    I own Arduino Uno and Mega and BeagleBone A5, my Pi is back ordered.
    All 3 are amazing in what they can do. Once comfortable with Arduino you can move up to the little more complex Linux based BeagleBone or the Pi. All of them have excellent online support groups and tons of resources.

    ReplyDelete
  11. If you're looking for something just in between the Pi and an Arduino, I'd recommend a Netduino, or Netduino+. They have the ease of connectivity offered by the Arduino, plus very easy networking, more serial interfaces, and a lot more power. Plus, the community is very helpful, and since it uses C# there are a lot of great tutorials out there.

    http://www.netduino.com/

    ReplyDelete
  12. Thanks for posting this interesting comparison. I think you did a great job of describing the pros and cons of each of the devices. As someone else here noted, it is nice to have such a variety of choices, but that means we have to work on deciding which one to use for a given project. I appreciate your sharing your experience and opinions. I am always amazed at the people who will pick apart anything you say. I think maybe we need to have 2 Internets, one where all the perfect people can go be by themselves and one for the rest of us who are smart enough to take what we read with a grain of salt, and appreciative enough to know when someone has given their personal time to help reduce the time we have to spend doing research. Thanks again.

    ReplyDelete
  13. Very nice article.

    I use the Arduino UNO, and formerly the PIC MCU, for its real-time capabilities for accessing sensor data. I then transfer data through the USB cable to a laptop for processing by Matlab. The PI and Beagle running Linux are not real-time, even if you run programs using Nice. For example, we ran into problems controlling a fast-running stepper motor using Linux, as every so often the OS delay would cause the stepper to skip steps. In a robot arm positioning system, such lack of real-time response is a show stopper. An UNO communicating with a Linux OS would be a solution.

    ReplyDelete