Arduino Vs Raspberry Pi: Como selecionar entre os dois?

Arduino Vs Raspberry Pi: How to Select Between the Two?

Arduino or Raspberry Pi : This is a common dilemma among the community of electronics engineers, whether they are hobbyists or professionals working on a prototype. There may be a case where someone has worked on some microcontrollers and is now willing to push academic excellence by working on development boards or it is necessary to choose a development board for a do-it-yourself engineering project. Let's have a fundamental understanding of both boards to make it clear which one to select.

How to choose Arduino or Raspberry Pi The first thing is that both Arduino and Raspberry Pi offer a variety of development boards with different specifications and features. There are a variety of products offered on Arduino Platform available across many categories. The Raspberry Pi platform also offers a variety of products. You may need to use one of these Arduino or Raspberry Pi platform products or you may need a combo because Arduino and Raspberry Pi are basically different but complementary.

What is Arduino?

Arduino is an open-source electronics platform consisting of programmable circuit boards and an integrated development environment (IDE) where programs for running embedded systems applications can be written in C or C++. It is basically a series of microcontroller-based development boards popular for simple and straightforward implementation of hardware projects. The heart of Arduino boards are 8-bit AVR microcontrollers. Arduino boards can control a wide range of sensors and actuators by carrying add-on boards called Shields. There are shields available to control motors, interface with LCDs, and connect to the internet, cellular networks, and wireless interfaces. Arduino appeared in 2005. It was developed by Massimo Banzi, David Cuartielles and David Mellis with the aim of reincarnating the Wiring Project, adding support for cheaper ATmega8 microcontrollers to the already successful Wiring platform. The motto was to develop a low-cost, open-source embedded electronic tool so that non-engineers could build digital projects.

What is Raspberry Pi?

Raspberry Pi is a microprocessor-based development board. In contrast to the Arduino, the central unit of the Raspberry Pi is a 32-bit 900 MHz Broadcom ARM Cortex-A7 or 32-bit 700 MHz Broadcom ARM Cortex-V6 microprocessor. Raspberry Pi is a system on a chip. It is a credit card-sized single-board computer (SBC) developed for teaching basic computer science in schools and colleges. It's like a mini computer, just like a desktop or notebook computer, but with less processing power compared to motherboards. The UK-based Raspberry Pi Foundation is the founder and promoter of the platform.

How to get started with Arduino or Raspberry Pi?

If one is interested in development boards for academic learning, both Arduino and Raspberry Pi are dimensionally different and offer different things to learn. Arduino, being a microcontroller board, is quite useful for sensor-based real-time applications, where the program logic is not complicated, but the hardware interface is the main factor of the entire effort. The Arduino runs on “Bare Metal”, that is, without any operating system, just on the firmware. You just need an Arduino board, a bunch of sensors and actuators, Arduino IDE and you can tinker with Arduino. It can be easily coded with the Arduino language (a simplified version of C++) where basic knowledge of C and HTML is the only prerequisite. Raspberry Pi, being a microcomputer, is more useful for multimedia and Internet-based applications where more software intelligence is required and the hardware interface is just a basic part of the design. Working on the Raspberry Pi requires knowledge of Linux and the Python or Ruby scripting language. The Pi runs on Linux distributions. Raspbian is the Linux derivative officially supported by the Raspberry Pi platform. So, all you need to get your hands dirty with Raspberry Pi is a Raspberry Pi board with an LCD screen to get a visual cue of code execution, Scratch IDLE or another Linux-compatible IDE, knowledge of C, C++, Java and scripting languages ​​like Ruby or Python and some crazy software ideas to implement.

Hence, both platforms require different skill sets and offer different things to learn. For academic purposes, the selection between Arduino and Raspberry Pi can be derived from the following table:

Factor Arduino Raspberry Pi
System type Based on AVR microcontroller Based on ARM microprocessor
Pieces 8-bit 32-bit
Operational system None Linux distributions like Raspbian (official), Android, Plan9, RiscOS, X-Box Media Center etc.
Required skills Arduino (C and HTML prerequisites) C, C++, Java and scripting languages ​​like Python, Ruby
Integrated development environment Arduino Scratch, IDLE and other IDEs with Linux support
Focus on learning Hardware Software
Application Sensor-based real-time applications Multimedia and Internet-Based Applications

You can choose either of the two according to your interest and preference or even why not learn both. Many applications require equal focus on hardware interface and software intelligence. These applications may require the use of Arduino in combination with Raspberry Pi, Android phone or other microcomputer. Learning both platforms will strengthen the foundation in both the software and hardware aspects of embedded electronics and allow you to create more innovative applications.

How and when to select Raspberry Pi or Arduino

How to select Arduino, Raspberry Pi or Combo for your electronics project?

When it comes to selecting Arduino or Raspberry Pi for an electronics project, the choice may seem daunting at first glance. Both microcontroller and microprocessor are capable of calculation, but they are most useful when a specific application needs to be implemented.

