Arduino vs Raspberry Pi

Arduino has grown almost exponentially in popularity since it was first released and is well known in the world of robotics as an inexpensive, highly versatile and easy to learn software and hardware platform for electronic and robotic experimentation. However, the introduction of the Raspberry Pi single board computer is one of the first real indications of a trend to make computers affordable to everyone on the planet. With several products priced comparable to Arduinos (and even lower), many people who are looking to get started in robotics don't know which to choose, or where to start. So if you are new to robotics and are wondering where to start and what each system involves, this article is here to help.

Arduino / Genuino

The term "Arduino" refers to either the Arduino-based electronics or the Arduino software (essentially the "Arduino system"). Both the Arduino software and hardware are "open source" which means the design files are provided free for public use, but with a few caveats related to the licensing. This open approach was taken for many reasons, most notably to allow anyone (beginners and experts alike) to better understand electronics / circuits / software, create compatible accessories and even propose improvements to specific components or the general design. This means that the history of Arduino involved significant input from the community to develop and refine what are now the commercial products. The "open source" manufacturing agreement also allows other manufacturers to reproduce, improve upon or add to the "core" designs, provided they adhere to the terms and conditions of Creative Commons License.

Arduino Software

In order to program an Arduino board, you need an external computer such as a desktop or laptop capable of running the Arduino software. The Arduino software / IDE has been split into two versions, one of which is released by arduino.cc, the other released by arduino.org. Both websites offer tutorials as to how to use the software and hardware. There is quite a lot of  questions & projects to be found on the Arduino websites which provide both information and inspiration. The software can be run on most major operating systems including Windows, MAC OS X, and Linux. The main advantage of the Arduino software over more conventional programming languages is that because it is made to be used with specific Arduino-compatible hardware, the software can largely take care of the configuration and "behind the scenes" communications required when connecting software to custom hardware.

arduino-softwareArduino IDE
logo-arduinoArduino Logo
arduino-boardsArduino Boards

 

Arduino Microcontrollers

Arduino microcontrollers come in a variety of different shapes and sizes and each have fairly distinct features or specifications to make one more attractive than another for a specific application. For example a small Arduino Mini might be used for breadboard experimentation, whereas an Arduino MEGA would be best for a project needing many inputs and outputs. The most popular current / standard version of Arduino is called the Arduino Uno and most (though not all) Arduino microcontroller use a microchip from ATMel. In order to use an Arduino microcontroller with external devices, you need to first know how that other device is controlled or what signals are sent / received before making any physical connections. Unlike many other microcontrollers on the market, it is difficult to find electronics which cannot be easily interfaced with an Arduino microcontroller.

arduino-uno-usb-microcontroller-rev-3_2Arduino Uno
arduino-mega-2560-microcontroller-rev3-2_1Arduino MEGA
arduino-pro-mini-328-5v-16mhz-2_1Arduino Mini

Arduino Shields

Arduino "Shields" are essentially printed circuit boards where the pins line up with the pins on a shield-compatible microcontroller. The pin locations on a shield-compatible microcontroller are such that a shield can only be connected one way, since the spacing is not equally spaced between rows. Shields tend to add input and/or output devices such that you do not need to worry about secondary components, wiring or breadboards. For example one shield can include a two-axis joystick and some buttons and LEDs which are are all routed to the correct pins on the Arduino microcontroller. This "joystick shield" would mean these components are essentially "plug and play", and often sample code is provided.

10a-dc-motor-driver-arduino-shield-3Motor Driver Shield
linksprite-gps-shield-sd-slot-arduino-1_1GPS Shield
mp3-playback-arduino-compatible-shieldMP3 Shield

Arduino Compatible

Although certain manufacturers prefer to simply produce the original Arduino boards and re-brand them (sometimes with a different color PCB, or simply retaining most of the microcontroller design but using their preferred USB connector), others re-imagine the boards and adapt / modify them for new applications, or add features which they think will be popular. There are now many shield types available, from capacitive touch shields and OLED shields to GPS shields and more. There are also "Arduino-compatible" robots which use hardware which are compatible with the Arduino IDE but are different enough to be hard to recognize as "Arduino". For example, Sparkfun's wearable Lilypad series are Arduino-based and can be sewn into clothing. An Arduino is even at the heart of the Quadrino Nano Flight Controller. Arduino is growing and evolving rapidly.

