Raspberry Pi vs Arduino Comparison
In this article you learn the differences between the Raspberry Pi and the Arduino and why I use both of them in my projects.
The Raspberry Pi vs Arduino comparison is done in different categories:
- System and Operating System
- Connections and GPIOs
- Data Transfer
- Operating Power and Power Consumption
- Advantages and Disadvantages
- Area of Applications
Table of Contents
The objective of this article is not to find out what hardware is better because we will see that they really not compare in the same segment. Moreover the Raspberry Pi and the Arduino supplement each other very well.
The following table shows the summary of this entire article. But I recommend to read the whole article to really understand the differences. Also I link to other articles on my blog if you want to get more detailed information about a specific topic.
Important: The following table compare the Raspberry Pi 3 Model B+ and the Arduino Uno R3. Because there are different models of each on the market, the exact comparison will differ, but the trend remain the same.
If you are interested in the comparison of the different Raspberry Pi models, you find the comparison on Wikipedia and for the different micro-controller you find the comparison in this article.
Raspberry Pi 3 Model B+ | Arduino Uno R3 | |
System | Single Board Computer (SBC) | Micro-Controller |
Operating System | Run on an operating system | No operating system |
Connections | PC based connections like HDMI, USB, … and GPIOs | Hardware oriented connections like GPIOs, power jack, USB plug |
Data Transfer | Files can be transferred any time via FTP, USB or the SD card | Data can only be transferred via the flash of the microcontroller |
Program Execution | Multiple programs can run at the same time | Only one program can run at once |
Processor | Broadcom BCM2837B0 | AVR ATmega328p |
Clock Speed | 1.4GHz | 16MHz |
Register Width | 64-bit | 8-bit |
RAM | 1 GB | 2 kB |
GPIO Ports | 5V, 3.3V and Ground Digital I/O pins but no analog pin | 5V, 3.3V and Ground Digital I/O pins along with analog pins |
# GPIO | 40 | 20 |
I/O Maximal Current | 50 mA | 50 mA |
Power consumption | 700 mW | 175 mW |
Advantages | Highly flexible with different operating systems and able to run multiple applications at the same time. | Perfect to read sensor values and control actors like motors. Easy to program with a lot of tutorials. |
Disadvantages | More expensive and can not read analog sensor values | Usage is limited due to lack of computation power and no operating system |
Area of Application | Connection of multiple devices and run multiple applications at the same time | Connection of sensors and actors to the internet and enable IoT applications |
Price | $35 to $52 | $12 to $18 |
The following table gives you an overview of all components and parts that I used for this tutorial. I get commissions for purchases made through links in this table.
Arduino Nano | Amazon | Banggood | AliExpress | |
Arduino Uno | Amazon | Banggood | AliExpress | |
Arduino Mega R3 | Amazon | Banggood | AliExpress | |
Raspberry Pi 4 Model B Kit | Amazon | AliExpress | ||
Raspberry Pi 4 Model B | Amazon | Banggood | AliExpress | |
Raspberry Pi 3 B+ Kit | Amazon | AliExpress | ||
Raspberry Pi 3+ | Amazon | Banggood | AliExpress |
System
The comparison of a Raspberry Pi and the Arduino is difficult because the system differs. The Raspberry Pi is a single board computer (SBC) and is therefore a real PC or laptop like the one you have only on a single board. On the other side the Arduino is a micro-controller. So what is the exact difference?
The Raspberry Pi has a microprocessor which is a single CPU consisting of only registers for analog data storage, an analog arithmetic unit (ALU) and a control unit (CU). The RAM and secondary storage are external and not part of the CPU.
The micro-controller of the Arduino on the other hand has a build in chip which consists of RAM, ROM, I/O, timers and CPU inside the chip. Therefore there are no external parts needed along with the chip to be fully usable.
Because there is no measurement if a micro-controller or a micro-processor is better both parties get 0 points.
0
Raspberry Pi vs Arduino
0
Operating System
The most used and from the Raspberry Pi Foundation official supported operating system for the Raspberry Pi is Raspbian. If you want to know to to install Raspbian I wrote a step by step tutorial in this article. There are a lot of other operating systems which focuses on different use cases. For IoT projects there is Windows 10 IoT or Hass.io. Also you can install Ubuntu on your Raspberry Pi.
Because the Arduino is a micro-controller and no micro-processor, the Arduino has no operating system. The program you create is directly compiled into machine language during the flash process and then executed. This is the reason that you can not change the program during the run-time. If you make a change on your program you have to re-flash the micro-controller.
Because for the Raspberry Pi is the opportunity to install an operating system, the Pi get one point.
1
Raspberry Pi vs Arduino
0
Connections
The connections of the Raspberry Pi are nearly the same as your PC or laptop. It has several USB ports and an HDMI output as well as an Ethernet port. To connect a camera the Pi has a CSI camera connector and to connect other sensors, there are in total 40 GPIOs. But there is no analog pin because the Raspberry Pi does not have an analog to digital converter.
The connections of the Arduino are designed to connect different sensors. Therefore there are 20 GPIOs. Because the Arduino has a build in analog to digital converter, there are several analog pins. The Arduino have a power jack and USB plug for power supply.
Because the Raspberry Pi has more connections the Raspberry Pi get this point again.
2
Raspberry Pi vs Arduino
0
Data Transfer
For the Raspberry Pi data is stored on a SD card. Therefore there are several possibilities to transfer data from you local PC or laptop to the SD card.
- The easiest option is to plug the SD card directly in your PC or laptop and copy data or files on the SD card. After the data is copied you plug the SD card into the Pi and the Pi can access the data.
- Because the Raspberry Pi can read data from USB, you can also plug in an USB stick or external hard drive via USB with the data.
- The most convenient option is to send the data via FTP and the local network. You can use an FTP program like FileZilla
Because the Arduino is only able to use machine language, there is no possibility to store data onto the micro-controller. Files in form of variables have to be flashed via the Arduino IDE. If you are new to the Arduino IDE, here is a tutorial how to use the Arduino IDE.
The Raspberry Pi has the ability to transfer files easy over the network. This point goes to the Pi.
3
Raspberry Pi vs Arduino
0
Operating Power
Because the Raspberry Pi is more or less a full PC, the operating power is enormous compared to the Arduino. The clock speed is nearly 90 times and the RAM 500,000 higher. Moreover the Arduino runs only on 8-bit compared to the 64-bit of the Raspberry Pi.
With the beefy power of the Pi this point has to go to the Raspberry Pi.
4
Raspberry Pi vs Arduino
0
GPIOs
Over the last version of the Raspberry Pi the number of usable GPIOs has increased. Therefore the Raspberry Pi has 40 pins available, but no analog pin. In my opinion the 20 GPIOs from the Arduino are no downside because until now I did not have a projects where I needed all pins. In case there is a project where I would need more pins there are 2 options:
- Use and Arduino Mega with 54 digital pins
- Use a multiplexer
- 16-Channel Analog Multiplexer/Demultiplexer: CD74HC4067
- 8-Bit Shift Registers for more digital I/O: 74HC595
The maximal current per pin is with 50 mA the same for the Arduino and Raspberry Pi.
Because the Arduino can read analog sensor values this point goes straight to the Arduino.
4
Raspberry Pi vs Arduino
1
Power Consumption
The Raspberry Pi has a much higher power consumption compared to the Arduino. Also there are several possibilities to reduce the power consumption for micro-controller. The most known example is the NodeMCU. The NodeMCU is also a micro-controller and can be used for an Arduino. With the deep sleep mode activated the power consumption reduces to 50 μA which is very handy for battery powered projects. On the other hand to Raspberry Pi is not able to run on a non stationary project.
The power consumption of the Arduino is very low and therefore suitable to run on battery. This point is for the Arduino.
4
Raspberry Pi vs Arduino
2
Advantages
The main advantage in my opinion of the Raspberry Pi is the operating system. There are a lot of pre-configured software which let you directly start your project. For example if you want to build a security camera you can download the motionEyeOS operating system and finish the project in record time.
Also you can run multiple applications at the same time. For example surf with the web browser through the internet while in the background sensor values are stored in a SQL database and a backup is done.
The Arduino as a micro-controller is more hardware oriented compared to the Raspberry Pi and therefore perfect to read sensor values or to control a motor. For a beginner I would suggest to start with an Arduino because there are a lot of tutorials and you can start directly after you downloaded the Arduino IDE.
Disadvantages
The main disadvantage of the Raspberry Pi is the price because a good micro-controller starts with $5 to get your first IoT projects running. Compared to the Arduino or ESP based micro-controllers the Raspberry Pi is up to 10 times more expensive. Also if you want for example build a smart indoor weather station
- the Raspberry Pi is too large,
- you do not need all the computation power,
- have to think about the heating and
- the project would be too expensive.
Also the Pi is not able to read analog sensor values.
For heavy computation tasks, the Arduino does not have the computation power and not the designed operating system. Therefore a lot of task can not be done because programs from the Linux or an other distribution cannot be installed.
Area of Applications
In my projects there is always an Arduino or NodeMCU involved inline with a Raspberry Pi. I use the micro-controller to read sensor values or to control an actor like a motor. The Arduino or NodeMCU is for me the gateway to the local network. Sensor data are send via MQTT from the micro-controller to the Raspberry Pi, stored in a database and visualized or further processed. This is why I do not compare the Arduino and the Pi. For me both are the perfect solution to different problems.
If you have any questions about the Raspberry Pi, the Arduino or other micro-controllers, please use the comment section below to ask questions. I will answer them as soon as possible.
Leave A Comment