Price is not an issue

Both Arduino and Raspberry Pi are competitively priced. Raspberry Pi is only slightly more expensive than Arduino boards. Raspberry Pi 2 Model B costs around $29 and the latest Raspberry Pi 3 Model B on the platform costs around $29.99 at element14 , the official distributor of Raspberry Pi boards. The Arduino UNO costs around $24.95 and the Arduino Pro Mini costs around $18.05. The official global distributors of Arduino boards are Mouse , RS Components and Digi-Key . A list of other distributors is available on the Arduino website. The Wi-Fi/802.11 shield for Arduino costs around $49.90. Therefore, what matters is not the price issue, but the type of application you want to implement.

When to choose Arduino?

Arduino will be the perfect choice for your embedded electronics project if one or more of the requirements or conditions given below complement your electronics projects:

When to choose Arduino

1. Iterative tasks – If your application needs to execute a sequence of instructions repeatedly without many intelligence factors, Arduino adapts to your application. Microcontrollers must execute their code iteratively.

2. No need for multitasking – If your application logic does not involve more than two tasks, you can safely turn to Arduino as an option. Since your project needs to detect temperature and humidity and display them on a screen, you can safely choose Arduino. But, if your project involves multitasking, like your project needs to detect temperature and humidity, display them on a screen, record the temperature information, compare the temperature information on a daily basis, and predict the future weather conditions on the basis of the analyses. recorded and also display a weather forecast on the screen, the Raspberry Pi should be your choice.

3. No network required – Arduino does not have a built-in Ethernet port. If a project built on Arduino needs networking, it must connect to external hardware called Shields and will need to properly address the connected network peripherals. Wi-Fi/802.11 shields can be purchased from the Mouse website in the Communication Tools category.

4. Real-time operation – Raspberry Pi does not work in real time. It schedules tasks like a normal computer does. But Arduino, being a microcontroller board, implements the code in real time. If your application needs real-time task execution, responding immediately to a call to action, Arduino should be your choice.

5. Analog Sensor Connectivity – Arduino is best suited when sensor connectivity is a vital part of your project. Just like the Arduino UNO, it has 14 digital and 6 analog input and output pins. Arduino boards can also provide analog output in the form of pulse width modulated (PWM) signals. The Arduino can be connected to any actuator or sensor using add-on boards or shields. Contrary to this, Raspberry PI does not have analog input and output pins. It only has 8 digital GPIO pins. Analog sensors can be connected to a Raspberry Pi board only by interfacing with other chips like MCP3008 or using HAT (Hardware Attached on Top) boards. HAT cards are like backplanes connected to single board computers (SBCs).

6. Plug and Play Application – Since a Raspberry Pi board after being powered on first loads the Linux operating system and then runs the application code, it can be damaged or have its operating system or program code corrupted, due to sudden power shutdown or incorrect project shutdown due to human error. In this case, Arduino is more suitable for plug and play applications, as it runs on firmware and directly executes the program code in an iterative manner.

7. Power Consumption – The Arduino has an operating voltage of 5V and can control sensors and actuators operating at a voltage of up to 20V as its input pins can tolerate these voltages, but the Raspberry Pi operates within an operating range below 5V and needs a suitable shutdown mechanism. However, both boards have low power consumption and can be used for a long time without replacing power supplies.

8. Price – If you need to implement a simple application, Raspberry Pi can be a slightly expensive selection. Many Arduino boards are three times cheaper than Raspberry Pi and can be used to implement simple applications. Furthermore, implementing a simple application on the Pi will be a waste of your best computing resources.

When to choose Raspberry Pi?

Fast complex computing – Raspberry Pi outperforms Arduino when it comes to computing power. It is based on a 32-bit microprocessor, has a clock speed of 700 or 900 MHz and has 256 to 512 Mb of RAM. The computing power and specs of Arduino boards seem timid here. They are based on 8-bit microcontrollers, run at clock speeds of 8 to 84 MHz, and have 2 KB of RAM. Obviously, a Pi can perform more complex computational operations 40 times faster.

When to choose Raspberry Pi Storage – The Pi comes with SD cards for storage ranging in capacity from 2GB to 16GB. While Arduino boards only have 32 KB or 512 Kb of flash memory. If your application code requires more storage or logs large amounts of data, Pi is the solution.

Operating System – The Arduino runs on firmware and does not have the ability to load any operating system due to design and storage limitations. If your application is complex enough to require an operating system to sit beneath the main execution code, opt for the Raspberry Pi.

Computer interface – If your project requires communicating with a computer, telephone or other microcomputer, the Pi has two peripheral USB ports to make the task easier. The Arduino is equipped with a single-input USB port for updating firmware from a computer. So opt for Pi if your project requires data communication with other computing devices.

Multitasking – Arduino simply doesn't have the design and processing power to multitask. Raspberry Pi has more RAM, speed and processing power to perform scheduled tasks in a multitasking function.

