logo elektroda
logo elektroda
X
logo elektroda

When to use Arduino and when to use Raspberry Pi?

kmmepl 20283 14
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • When to use Arduino and when to use Raspberry Pi?
    Arduino and Raspberry Pi are the most popular prototype platforms among students, hobbyists and professionals. Experienced electronic engineers know both PCBs and the differences between them, however newbies are often confused and ask questions like:
    o which platform to choose for their project,
    o which is easier to learn,
    o which has more possibilities.

    Therefore, in today's article (mainly aimed at newcomers to embedded systems) all the differences between Arduino and Raspberry Pi will be described.

    Raspberry Pi

    When to use Arduino and when to use Raspberry Pi?


    The Raspberry Pi is a fully functional computer consisting of a single printed circuit. It runs on a specially designed Linux-based operating system called Raspbian. It is the official operating system created by the makers of Raspberry Pi, which is used by most users of this platform. In addition, there are also other systems created by third parties, such as: Firefox OS, Android, RISC OS, Ubuntu Mate, as well as the possibility of installing Windows 10 version.

    Like any computer, Rpi has its own memory, processor, USB port, audio output, HDMI output and as it is based on Linux, most of the software dedicated to this system is available on it. Raspberry Pi is available in several generations: Raspberry Pi, Raspberry Pi 2, Raspberry Pi 3 (with different models for each generation). These releases differ in parameters of the installed components, but the general idea of operation is the same.

    Arduino

    When to use Arduino and when to use Raspberry Pi?


    Arduino is a development platform based on a simple microcontroller that does not match the computing power of the processor installed on the Raspberry Pi. However, for many simple projects the performance of this processor is more than enough. Unlike the Raspberry Pi, Arduino does not have an operating system, which greatly simplifies the programming process. As in the case of the Raspberry Pi, Arduino also has several variants that differ in the type of microprocessor installed, the mentioned variants are: Arduino UNO, Arduino PRO, Arduino MEGA, Arduino DUE etc.


    Differences

    In order to understand the differences between the Arduino platform and the Raspberry Pi, the advantages and disadvantages of both devices will be described. First, the advantages of Arduino over Raspberry Pi will be considered:


    Advantages of Arduino over Raspberry Pi


    Simplicity:
    Due to the ease of use, Arduino wins over the Raspberry Pi without a doubt. With a few lines of code and simple software, you can read values from various sensors or buttons, and manipulate various objects, such as fans, motors, heaters, etc. While on the Raspberry Pi, you need to put much more work into the simplest things like reading analog value from a sensor . You need to install libraries and software, you should have knowledge of the structure of the Linux operating system and its commands.

    Resilience:
    The Raspberry Pi runs on the operating system, so for reliable operation it needs to be shut down properly before turning off the power. Otherwise, the operating system and applications may be damaged. While the Arduino can be turned on and off at any time without the risk of damaging it and when power is restored, it executes the code without a hitch.

    Power consumption:
    The Raspberry Pi is a powerful device that needs a current of around 500mA and a voltage of 5V. The Arduino, on the other hand, takes about 100mA. The given values may vary depending on the program and configuration of a given platform, but without a doubt Arduino has a much lower power consumption, which can be crucial for battery-powered projects.

    Price:
    Due to its much simpler construction, the Arduino is much cheaper than its rival. Depending on the model, the price of a Raspberry Pi is roughly double that of an Arduino.


    Advantages of Raspberry Pi over Arduino:


    After reading all the benefits of Arduino over Rpi, you can start to think that Arduino is the better platform. However, whether a particular tile is better depends mainly on the requirements of the project. Below are the advantages of the Raspberry Pi over the Arduino.

    Computing power:
    This is the main advantage of the Raspberry Pi. Raspberry is capable of performing tasks in a time comparable to a PC. This feature is especially useful in complex projects involving robotics or websites. Rpi can also be converted to a web server, vpn, database management system, etc. Raspberry Pi is about 40 times faster than Arduino, so you can send e-mails, listen to music, play games, browse the internet. It also has various USB or Ethernet ports and does not require external accessories to perform most of the functions.

    Network:
    The networking activities on the Raspberry Pi are much easier than its competitor. It has a built-in Ethernet port through which it is possible to connect to the network in a wired manner. You can also connect wirelessly using cheap Wi-Fi modules with a USB interface. In the case of Arduino, you need to purchase external devices that must be properly programmed using a relatively complicated code.


    Summary:


    Some people find the Arduino platform the best for beginners, however, according to the author, a novice can handle any of them. The choice between platforms should mainly depend on the characteristics of the project.

    You should choose Arduino if:
    o we have knowledge of electronics or we focus on learning about this field,
    o we make a relatively simple project without network functions,
    o the structure we create does not require a developed user interface,
    o we are not strictly interested in computer issues.


    You should choose Raspberry Pi if:
    o we deal with a complex project using the network,
    o the construction we make requires a complicated user interface, such as VPN or WWW server,
    o we are not strictly interested in electronic issues,
    o we have good knowledge of Linux.

    Arduino is best for repetitive tasks, such as opening doors or turning on lights, and the Raspberry Pi is suitable for more extensive projects, such as a weather station (link to the project) or car multimedia system (link to the project) . Rpi has great potential in the Internet of Things (IoT) world, where devices directly exchange information between them and control multiple elements in the absence of human intervention.


    source: https://circuitdigest.com/article/arduino-vs-raspberryp-pi-difference-between-the-two

    Cool? Ranking DIY
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
    About Author
    kmmepl
    Level 13  
    Offline 
    kmmepl wrote 73 posts with rating 321, helped 7 times. Been with us since 2013 year.
  • ADVERTISEMENT
  • #2 16508663
    elektryku5
    Level 39  
    The easiest way to ask yourself is whether you need an operating system in a given project.
  • #3 16508699
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #4 16508731
    tronics
    Level 38  
    I do not agree with the thesis that Arduino is "simpler". You put microSD into RPi, raspbian starts, you turn on python and wave GPIO. What's the easiest way to an arduino? You fire up the PC, open the IDE, create a sketch, connect arduino via USB, boot via bootloader, something does not work ... you change the script, load via bootloader ... For me it is not any easier. When it comes to sensors, etc., some of them are supported by additional (albeit standard "equipment") libraries, eg WiringPi. The rest can usually be added very easily. If someone gets used to serving "on a tray", they will always be dependent on the community. Of course, for serious applications, however, the Raspberry alone is not enough. An example is an intelligent building ... you set the lighting level (LED), what where on, what temperature on the heads, power failure, the system on microsd is damaged, raspbian does not get up and does not control the relays. Tragedy! And now it is enough for RPi to be only a supervisor for Arduino and it will provide support for intelligent sequences (e.g. lights and motion sensors), "no one is at home, but the lights are on" mode, network support (lan / wan / gsm) . Will it fall? It's hard ... arduino will get up, load the last settings, handle manual switches and with limited functionality (no web preview and no operation via the network) but it will work.
    I have nothing to do with people shooting a fly from a cannon (rpi for simple things) - because it will just be a waste, but it will work, but taking a dragoon with a dragon (arduino for the webcam, LCD, www) is just not reasonable, and not there is a lack of those who are loading into it anyway. And at this point, 10x faster, 10x easier, but the RPi will be easier.
  • #5 16508792
    Simon79
    Level 21  
    I have both, but it never occurred to me to compare an arduino with a raspberry. They are two different worlds. Arduino is such a kit for learning the programming in wc / c ++ of the 8-bit Atmel AVR microcontroller. Someone had an interesting idea, had good marketing and it turned out ...
    Raspberry Pi is a computer with an operating system on a card (you can stubbornly use AVR DOS in arduino, but it's not the same) with much more possibilities, even when it comes to PI zero.
    In my opinion it is not easier / more difficult or better / worse. You can flash a diode on a raspberry and make a server on arduino, but it's not better the other way around :)
    For projects where I used atmega or attiny, I choose arduino, for more advanced things - raspberry.
  • ADVERTISEMENT
  • #6 16509111
    elektryku5
    Level 39  
    tronics wrote:
    And now it is enough for RPi to be only a supervisor for Arduino and it will provide support for intelligent sequences (e.g. lights and motion sensors)


    It also reduces costs, because you can install the executive modules in various places on the AVR and, for example, ENC28J60 or after WiFi, immediately ESP8266 (even without an additional microcontroller).

    The uC itself is also better to program in pure C, at least the environment does not impose specific models, and there are really a lot of libraries on the Internet.
  • #7 16509302
    kamil12451
    Level 10  
    drobok wrote:
    In arduino you are condemned to the library mentioned above.

    No, you are not doomed. You can program in pure C on AVR or even in ASM. More than once I have made insertions of pure C (e.g. setting the appropriate registers to support PCINT, etc.) and somehow everything flickered elegantly. Ability to manipulate the uC in a regular C using the documentation and taking advantage of the simplicity of Arduino. At the beginning, I started my adventure from pure C to AVR, switching to Arduino I was surprised that everything just works and is very simple. But using my experience I combine both of these "technologies".

    And comparing the Arduino to Raspberry .. well, it's like comparing a city car to a supercar with a powerful engine. Such a sports car for the city is supposed to be suitable, but I would rather prefer something smaller with less power. And a supercar for the track. It all depends on your needs
  • #8 16509690
    siewcu
    Level 35  
    kmmepl wrote:
    play games

    It is me, please let me know what you can play on RPi. It seems to have "a lot" of computing power, but somehow I have not heard about any games ... Apart from the basic ones in the browser, and from what I have heard from friends, they do not even run smoothly.
  • #9 16509842
    pyton
    Level 21  
    Hello

    Strangely, some who write, perhaps due to lack of knowledge / did not read something ...

    Arduino IDE is just a simplified C, you can write in this "environment" in pure C and there will be no problem ... everything will compile. (everything goes in DEV C ++ anyway)

    Nobody said that you have to use libraries ... you can create them yourself ...

    You can create a mini Webserver on Arduino, but the fact that it is a relatively stupid idea - although I do it myself now ... (Arduino Mega + ESP8266 + TFT + LCD + sensors etc.)
    The ESP8266 itself has a 80MHz prock ... on which you can put a program ...

    Second thing: Arduino is of many types, for example: we have a DUE version with AT91 SAM3X8E 32-bit 84MHz core - it's quite fast equipment and the cost is around PLN 60 from China ...

    To sum up:

    I would make simple drivers on uC (Arduino), then we learn the basics of C, then we can switch to clean C once we get used to "Arduino IDE"
    After all, it's an ordinary AVR on a board with a ready-made power supply and the rest "minimal" to work ...

    And Malinka ... this is already a combine with an operating system ... on which you can do more ... but is it worth using such equipment to measure the temperature? The second thing is that C will also be useful here ... After all, RPI only uses Python scripts to handle GIPO? So C will be functional too.

    Someone correct me if I think wrong ... A few months ago I was over such a choice and chose Arduino ... except that I started programming with a simple diode flashing, because I had no knowledge ...

    Regards
  • #10 16509986
    tronics
    Level 38  
    Buddy python - it's all true what a colleague wrote, but who installs arduino I am going to write close to metal (i.e. on registers)? For example, eclipse with avr plugin will be better for this. People aren't doing arduino for that. In 99%, it is the simplicity of project implementation due to the huge amount of ready-made materials. ESP8266? In 5 minutes you have a project done, reading the temperature from the DS18B20 sensors and sending it to Thingspeak. Lovely. I don't remember exactly what memory usage, but quite a lot. Well ... in either oats or hay. Or to write quickly, easily, and nicely on an overgrown mare; or write a program that is fast, compact but at the cost of your own time.
    @siewcu - most of what works on opengl es in the rpi-supported version (and ARM), for example, emulators (retropies) if you want. There is a bit of it, and it's certainly not about browser games.
  • #11 16510763
    kamil12451
    Level 10  
    Buddy tronics, when it comes to environments, in my opinion the Arduino IDE is not a lot (the only advantage is that it is quite light, built-in examples and makes charts from the series), I tried eclipse and something was always wrong, and Visual Studio .. A simple addition and everything starts to work beautifully. But maybe I am used to syntax completion etc from other development environments.
  • #12 16511160
    Marek_Ertew
    Level 16  
    Why Arduino and other uCs and not an rPi class computer?

    1. Start time.
    Arduino (bootloader) starts faster than rPi (OS). If we use uC without a bootloader or with a bootloader activated with the logical state, the start will be even faster. In laboratories and industrial conditions it is not very important, but in devices that are in contact with the user, the lighting of the first light / text on the display several seconds after switching on may be unacceptable.

    2. Response time.
    rPi is faster in calculations, but will the interrupt system and OS response time be shorter than just entering an interrupt on a much slower AVR? Yes, situations where a response time below 1ms is needed is rare, and the uC will lose with a greater complexity of the algorithm, but a simple power cut after detecting a fault will be much faster and we do not have to worry about the OS freezing.

    3. I / O ports.
    Arduino can provide outputs with 5V voltage (depending on the supply voltage) and current up to 40mA. rPi only 3v3 and max 16mA. Sometimes it matters, sometimes it doesn't. It all depends on the cooperating peripherals and whether we want to use additional buffers.
  • ADVERTISEMENT
  • #13 16511215
    Jawi_P
    Level 36  
    The most senseless comparison I've ever seen.
    If someone carries out a project, thinking about which platform to choose, it only means that there is not the slightest idea about both of them.
  • #14 16511745
    etet
    Level 15  
    Marek_Ertew wrote:
    1. Start time.
    Arduino (bootloader) starts faster than rPi (OS). If we use uC without a bootloader or with a bootloader activated with the logical state, the start will be even faster. In laboratories and industrial conditions it is not very important, but in devices that are in contact with the user, the lighting of the first light / text on the display several seconds after switching on may be unacceptable.

    2. Response time.
    rPi is faster in calculations, but will the interrupt system and OS response time be shorter than just entering an interrupt on a much slower AVR? Yes, situations where a response time below 1ms is needed is rare, and the uC will lose with a greater complexity of the algorithm, but a simple power cut after detecting a fault will be much faster and we do not have to worry about the OS freezing.


    Remember that you can write bare matal applications under Raspberry or use non-Linux systems. Then the start is of course incomparably faster (e.g. half a second). There is some material on this topic and I was able to create something there.

    But overall the comparison is hopeless. Only on the other hand, it's hard to be surprised if even experienced people have such a stupid approach. For example, I ask if there is something a few% faster than the most ordinary arduino uno and they write to me that I should take rasperry. And that's the best from 4-core times, because now everything is super available. So what if it's cost, huge power supply, wasted energy, booting for 40 seconds, wasted resources overall. But there is linux, and you can write applications in python. Oh cool.
  • #15 16512806
    dondu
    Moderator on vacation ...
    The above comparison is for beginner hobbyists and at the appropriate level for them. Therefore, the very fact of comparing two completely different but very popular platforms should not be criticized.

Topic summary

The discussion centers on the comparison between Arduino and Raspberry Pi as platforms for electronic projects. Key points include the need for an operating system, with Raspberry Pi being a full computer running Linux (Raspbian) and Arduino being a microcontroller platform. Users highlight that while Arduino is often perceived as simpler, Raspberry Pi offers more capabilities for complex projects, including programming in various languages like Python and C++. The choice between the two depends on project requirements, such as power consumption, response time, and the need for rapid prototyping. Arduino is favored for simpler, low-power applications, while Raspberry Pi is better suited for projects requiring more processing power and flexibility. The discussion also touches on programming environments, with some users preferring the simplicity of Arduino IDE, while others advocate for more advanced environments like Eclipse or Visual Studio for Raspberry Pi.
Summary generated by the language model.
ADVERTISEMENT