Arduino vs Raspberry pi for Robotics

In this era of technology, computers are being used to handle almost all day-to-day human tasks; such as opening and closing doors, doing intense calculations among other tasks.

In general, these activities are commonly referred to as the Internet of Things (IoT), which have been made possible by the use of development boards.

These boards not only support DIY projects but also can be used for prototyping and solving real-world engineering problems.

Although there several development boards in the market, Arduino and Raspberry Pi boards have managed to become the two most popular boards for IoT enthusiast and hobbyists.

These two devices look similar and function the same way in that, they both can connect to and control other hardware with some scripting and soldering.

This also means that the devices can be used to teach coding and hardware development to later life learners.

A closer look, however, reveals that the two development boards- Arduino and Raspberry Pi- differ in both architecture and purpose.

Despite the differences, it can be quite hard to choose the device that best suits your robotic projects, since both boards do not fall short of capabilities.

Nevertheless, below is an in-depth look into what each board offers, so as to help you decide on which one to use for your project;

Arduino

An Arduino board is a microcontroller-based kit that allows users to interface the kit with sensors and devices thanks to its open source hardware feature.

Therefore, the kit is basically used for hardware projects that involve controlling or operating many devices.

The microcontroller technology used in this development board differs from the typical microprocessor technology used in other boards – including Raspberry Pi boards – in that it has built-in input/output (I/O) capabilities.

Unlike boards that use microprocessors, the microcontroller technology enables an Arduino board to connect to the ‘real world’ through switches, buttons, relays and serial ports so that it can read and write digital and analog values to the devices the board is connected to.

However, since Arduino boards lack the multitasking powers of microprocessors, they can only handle one program at a time, repeatedly.

This can be a huge plus if you are designing projects that involve repetitive tasks such as reporting data to a website, opening and closing garage doors or controlling a simple robot.

The microcontroller technology in Arduino kits uses the Harvard architecture program whereby the program code and program data are allocated different memory slots.

The memory slots in the kit exist in two different types- the program memory which stores the code and the data memory which stores the data.

A typical Arduino board, for example, Arduino Uno, consists of ATmega328 microcontroller with 32 KB of flash memory for storing code and 1 KB of EEPROM.

The biggest advantage of Arduino boards is that programs do not need a hardware programmer to burn a program since programs can be directly loaded to the device.

This is made possible due to the presence of Bootloader in the flash memory, which allows the programs to be burned into the microcontroller’s circuits.

Simply, to load programs in the device all you have to do is download the Arduino software and write a code to control the connected devices.

A typical Arduino for instance, Arduino Uno, consist of 14 digital input/output pins, 6 analog inputs, a 16 MHZ crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button.

The power jack can be connected to a PC to power the board or to an external source such as an adaptor or a battery.

The digital I/O pins take up or provide 40mA of current with each having special functions ranging from serial communications, external interrupts to PWM output.

Raspberry Pi

Initially, the Raspberry Pi was designed to be as an educational tool to help students learn basic computer skills, particularly programming.

Since then this single computer board has gained traction outside the classroom setting due to fully-fledged computer functionalities.

This means that it has all the basic components of a computer which include; a dedicated processor, memory and an HDMI to support graphics output.

As such, a Raspberry Pi board can run a full operating system whether it’s Windows OS or even its own version of Linux operating system called Raspbian.

Unlike an Arduino board, the Raspberry Pi features a microprocessor thus making it ideal to be used in tasks of medium to high complexity as well as those that require to be performed simultaneously.

It can also be used for intense mathematical calculations such as for Bitcoin or encryption technologies.

It is also commonly used in multi-media projects such as media streaming or video game emulation, and also making small multi-functional gadgets.

Arduino vs Raspberry Pi

Now that you are familiar with the architecture and manufacturing models used in both boards, let’s look at the major differences separating the two.

Power

In robotic projects, power is one of the most important factors to consider. Therefore, if you are planning on using either Arduino or Raspberry Pi, it is crucial to pay attention to the power consumption and need of the two boards.

To begin with, using Raspberry Pi 3 Model B and Raspberry Pi Zero W as model examples; they both require 1.5 Watts and 0.5 Watts when idle, respectively.

When connected to a monitor, a keyboard and a mouse; the RPB Pi 3 Model uses up to 6.7 watts while the Pi Zero W uses 1.75 Watts.

 Arduino on the other hand only consumes microwatts when in sleep mode and thus it is an ideal option when power consumption is of paramount importance in your project.

Additionally, when using Raspberry Pi board, you will need an interrupted power supply that keeps the voltage above the minimum consumption, usually about 5 volts, or otherwise, risk corrupting the operating system or other running software.

As for the Arduino boards, you merely need a battery pack to provide constant power supply; since the board doesn’t run on operating system Arduino users will hardly encounter corrupt OS and software problems.

The board will simply stop running code when plugged out and recommence when plugged in again.