Multimedia application – Raspberry Pi is equipped with audio and video output. Hence, it is easy to program a multimedia application on it. On the contrary, Arduino only has basic functionalities in this regard. It can only run multimedia applications by interfacing with Shields and will also require other network add-on cards to send audio and video data to other systems. Making a multimedia application on Arduino is more expensive and complicated.

Network – Again, the Pi has an Ethernet port on the board and can easily connect to the Internet or local computer networks with the help of LAN or USB Wi-Fi dongles. Arduino will require additional boards/shields to connect to LAN or Wi-Fi.

When to choose Arduino and Raspberry Pi combination?

Both boards have an I2C interface and can communicate serially through it. Many applications have sensor or hardware interface as a vital requirement and also need complicated software intelligence. In this case, a combination of Arduino and Raspberry Pi works best. Hardware peripherals such as sensors and actuators can be interfaced to an Arduino board with all iterative and real-time tasks implemented at the Arduino end and the Arduino can be controlled by a Raspberry Pi on I2C for multitasking, additional software intelligence , data logging and analysis, and communicating data, audio or video messages to other devices via LAN or Wi-Fi.

Prototyping a product – Raspberry Pi is completely open source!

Raspberry Pi and Arduino are easy to use and readily available. Although Arduino is completely open source, when prototyping a product using Raspberry Pi, there were certain uncertainties. The Pi board is open source hardware, except ARM processor and Broadcom SoC, and uses closed source firmware. Although an unofficial open source firmware is also available. To build ARM processors, you must sign a Non-Disclosure Agreement (NDA) with ARM to obtain chip documentation. Likewise, use of the SoC built on the ARM processor requires signing a Non-Disclosure Agreement with Broadcom to obtain SoC documentation. Accordingly, it is necessary to provide a business model and report the number of ARM or Broadcom SoC processors used in the product and sold to ARM or Broadcom, respectively. This is what the Raspberry Pi foundation did and is the reason why the SoC or processor design specifications are not open. The Pi was designed and developed for educational purposes and the foundation claims that the Pi can be used to build a commercial product without purchasing special permits or licenses. Although the foundation encourages including the words “Powered by Raspberry Pi” somewhere on the product. The foundation is also willing to receive correspondence if the Pi is used commercially. The souvenir photo printer with Pi technology is one such product. Read more about starting a business with Raspberry Pi .

Arduino, Raspberry Pi and Arduino-Raspberry Pi Combo Applications

For a project, go for Arduino if the requirements are sensor and hardware interfacing, real-time implementation of few tasks, interfacing analog devices or if the project is a plug and play application. You should choose the Raspberry Pi if the project is more focused on software implementation, involves audio and video, requires multitasking and superior computational performance, or needs to communicate with other devices via the internet or LAN. If the project has a balanced hardware and software orientation, get a combination of Arduino and Raspberry Pi. Implement sensors and actuators by interfacing with all real-time controls implemented on the Arduino board and make the Arduino board communicate with Raspberry Pi through I2C. And let the Raspberry Pi handle complex computing, data logging, data analysis, Internet or LAN communication, and audio and video aspects of the application.

Some interesting applications that can be done on Arduino are –

– Sensor controllers
– Motor controllers
– Robotic applications
– Drones and quadcopters
– Time and date applications such as timers, clocks or stopwatches
– Item or person counters
– Automatic garage door or garage door with remote control
Some interesting applications that can be made on Raspberry Pi are –:
– Autonomous Robots
– Web servers
– Audio or video streaming servers
- Home automation
– Emulators and game consoles
– Data recording and analysis applications
– CCTV Project
– Traffic management project
Some interesting applications that can be done on a combination of Arduino and Raspberry Pi are –:
– Real-time climate control application based on weather forecast
– Robots controlled via the Internet
– Multi-robot games
– Internet-based home or office security system
– Internet-based industrial automation
– Internet-based home automation system

You can read our blog and articles section for more topics on electronic engineering, industry and technology.

Conteúdo Relacionado

ESP32-CAM is a compact camera module that combines the...
A network of sensors is embedded in every vehicle,...
The motor controller is one of the most important...
A evolução dos padrões USB foi fundamental para moldar...
A SCHURTER anuncia um aprimoramento para sua conhecida série...
A Sealevel Systems anuncia o lançamento da Interface Serial...
A STMicroelectronics introduziu Diodos retificadores Schottky de trincheira de...
Determinar uma localização precisa é necessário em várias indústrias...
O novo VIPerGaN50 da STMicroelectronics simplifica a construção de...
A Samsung Electronics, fornecedora de tecnologia de memória avançada,...
O mercado embarcado tem uma necessidade de soluções de...
O impacto dos enrolamentos da armadura CC no desempenho...
You have probably come across the term ' drag...
You probably have a support insulator if you've noticed...
You've probably seen stand an insulator sit on power...
You've probably seen shackle insulators enthroned on electricity poles,...
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.