dfrobot-lcd-keypad-shield-arduino-1_1DFRobot LCD Shield
dfrobotshop-rover-tracked-robot-basic-kitDFRobotShop Rover
dual-stepper-motor-driver-shield-arduino-2_1Stepper Driver Shield

Raspberry Pi

The founders of the Raspberry Pi project had the objective of creating a computer which could be affordable to everyone - even in third world countries. It would not include a monitor or any of the other mass-market products which could be purchased separately, but were not absolutely necessary for most applications (keyboard, mouse, WiFi, wall adapter etc). By taking this approach, they were able to get the retail price of a complete board to be just a bit more than a genuine Arduino microcontroller. As of this post, the more recent version (pi zero) has been released with a retail price of only $5 USD! Although a Raspberry Pi 2 is priced just a bit higher than a standard (genuine) Arduino USB microcontroller, it is really a complete single-board computer. The board has all of the components and functionality of a complete computer, including a processor capable of running an operating system, a video driver, audio (in and out), USB ports, storage and more. This having been said, it is certainly not meant to be able to run programs or applications which require significant processing power (modern computer games for example). Unlike most normal single board computer, the Raspberry Pi has two rows of built-in input / output pins which more easily allows electronics to be wired directly to the board.

Raspberry Pi Software

As indicate, unlike an Arduino, a Raspberry Pi is a full computer and runs a complete operating system.There are several different (mostly Linux-based) operating systems which run on the Pi, the most popular being Raspbian and Noobs. These operating systems don't have many limitations and you can install most Linux-compatible programs, from office tools to internet browsers to coding tools, and even convert it to a mini media server! You can install the Arduino IDE on a Raspberry Pi and even connect the Arduino to the Raspberry Pi to use it for the additional IO. The most common software development tool for Linux is Python, which most can argue is not as easy to use as Arduino, but can in the long-run be more versatile.

noobsNoobs OS
raspberry-pi-logoRaspberry Pi Logo
raspberry-pi-os-noobsNoobs OS on SD

 

Raspberry Pi Hardware

The original Raspberry Pi has evolved a few times, with the most recent iteration being the Pi Zero, touted as being the first $5 single board computer on the market. In order to use the Raspberry Pi as a normal computer, you would need the standard peripherals, including a monitor or screen (HDMI input is preferable, though you can purchase adapters), a keyboard and mouse, as well as a power supply (a 5V, 2A+ USB wall adapter works well). It's also important to note that all programs run off an SD card which is not included (or included only with certain kits). Beyond this, you can of course opt for WiFi / Ethernet and/or Bluetooth, a nice case etc. as you would with a normal PC. Alternatively, should you want to use it as more of a robotic platform, you can connect the Raspberry Pi to a portable 5V power supply (such as a USB battery backup, or a battery pack connected to a voltage adapter) and make use of the various IO connections.

Raspberry Pi ZeroRaspberry Pi Zero
raspberry-pi-2Raspberry Pi 2
Raspberry Pi A+Raspberry Pi A+

Raspberry Pi "Hats"

Just like the concept of shields for Arduinos, more and more manufacturers are coming out with electronics which plug directly into the IO pins of the Raspberry Pi (called "hats") and provide "ready to use" additional functionality, without the need for wires or additional components. Raspberry Pi "Hats" include LCD / OLED displays, GPS, motor drivers and more. Certain Raspberry Pi hats even include a full Arduino microcontroller onboard, and/or an adapter to easily connect Arduino shields to a Raspberry Pi.

arduberry-raspberry-pi-to-arduino-shield-adapter-1_1Pi to Arduino Shield "Hat"
dc--stepper-motor-driver-hat-kit-raspberry-pi-2_1DC & Stepper Motor Hat
carberry-shield-kit-raspberry-pi"Carberry" Hat

Arduino or Raspberry Pi?

So which one is best for you? Given that both are relatively inexpensive compared to what existed on the market only a few years ago, most people who own a Raspberry Pi (for development purposes) have also experimented with an Arduino. If you are looking for an inexpensive computer, then it is evident that only the Raspberry Pi fits the bill. For robotics, if you are new to coding and have a separate (desktop or laptop) computer, we suggest starting with an Arduino, or an Arduino kit. If you feel you are ready to create code which takes advantage of higher level functionality (WiFi, USB devices, faster processing etc). It is good to know that neither Raspberry Pi nor Arduino feel they are in competition with one another, as both are incredibly useful and respond to different market demands. Whatever your needs might be, RobotShop is the best source for Arduino and Raspberry Pi products in Canada, USA and Europe.

LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post