Even though the RPB Pi consumes a lot of power, you can still employ several techniques when using the board, to make your projects energy-efficient.

For example, if you do not need graphics display in your project, you might consider disabling the HDMI ports on the board. Alternatively, you can also shop for other RPI boards that consume less power.

Basically, the trick here is to tailor your RPI to the needs of your project and it might well run on a considerable amount of power.

Nevertheless, power consumption is bound to go overboard especially when using the boards in projects that don’t exist in isolation.

For instance, if you are using Arduino to activate motors or drive scores of LEDs, then the power consumption will significantly increase. The same case applies when using raspberry for multi-media streaming and game related projects.

Connectivity

Unfortunately, Arduino boards cannot connect to a network right out of the box. However, it still possible to establish connections, but it will require a bit tinkering to set up a proper connection.

In most cases, you will require to integrate the board with external hardware such as an ESP8266-equipped Wi-Fi shield.

Alternatively, you can also use a chip outfitted with an Ethernet, which will require you to do some wiring, and coding to get everything up and running.

Luckily, there are some vendors who sell comparable Arduino devices with a built-in Ethernet component.

Raspberry Pi, on the other hand, boasts of both built-in Ethernet port and Wireless N connectivity that allows for connection with just a little easy-to-do setup.

This makes the Pi suitable for the Internet of Things projects and can also be used to connect to web servers, process HTML or as VPN and print server.

Developing Software

Arduino comes with its own IDE and libraries which are friendly to novice programmers. To get started, you will need to create a set of commands and instructions that Arduino will interpret and enact.

This can be done through installing the IDE on a computer or tablet and then connect the device to your Arduino through a USB port.

Then after you will be able to create your first project which in most cases involve making an LED flash. However, since Arduino lacks an interpreter, the code must be written, compiled and uploaded onto the Atmel chip, before running.

After uploading your code, the IDE will diagnose for errors before attaching library files and later sending it to the compiler, where it is translated into C++ language which the board understands.

While the Arduino board can be tweaked to support other languages, it is recommended to Arduino language.

In contrast, Raspberry Pi comes preloaded with a fully functional operating system, Raspbian which is based on Debian Linux and created specifically for the Pi.

In addition to using other Linux-based operating systems, the board can also support Android OS. As expected, due to the fact that RPI was designed to help students learn how to code, the Pi hosts several programming languages including Python; which is the recommended language for the Pi.

Other coding languages installed on the board are C, C++, Java, and Ruby. The best thing about Raspberry Pi, is that you do not have to connect it to a computer so as to write codes, simply because, the operating system of the Pi has its own compilers and codes can be writing using a directly attached monitor, mouse, and keyboard, or through a remote VNC or SSH session.

In a simple and short comparison, it is quite clear that Raspberry Pi wins due to its Linux OS benefits from a flexible and powerful development environment as compared to Arduino IDE.

However, the Linux consists of a huge collection of lines of code, and thus in projects where simplicity is the key, Arduino has a better chance.

Costs

Like any other projects, when designing robotic projects the total investment cost dictates if the project is worth going for it or leave it. In terms of cost, both Arduino and Raspberry Pi development boards, weigh in an affordable price tag.

Arduino boards usually cost not more than $20 while the RPI boards go for around $35. The difference in price remains within the same range even when comparing the prices of the different variance of the two boards.

Although Arduino boards may seem to be more affordable compared to the price Raspberry Pi boards, you may incur additional if you were to work with Arduino boards.

This is because for most projects when using Arduino boards, you will probably require additional components which range from; resistors, sensors, patch cables, and IC units.

The case is different if you were to use RPI boards. Due to its software-driven approach, with an RPI, you only need a few extra components – a monitor, mouse, and keyboard- to set everything up and running. So, if you are working on a budget, you might consider using RPI boards.

It is important to note that, in order to choose the right development board, you should first know what you want to do in your project.

From the needs of your projects, you can then choose the board that meets almost all the needs. As stated earlier, for instance, if your robotic project involves repetitive tasks then you should use Arduino boards.

Moreover, there is always the choice of using both boards in a single project if at all the project requires the functionality of RPI and utility of Arduino.

Final Thoughts

As much as it may seem quite difficult to decide on which board to use, there some projects that don’t require much effort trying to choose the right board.

Simple robotic projects require Arduino boards since the board provides enough support required to perform single functions effortlessly, while complex robotics projects require the Raspberry Pi boards that provide more options to experiment with ideas.

About the author

Lamin
Lamin

Geek Life Activated is my little corner on the web. I'm very passionate about tech, and i aim to use this blog to express that. I currently work as a System Administrator, and i love every second of it. I'm still new at it, so i'm learning something new everyday. I'm pretty open to learning new things, so please feel free to correct me if i'm wrong about anything, and you can contact me anytime you want. I'm a very easy person to talk to. :)

Copyright © 2019. Created by Geek Life Activated|Sitemap