Arduino vs Raspberry Pi – A Comparison

- by - in Tutorials

The Arduino vs Raspberry Pi question is something that always crops up among beginners to the maker community. The questions revolve around what the two boards actually do, and the target projects they are aimed for. They are both pretty cheap, the same size, and look very similar, however they are very different.

The Raspberry Pi is a mini-computer running a choice of different Linux operating systems, and the Arduino is a microcontroller – a barebones chip designed to run only the code you have programmed for it, without the overhead of a full operating system.

Edit: This post has been updated many times since the first release in 2013. The Raspberry Pi has had 2 new major releases since then!

Arduino

The Arduino Uno - Arduino vs Raspberry Pi
The Arduino Uno

The Arduino is a programmable microcontroller. The only functionality is has it what you specifically program it to do. It is designed to read data from sensors and switches, run computations on the data it collects, and send control data back out. It can output data over a USB serial connection to a computer, or other serial devices such as LCD screens of WiFi modules.

The Arduino can send digital signals out of its pins. By sending a high or low value out, you can turn on LEDs, control stepper motors, and activate relays to turn on really high power devices. It can also send out analog signals as PWM – using this you can control devices with a variable voltage, such as dimming an LED, or reducing the speed of a motor.

The Arduino is used in many different types of projects, from musical applications and interactive art exhibitions, to robotics and gaming gadgets. There are quite a few different types of Arduino boards aimed at different uses, from boards with more I/O pins, to boards that can be embedded directly in projects. As the board is open source, there are also lots of “compatible” boards that offer the same functionality for a fraction of the price. The main ATMega chip can be taken out of the Arduino and replaced easily, or embedded directly into a project after prototyping.

Raspberry Pi

The Raspberry Pi - Arduino vs Raspberry Pi
The Raspberry Pi

The Raspberry Pi is on the opposite end of the spectrum – it features a fully fledged Linux operating system loaded onto an SD card. It has a variety of different connection options, such as audio out, HDMI and RCA video output, Bluetooth, WiFi and an Ethernet port. It does feature some digital pins similar to the Arduino for controlling hardware components. This allows you to use your Raspberry Pi as a computer, complete with internet browsing, games and everything else you can do with a PC. Plug in a keyboard, mouse and monitor, and you have an amazingly cheap computer.

Raspberry Pi projects are often more software based than hardware based. As it is basically a Linux computer, most projects are based around software hacks, media centres and graphics/sound and multimedia. You can run web services, scripts in different programming languages, and larger projects that require more computer power. It can however do some simple hardware control with the GPIO pins.

Arduino vs Raspberry Pi

Arduino vs Raspberry Pi depends on the type of project you want to make, and your experience in programming. If you have no experience in programming or electronics, you will find the Arduino a steeper learning curve than the Pi as you will have to learn both at the same time. The Arduino has been around for quite a while now though and there are tons of useful tutorials around to get you started. If you have some basic experience in programming you should have no problem getting to grips with the Arduino.

The Arduino is based on hardware control, which means you won’t get far without some components: LEDs, LCDs, resistors, motors, sensors etc., depending on what project you want to do. For the Raspberry Pi, you need no experience or components to get it working – just plug and play!

If you want to make a hardware project then the Arduino is often the best choice. It’s low power, cheap to buy, and the digital and analog pins add a whole spectrum of connectivity. The large amount of I/O pins let you connect multiple sensors and components, and you can remove the actual micro controller of the Arduino and embed it directly into your project with only a couple of additional components. However, the Arduino is not as powerful as the Pi, so there’s no audio, video or internet built it.

If you want to make a software project then the Pi is the way to go. The audio, video and internet capabilities make it the winner in this aspect. There’s no need to attach external components, so there’s no real need to learn electronics. The option to control electronics is a great addition, so you can control LEDs and relays as part of your project. As it’s a Linux box, there’s also a ton of source code out there to help get you up and running.

Arduino vs Raspberry Pi Summary

The Arduino is more suited for projects like LED controllers, alarm systems, robots, weather stations, and hardware hacks; and the Raspberry Pi is perfect for things like a NAS server, web server, gaming emulator, media center and magic mirror.

The Arduino vs Raspberry Pi comparison is summarised in the following table…

 

Arduino Uno

The Arduino Uno

Raspberry Pi

Operating SystemCustomLinux
Suited forHardwareSoftware
Number of Digital I/O pins14 Digital (6 PWM)26 Digital (1 PWM)
Number of Analog Inputs6
Audio / Video outVia ShieldYes
InternetVia ShieldYes
Price$19.99$38.00

