Choosing the best tools for a project is a core belief of mine given my background as an engineer. Some projects are better suited to small, efficient tools (such as Arduino), while others are suited to more complicated and capable devices (such as Raspberry Pi). I put together this list of things to consider when you’re trying to decide if you should use an Arduino or a Raspberry Pi for your project.
When choosing between Raspberry Pi and Arduino, the important things to consider are how much power you have available, whether you need to use a display, and how you are going to communicate or store data with the device. In general Arduino is more suitable for projects where power supply is limited or unreliable, while Raspberry Pi is better suited if you need to store, manipulate, or communicate significant quantities of data.
In this guide I’ve looked at how much power each device consumes, the costs of each device, how they store and communicate data, and a few other things I’ve found useful when trying to figure out which device should be used in a project.
1. Raspberry Pi uses more power
A Raspberry Pi typically consumes between 1,800mW and 5,400mW of power. This compares to an Arduino’s power consumption of between 280mW and 1,282mW.
Arduino uses significantly less power than Raspberry Pi, even when Bluetooth and WiFi are in use. This means that an Arduino can last longer on battery, or be more easily powered by less reliable sources such as wind and solar power.
If your project needs to run with less power, look to use an Arduino rather than a Raspberry Pi. Simple projects, such as logging data from a sensor, can take advantage of the lower power consumption that an Arduino offers, rather than using a Raspberry Pi.
I wrote full guides on measuring how much power an Arduino and a Raspberry Pi use, check them out here:
- How much power an Arduino uses: chipwired.com/arduino-power-use
- How much power a Raspberry Pi uses: chipwired.com/raspberry-pi-power-use
2. Arduino is generally cheaper for beginners
An introductory Arduino typically costs between $22 and $45 depending on whether you need Bluetooth and WiFi. A Raspberry Pi for beginners will generally cost between $35 and $75 depending on how much RAM the Pi comes with. While it is possible to get a cheaper Raspberry Pi (the Zero starts at $5), and a more expensive Arduino (the Portenta H7 costs just over $100), these are not always the most beginner friendly options.
I’ve found Arduino to offer the cheaper option if you’re looking to start learning about micro-controllers, sensors, and even robotics. If you’re not sure where to start, the introductory Arduino is available for $22 (the UNO Rev. 3); an introductory Raspberry Pi by comparison is $35.
Raspberry Pi is often better value in terms of getting more computer power per dollar though. It has more RAM, a faster CPU, and more peripherals (WiFi, Bluetooth, HDMI) contained within its price (these can cost extra to add to an Arduino.
I wrote a guide on how Arduino boards differ from each other (including costs). If you’re interested in finding out more, you can find my guide here: chipwired.com/arduino-types-compared
3. Raspberry Pi can easily drive an LCD display
It is much easier to connect a Raspberry Pi to an external display than it is for an Arduino to do the same thing.
To connect a Raspberry Pi to an external display (such as an LCD monitor):
- Plug a micro HDMI to HDMI adapter into the Raspberry Pi
- Connect an HDMI cable from the adapter to the display
Nothing more to it! The Raspberry Pi operating system will automatically use the display to show you information.
For an Arduino to connect to a display, it needs a display that is compatible with its serial interface (e.g. SPI or I2C), or it needs to use a shield. Either way, significant extra programming is required on your behalf before anything will even show on the display. And when it does, it’s likely to only be a few characters or a simple set of colours, rather than the full 1080p experience a Raspberry Pi can provide.
4. Raspberry Pi can store and communicate more data
The introductory Raspberry Pi 4 can store data in the 2GB of RAM on-board, or in the leftover space on the SD card that runs the operating system. This is enough for hundreds of millions of measurements from sensors that can be connected to the Raspberry Pi.
A typical Arduino by comparison has less than a megabyte of memory, meaning it can barely store a million readings (I experimented to see what happens if an Arduino runs out of memory, check it out in my troubleshooting guide here: chipwired.com/arduino-crash-hang-guide). I also wrote a guide on the different types of memory an Arduino has, it’s available here.
Raspberry Pi, thanks in-part to its operating system, can also easily communicate this data to the internet. It can send data to the cloud, or another computer, using its WiFi, Bluetooth, or Ethernet connections. While many Arduino boards are capable of these communication methods, they often require shields and more complicated code to go in a sketch.
If you’re interested in all the ways a Raspberry Pi can store data, I wrote a while guide on that here: chipwired.com/raspberry-pi-store-data
5. An Arduino has finer control over its outputs
Running a a pulse width modulated output, such as a motor, is slightly easier and more reliable with an Arduino.
Code in an Arduino sketch lends itself to finer control over the instruction cycles on the micro-controller, and thus makes it easier to accomplish tasks such as pulse width modulation (if you’re interested in more detail about PWM, check out the Arduino tutorial here).
When you write code on a Raspberry Pi, there is less of a guarantee that outputs will be controlled at the timing you want them to be. This is because code on a Raspberry Pi is typically scheduled by the operating system, meaning that other programs could be running instead of yours. Usually this is so fast that we don’t notice, though if you need this fine control over outputs, then the Raspberry Pi operating system might be getting in your way.
Raspberry Pi does have a few remedies for this problem, namely real time operating systems. Real time operating systems provide guarantees about the execution of code and the scheduling of different programs and input/output control. This can be good if you’re controlling something safety critical like a nuclear plant, car, or spaceship. There are a few real time operating systems that work with Raspberry Pi, check out the list here. I’ve found these operating systems a little harder to get running on a Raspberry Pi than more conventional Linux-based operating systems.
6. Arduino is easier to code; Raspberry Pi has more options
Arduino coding is designed to be simple. It is designed to be easy to open up the Arduino IDE, write a sketch that targets your Arduino, and then upload it to your board. Arduino even uses a simple style of C programming language. Simplicity comes at the price of power though, and there are limitations when writing a lot of code in an Arduino sketch (libraries, linking, variable scope, etc.).
Overall, use Arduino if you only need a simple task done in code, such as reading from sensors and saving that data for later analysis. Use Raspberry Pi if you need something more complicated done such as pulling data from the internet to display on an interactive dashboard.
7. Arduino is easier to replace if it gets damaged
Sometimes we like to leave our micro-controllers exposed, particularly when we’re building a prototype. At least that’s what I’ve seen – robots running around with their controller screwed onto the side, dodgy wiring holding everything in place (I’m definitely guilty of this), and our IP-rated case not quite as protected as we first thought.
An Arduino is easier to replace than a Raspberry Pi. This is due to the simplicity of uploading a sketch to an Arduino compared with flashing an SD card for a Raspberry Pi.
To replace a broken Arduino:
- Plug the new Arduino into your computer and upload the sketch that was running on the broken Arduino
- Disconnect the wires and remove the broken Arduino from your project
- Insert the new Arduino and connect all the wires again
It is possible to create a reusable image for Raspberry Pi. A reusable image would allow you to follow a similar process as the above and get the new Raspberry Pi in place quickly. However I’ve found it really complicated to create a reusable image for Raspberry Pi. This guide seems particularly helpful, though the steps are still complicated.