0

I have got an Arduino UNO which I have purchased recently and a Raspberry Pi which I have been using for quite sometime now. I have got a ESP8266 NodeMCU AI-THINKER dev board as well.

I have used the GPIO module to make some simple stuffs using Raspberry. Can someone tell me where to use Raspberry Pi and when to use Arduino UNO.

Will Raspberry be used as a controller and Arduino be used as a device which triggers the end devices (Arduino UNO is cost effective to become a receiving client.)

  • 1
    The pi is more powerful, but there are two use cases where Arduino beats it: 1) analog data the Pi does not have any analog GPIO's and the Arduino does, 2) Real time operation the Pi runs linux and so does not have the real time capabilities that the Arduino does. Having said that you can add analog capabilities to the Pi with the addition of additional hardware. The arduino can sometimes be easier and there is probably more code for an arduino than for the Pi, by virtue of t being around longer. The Arduino (depending on the model) can work with both 3.3v and 5 v sensors. – Steve Robillard Aug 31 '16 at 10:54
  • Again with extra hardware you can do this with the Pi as well. As for price the Pi zero at $5 certainly compares favorably with the Chinese sourced arduinos and the esp9266 devices. – Steve Robillard Aug 31 '16 at 10:58
  • @SteveRobillard, problem with the Zero is still the one-per-customer rule as I think that the OP wants multiple clients. So purchasing the needed amount might be a pain. – Ghanima Aug 31 '16 at 11:04
  • 1
    I am sure you realise this is off topic, but I can't help commenting. Only 1 P and 1 Arduino !! When I built my first computer in the '70's people asked why you would want one. A little later when computers became available it was common for promoters to claim "it is only limited by your imagination". I use Arduino for boring repetitive tasks e.g. controlling a hot wire cutter, monitoring temp/humidity. The Arduino has the advantage of being crash proof, and runs on the smell of an oily rag. – Milliways Aug 31 '16 at 11:05
  • 2
    @goldilocks All the best toys come in large, well-stuffed, exceedingly cheap sacks from China. IT'S GOT WIFI AND IT ONLY COSTS A POUND FIFTY! New and improved ESP32s are incoming as well. Squeeeeee. – goobering Aug 31 '16 at 13:23
2

The answer lies within the pros and cons of the devices and weather they meet the goals of your project.

Raspberry Pi pros

  • More powerful/faster - good if you have a project that requires intense computation.
  • Fully fledged operating system - good if you have a project that requires more complex actions/interactions with systems or you need to make use of some of the vast amount of software available for arm linux.
  • More features - if you need to make use of the extra features such as HDMI, USB host, GPU, more memory etc...

Arduino pros

  • Cheaper - if cost is a concern Arduino based solutions can be a fraction of the price (the ATmega328P chip is only $1-2).
  • Less power hungry - if power is a concern (running of battery) the Arduino can use a fraction of the power that the Raspberry Pi uses (> 0.2mA vs > 2-300mA for the Pi) allowing you to run for longer.
  • Truly real-time - the Arduino is a real time device, if you require precise timing the raspberry Pi might not be accurate enough. This is due to it running a fully fledged non real time OS. Where as the Arduino you have complete control over the software and timing inside it.
  • Reading analog sensors - the Arduino has a native ADC, the Pi does not. You can get around this in the Pi with external hardware (including using an Arduino).
  • 5 V tolerant - the Arduino can talk to 5 V devices where the raspberry Pi is only 3.3 V tolerant. In most cases the Arduino can also talk to 3.3 V devices (if they are at least 5 V tolerant or read only devices) so you have more flexibility but both can make use of logic level shifters at the cost of more hardware.
  • Simpler - you don't have to worry about an operating system, burning to SD cards, setting up software on the device - you just write a sketch and flash it to the Arduino.

If none of these are a concern/needed for your project then either the Pi or Arduino should work. You might find one more fiddly to used then the other for various projects but you will find that for allot of projects both will work equally well. Quite often you can take advantage of both systems in a projects; such as the real time nature of the Arduino and the software on the Pi by making the Pi talk to the Arduino over serial, SPI, I2C or another communication protocol they share.

  • Thank you for the answer. It really answers my question when it comes to making cost effectiveness. But can you look my question to goldilocks. I would be really happy to know your suggestions on "Taking to Arduino from Raspberry - wireless" – Varad A G Aug 31 '16 at 11:55
  • I think you should just go for it with the ESP -- get it online, then attach it to the Arduino serial pins with a level shifter. You should be able to communicate the exact same data via wifi as you would if the UART were connected directly to the pi except using some TCP/IP based protocol. There's a lot of web server oriented code around for the ESP demonstrating that kind of thing, where it is hooked up to a sensor. Just in this case the sensor is an Arduino. – goldilocks Aug 31 '16 at 12:02
  • 1
    There are many ways to talk wireless between the raspberry pi and arduino: bluetooth, 433mhz rf transceivers, wifi, xbee, Nrf24L01. Each again have their pros/cons. Bluetooth/wifi work well if you have a pi3 as you need to extra hardware on the pi side and you can use an ESP or a bluetooth to serial chip on the arduino side. 433mhz rf transceivers are good in low power devices, especially if the arduino is only sending, the ESP and bluetooth require a connection to be established which takes more time/power. But wifi/bluetooth can be more reliable as their stacks handle losses better. – Michael Daffin Aug 31 '16 at 12:17
  • 1
    If you are just talking to a i2c sensor you can use an ESP12e directly and avoid the arduino completely. – Michael Daffin Aug 31 '16 at 12:20
  • Or you can do something like: instructables.com/id/… – Michael Daffin Aug 31 '16 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.