*Prices correct as of 24th May 2018

Adam RogersAdam RogersI am the the founder and editor of Codeduino. I'm a developer by trade, and a maker by night. I've been 'making' ever since being introduced to Arduino at university - my final year project was an Ableton Live controller based on Arduino.

SHARE THIS

16 comments

  1. Dave S.

    Thanks for this! I nearly bought the raspberry pi instead of the arduino – I wanted to do more electronics projects,

    Dave

  2. Codeduino

    Hi Dave,
    Glad it was of use to you. Good luck with your projects!

  3. Olmo Axayacatl

    Thank’s for this. I want to learn more about Arduino and Pi, but in this moment I don’t know about these technologies. For that reason I’m learnig and I’ll buy my firts Arduino in a few days.

  4. Codeduino

    You’re welcome. Good luck with your Arduino projects!

  5. Jeanne

    Really great synopsis!!

  6. Zafar

    What about the arduPi library? Using this shield (http://www.cooking-hacks.com/documentation/tutorials/raspberry-pi-to-arduino-shields-connection-bridge) we can get the advantage of Arduino on Pi.
    Do you know how stable is the shield’s usage? Is the library arduPi usable?

  7. Codeduino

    I’ll be honest, I’ve not used it, but a quick look through it and it’s seems like it should work well. It looks like it’s forked directly from the Arduino repository.

  8. Chan

    Thanks for the comparison! I am not sure which one should I choose so far But I want to get to know more about electronics so Arduino will be my best choice!

    Chan

  9. Jason

    I’m more familiar with Parallax only because I started with it. However, I’ve been using more Arduino now because of variety. I’d like to use my Arduino boards to control external peripherals and have the Raspberry PI program an LCD with Linux (Ubuntu) to have a touch screen display what is happening and if possible “acknowledge” and “silence” alarms from the touch screen. Also, would the Ras pi be able to provide a server for ip cameras and such? Thanks for your info above. I just heard of the ras pi yesterday so today is dedicated to determining what all I need to integrate the touch screen with server access. Thanks again.

  10. nelson paz

    Thank you for the great visual wall between them. It was very helpful.

  11. Glenn Bazell

    Have been looking at Arduino via jamco cataloge for a while and just heard about Raspberry Pi from a friend that designs web sites. Your article straightened out the difference between the two platforms so thank you very much.
    My interest lies with electronic control of heat flow in a large house with multiple thermostats and other projects. The Arduino online course looks like my best place to start.

    • Adam

      Great stuff! If you make an awesome project, be sure to let us know!

  12. Dude

    There is not a single reason why the Raspberry Pi would not be suitable for hardware projects as much as an Arduino. Saying “It can however do some simple hardware control” implies that somehow the Arduino can do superior hardware IO, you should explain why you believe so. The only valid argument I can think of in this area would be that Arduino has numerous shields while the Raspberry Pi does not. Other than that, they both seem equally capable hardware-wise to me.

    • Adam

      This guide was written as an overview for those unfamiliar with microcontrollers in general, and not a fully-fledged low-level explanation of all the features. I will clarify some of the points made in the article as to why the Arduino has superior hardware IO…

      The Raspberry Pi doesn’t have any analog inputs, so you would need to get an external ADC. This means that you cannot read a potentiometer, or a sensor that outputs voltage (rather than serial data). The Pi also only has 1 hardware PWM output, which again limits the number of components you can interface with. As the Pi’s Linux kernel isn’t real time, the software PWM timing (and other functions) may be off slightly, which can be critical. Running a fully fledged Linux OS requires a chunk of the CPU and RAM, and any delays or unexpected processes will stall the program execution. The Arduino was designed as a low-level hardware controller, whereas the Pi is a mini-PC with a few general purpose IO pins.

  13. BhallaR@chin

    I am a begineer. From which board i should start. I donot know how to program in c++ also. Plz help me to decide.

    • Adam

      Hi Rachin. If you want to make a project that needs a GUI and software go for the Raspberry Pi. The Raspberry Pi has a full blown operating system, so you don’t have to learn C/C++ – you can use any of the different scripting languages. If you want to make a project that mostly uses electronics components and doesn’t need a fancy GUI, go for the Arduino Uno. The code isn’t that difficult for the Arduino and there are loads of tutorials for it. Hope that helps!

Leave a Reply

Your email address will not be published. Required fields are marked *