We are doing some projects in class. One of my friends is doing a weather and humidity station using raspberry Pi with a couple of sensors and LCD. I have a little experience in Arduino. So I asked her, why doesn't she do it using an Arduino? She said Pi is more 'powerful'. In what aspects, is it more powerful than Arduino? When should I go for Raspberry Pi over Arduino?
3It is more powerful indeed. Yet an overshoot for a "weather station". RPi is a full featured computer. Arduino is a pretty stupid and weak microcontroller.– Eugene Sh.Dec 7, 2017 at 19:07
Overshoot. Hm I kinda felt the same :-)– Meenie LeisDec 7, 2017 at 19:22
As explained in the answers, each has its own strengths. Some projects can even benefit from using both. See the answers to this somewhat related question: Why connect arduino with Rasberry pi?– Edgar BonetDec 8, 2017 at 8:39
2@EugeneSh. Yet it always beats Pi on uptime, power consumption, GPIO output current, has ADC, and the driver libraries for WiFi shields don’t break in operation. Try keeping a live WiFi link with a Pi for two weeks...– user2497Dec 9, 2017 at 13:18
2Arduinos usually also beat a Pi in terms of security, a full OS most certainly has more exploits than a Nano running a few hundred lines of code. :D– AvamanderDec 12, 2017 at 17:11
Somewhat of an opinionated question but I'll give some feedback. It depends on various things:
- How much UX and UI you want to give to your client
- How easily can you program it
- Which is a cheaper solution
- How fast do you want the program to run
- What is more durable and how long do you want to use the device
To prevent this answer from being lengthy, I'll do a quick comparison from my experiences with both.
Arduino: Cheap, easy to program, capable of flexibility with UX and UI but has very limited memory. The Arduino is typically good for something that can just complete tasks on their own. I've written state machines and have used it for PLCs with an Arduino. It's a good device for a cheaper budget. Arduino is pretty fragile, however.
Raspberry Pi: More expensive, a lot more powerful in terms of processing speed, has a lot more memory, extremely good for UX and UI devices that are being developed, good for artificial intelligence, state machines, PLCs, etc. Also really good for data logging, image processing, and radio frequency applications. You can also boot an operating system on it (e.g. Linux/Unix). In other words, a Raspberry Pi can used as a computer while the Arduino... well I guess it depends how you define, "computer" LOL.
So if you're trying to do something as simple as using sensors and LEDs, I'd go for the Arduino Uno.
1Yea. I guess Arduino is better for sensor related projects. Also I think Pi consumes more power.– Meenie LeisDec 7, 2017 at 19:50
Dont forget that there are more Arduinos than just the Arduino UNO, for example the DUE is a 32bit MCU which can be used for tasks that are not normally suited for a standard microcontroller such as DSP.– A.J.Dec 7, 2017 at 22:49
@A.J. Before I edited my answer, I did talk about the Due but I didn't find a purpose of including it because the functionality is still the same as its 8 bit siblings... I have seen people write their own operating systems with the Due, which is quite a feat.– user23244Dec 8, 2017 at 1:35
Raspberry pi is more powerful but a micro controller is more consistent. If you need to be pushing a value down a wire with very specific timings the you will need an arduino because having a full OS on the raspberry pi means sometimes there will be delays from the OS scheduling other tasks first.– QwertieDec 12, 2017 at 0:36
The claim that the Pi is more "powerful" is a bit misleading. What does "powerful" really mean? And is it relevant to making a weather station?
I made a temperature and humidity sensor as described here using an Atmega328P (the processor that is in the Arduino Uno). The estimated average power consumption is 42 µA which has allowed it to run from 3 x AA batteries for a couple of years before they needed replacing. I think you'll find that the Pi with its more "powerful" processor and extra components would not be able to do that.
I see from a quick search that the Pi consumes 80 mA to 240 mA when idle (depending on the model). This would make a Pi-powered weather station eat through batteries 2000 times as quickly. Perhaps that would be a consideration.
The Pi is really a Unix PC on a board, which means it goes through the normal boot sequence with a possibility of errors occurring during booting. To see what those errors are you need to connect up a keyboard and screen, or connect via a network to it from another PC.
I don't want to run down the Pi - it's a nice cheap Unix computer on a small board. But the Arduinos (many of them) are somewhat simpler to program. You don't need to worry about the operating system for a start. For a weather station, taking a reading every 5 minutes, who cares if the Pi can take the reading "50 times faster"?
Speed of recovery from sleep
I have an answer about letting serial data wake an Arduino - after some experimenting I was able to get the Atmega328P to wake from its deepest sleep (260 nA - yes 0.260 µA!) within 6 clock cycles (750 ns). I doubt you could achieve that on the Pi, either the low power consumption, or waking up in under a microsecond.
This was fast enough to detect the start bit in serial data at 9600 baud, process the start bit, and then the rest of the incoming byte without losing data.
1The errors point is pretty good. Because the pi is doing all the normal linux stuff like writing to storage, it it loses power it could end up breaking the OS where as an arduino should be able to be powered off and on with no issues.– QwertieDec 12, 2017 at 0:41
As opposed to the Arduino boards, the Raspberry Pi is a single-board computer with a quad-core CPU, a GPU, on-board RAM, and many peripherals. The main difference between the Pi and the Arduino (or any basic microcontroller) is the operating system. The Pi runs many Linux distributions (Debian being the official one), enabling the user to execute complex computing tasks that would be impossible to run on Arduino without external circuitry. Hence, the Raspberry Pi would be adequate for any software requiring significant CPU/GPU power or memory. Keep in mind that most Arduino's can be interfaced with the same type of peripherals that are found on the Raspberry Pi, although processing power might be lacking. Also, low-level interfacing with analog signals is much more convenient with Arduino, since it has integrated ADCs (analog-to-digital converters).
When should I go for Raspberry Pi over Arduino
There is always the price difference but apart from that I would say: The Raspberry Pi can do everything the Arduino can and do it better and faster EXCEPT tasks which are very time critical. Thus if you need to responds to events in micro seconds or millisecond or if you need to generate signals in those order of magnitudes you will need an Arduino.
2Bare metal programs on RPi won't perform any worse than Arduino for any realtime requirements. People are just spoiled by having OS on it. Dec 7, 2017 at 19:36
Yea bare metal programs will be too faster than Arduino. Cz, Pi's clock is almost 50 times faster :D– Mitu RajDec 7, 2017 at 19:58
In "pure hardware" based systems, real time systems, you can always prefer Arduino over Pi with OS. Power consumption, price are other plus points for UNO. Pi is always the better one in complex computing tasks, where its OS simplifies those tasks. But you don't wanna use a "computer" for sensor related projects for sure !