In today’s article I will compare the two platforms I use the most for home automation projects: the Arduino platform, and the Raspberry Pi platform. Of course, asking which one is the best would be a much too simple question. They both have their advantages and disadvantages. Instead, I will compare the two platforms on some key points and show you in which case you should use one or the other. As in most of my articles, I included affiliate links to help you find the products I am talking about. It is also a good way to support this website, so thanks in advance if you purchase products by clicking on these links!
Setup. I will start with the most basic question of all: how easy to use are these platforms when you just received the package from your favorite supplier ? Well, for the Arduino, the setup is really easy: put the board out the box, plug a USB cable, download the software from the Arduino website, and you are good to go. The only thing you have to buy extra is a USB cable. It’s quite different for the Raspberry Pi. Even before starting it, you need a USB cable for power, an SD card for the OS, a mouse, a keyboard, an HDMI screen and cable, and finally an Ethernet cable or a Wifi dongle to connect it to the web. Of course, there are kits that you can buy that solve most of these problems. And when all of this is done, you still need to install the right operating system on the SD card so you can actually use the board. And although there are lots of tutorials around, this is not an easy operation for a novice. So the winner of this first section is clear: the Arduino platform !
Connectivity. On this website, I am talking about home automation, and this often requires your boards to be connected to a central computer that acts as the coordinator of your home automation system. Or you want a given board to be this coordinator and therefore it has to be connected to the web. In all cases, you need to build connected projects, so it is necessary that the platform you are using can be easily connected to the web. Well, the Raspberry Pi seems to have an advantage here: it has a built-in Ethernet connection, at least for the most common boards. And you can easily add Wifi connectivity by plugin in a Wifi dongle on one of the USB port. But the Arduino can also be easily connected to the web by using shields: you have an official Ethernet shield which is very well documented on the web, and you can also buy the official Wifi shield which I already presented in a previous article and used for a simple home automation project. Also, recently a GSM shield was released, which opens the door to even more exciting applications with the Arduino platforms. So for the connectivity, I declare a draw between the two platforms.
Computing power. In terms of computing power, the situation seems to be clear as well. Most of the Arduino boards are equipped with an 8-bit microcontroller from ATMEL, usually the ATmega328 which runs at 16 MHz. Of course, it cannot compete with the 700 MHz BCM2835 chip which powers the Raspberry Pi. Even one the latest board from Arduino, the Arduino Due, can’t compete with the Pi with its 84 MHz SAM3X8E chip. So if it is computing power you are looking for, there is one clear winner: the Raspberry Pi platform.
Inputs/Outputs. This is nearly an easy one. The Raspberry Pi has some decent inputs and outputs of course, via the GPIO connector, and supports the I2C and SPI interfaces, but these are all digital connectors. On the other hand, the Arduino Uno board for example has digital inputs/outputs, but also PWM outputs, analog inputs, and I2C and SPI interfaces. Plus, some recents boards like the Arduino Due also have analog outputs, which allows you the play sounds directly from the Arduino board. Of course, you can easily get analog inputs on the Raspberry Pi by using Analog-to-Digital Converters, but that’s external components. So in this section, the clear winner is the Arduino.
Programming. In this section, I want to discuss how easy it is to program the two different platforms. At first, it would seem that the Arduino is the clear winner: the processing language is really easy to use, you can write directly the code on your computer in the Arduino IDE, and there are thousands of tutorials out there about how to program your Arduino. On the Raspberry Pi, it is not that easy: you have to log on the device either with the board itself or via SSH from your computer, then write your code, and run it. But … the Raspberry Pi already supports many languages, like Python. Not only the Python language is really easy to use, but this also opens to door to the use of so many Python libraries that are available on the web, thus extending the range of application of the Raspberry Pi board. For this last reason, I declare a draw again between the two platforms.
Price. Finally, there is the question of the price. The Raspberry Pi board is usually sold at $43, whereas the Arduino Uno board is at $15. If you count all the different accessories you need to make the Raspberry Pi usable, and you compare it to the price of the single USB cable needed to use the Arduino board, the winner is clear: the Arduino platform is much cheaper than the Raspberry Pi.
As predicted, it is impossible to define a winner for all domains. You need to find the right board for your applications. If you have small home automation projects, and you want a cheap and easy solution, you can probably go with all Arduino. But if you want to build a larger project and don’t want any typical computer to be involved, I would suggest to take a Raspberry Pi board to act as the “brain” of your project, as it can be programmed as your own computer and can easily be connected to the web.
So which platform are you using the most ? And why ? I would love to hear about it in the comments section !