-3

Sorry for clickbait question but it really bugs me why Arduino is still a thing in the age of ARM based boards like Pine64, Raspberry Pi, Bannana Pi, Whatever Pi etc.

I'm more or less aware of Arduino capabilities as I used to program PLC controllers but I don't really see any rational reason to use Arduino platform over ARM devboards (unless we need mission-critical level reliability however I believe commercial realtime OSes for ARM boards also exist). Even PLC and in general industrial controllers seem to shift towards platforms driven by actual RT OSes underneath running on powerfull hardware.

Getting 30$ quad core 1.2 ghz ARM board with 512M RAM, ethernet, GPIO, I2C, SPI, USB, SD card and actual Linux OS which can do virtually everything whatsoever over 25$ Arduino Uno board with abacus level performance, similar or inferior i/o, capable of only pretty basic stuff sounds to me like no brainer. Arduino sounds to me like extremely cost ineffective solution for almost anything. And I can't seem to find any rational explanation to why people still use such thing now? Maybe as Linux engineer I'm a bit biased towards Unix based solutions because I feel "safe" in this ecosystem but still I think my points are kind of objective no matter if availability of unix itself on platform is considered serious advantage or not.

Lapsio
  • 113
  • 2
  • 3
    When's the last time you did hard realtime in Linux? Or even on ARM? – Ignacio Vazquez-Abrams Dec 09 '17 at 21:25
  • Not necessarily Linux. There are OSes like QNX for example or other commercial RT systems. However RT Linux is also kind of taking off, though I'm aware it's far from RT OS. Not that you really need RT OS at this level of tasks... As long as you're not building medical equipment or industrial controllers using Arduino boards... – Lapsio Dec 09 '17 at 21:31
  • 1
    You might not need 512M RAM and 1.2 GHz quad ARM core to blink a LED :). 2K RAM and 16 MHz single AVR core might be sufficient. And the learning curve not as high. In any case, what type of GPIO performance (highest pin toggle frequency) can you get using Linux (from user space)? Bare metal has its charm (and fun). – Mikael Patel Dec 09 '17 at 21:55
  • Go to trends.google.com and show the graph for "arduino" worldwide from 2004. It is going up. However, the Arduino organization can not sit still, even if sometimes a bad choice is made. The WeMos is not an official Arduino board, but it should be. – Jot Dec 09 '17 at 22:04
  • @MikaelPatel I didn't check max PWM freq on ARM boards but I guess after setting FIFO scheduling policy to process so that preemption doesn't occur automatically you can have quite strict control over i/o timings even without strictly RT OS. Also at least how I justify power reserve is that you don't really need to run just one project on such board. With greater reserve you can run multiple projects in parallel on single piece of hardware. – Lapsio Dec 09 '17 at 22:13
  • 1
    See [When Raspberry Pi is preferred over Arduino](https://arduino.stackexchange.com/questions/47505) and [Why connect arduino with Rasberry pi?](https://arduino.stackexchange.com/questions/25060). – Edgar Bonet Dec 09 '17 at 22:39
  • @EdgarBonet yeah I've seen plenty of topics like those but I don't really agree with them as ARM board using RT OS (like FreeRTOS for example) is pretty RT and boards other than Rpi (eg. banana Pi, Rpi isn't actually that much i/o oriented ARM board) have plenty of i/o options, quite comparable with Ardu. That's why I created this question to gain more details and boarder cases where it really does make sense to use Ardu over ARM board. – Lapsio Dec 09 '17 at 22:56
  • 1
    Possible duplicate of [When Raspberry Pi is preferred over Arduino](https://arduino.stackexchange.com/questions/47505/when-raspberry-pi-is-preferred-over-arduino) – RubberDuck Dec 09 '17 at 23:42
  • 1
    One way to approach answering your question is to look at some specific implementations. Take, for instance. 1-Wire and study how the respective implementations on rpi and arduino are done (and how easy they are to use, understand, etc). Another example is MQTT or some other high level TCP/IP protocol. – Mikael Patel Dec 10 '17 at 00:44

2 Answers2

4

This is the ATtiny.

ATtiny85

It costs < $1 and is completely capable of most tasks that a hobbyist requires of a chip. Truthfully, it’s more than capable of many tasks a pro requires as well. It’s perfect for adding just a little bit of smarts to a project. Not every project needs an ARM chip, dual cores, or a Linux distro running. In fact, in low power situations, that’s likely the last thing I want. How long does your smart phone battery last? A day? I’ve heard of people powering ATtiny based projects on 3 AAs for over a year!

The Arduino is an excellent little dev board for these micros. For the cost of a few cups of coffee I can have one for my work bench. Heck, I’ve used them at work as dev boards for prototyping. It’s cheap enough to put one on the desk of every dev on a project. We can verify our code works on the target architecture very early in the dev process. That was unheard of just a decade ago.

RubberDuck
  • 332
  • 1
  • 9
  • 4
    One year on 3 AAs? I have an ATtiny running since June 2012 on 2 AAs. As much as I love my Raspberry, I'm sure it can't do that. – Edgar Bonet Dec 09 '17 at 22:28
  • It's just uC. ARM SoCs are also super cheap but that's not the point. It's not board with meaningful i/o, just single component. You need either custom PCB for that or some of the shelf one as it doesn't even have any form of power delivery (though I can't seem to find off the shelf i/o boards for ATTiny). It's not ready to use platform. I got flushed by Arduino Uno price. Didn't consider it's mostly price of programmer, debugger and whole starter kit rather than uC itself. However like I said I can't seem to find universal i/o boards for ATTiny with something like GPIO – Lapsio Dec 09 '17 at 22:29
  • 3
    @Lapsio: See the [Trinket](https://www.adafruit.com/product/1501). – Edgar Bonet Dec 09 '17 at 22:36
  • The 328P & 32u4 (most commonly used chips for Arduino) are similar enough to the Tiny to use them as dev boards. Atmel has really done a fantastic job of keeping their libraries portable between their devices. – RubberDuck Dec 09 '17 at 23:05
  • @RubberDuck My concern about common Arduino dev boards was that they're expensive. Too expensive considering capabilities compared to ARM boards. But with i/o boards like mentioned Trinket it's fair price. 7$ is significantly less than 30$ and this is something I can understand. – Lapsio Dec 09 '17 at 23:14
  • You’ve got to be trolling. An [arm eval board runs $250](https://www.amazon.com/LeMaker-HiKey-Single-Board-Computer/dp/B071RD3V34?th=1&psc=1) and that’s on the less expensive side. – RubberDuck Dec 09 '17 at 23:31
  • @Lapsio: If you think the Trinket is a fair price, how about $1.45USD for a Pro Mini (same performance specs as the Uno) at aliexpress. – VE7JRO Dec 09 '17 at 23:40
  • How about this? http://www.orangepi.org/orangepizero/index.html and the cheapest variant is $6.99 :) – Mikael Patel Dec 10 '17 at 00:48
  • Here is another one $8.99 and comes with Ubuntu preloaded; http://www.friendlyarm.com/index.php?route=product/product&path=69&product_id=132 – Mikael Patel Dec 10 '17 at 00:55
  • @RubberDuck it was pretty bad example of really beefy ARM board. 3gb DDR4 RAM is more than most phones have to offer. I didn't even know such overkill ARM boards are widely available. Average price of mainstream ARM boards is somewhere around 30-50$ for ~1Ghz few cores, ~1GM ram and some mainstream i/o. Those 8$ ARM boards are rather ultra compact ones without ethernet and quite poor i/o options in general so I don't think comparing them to more complete Arduino boards is fair either. – Lapsio Dec 10 '17 at 06:41
3

An arduino board is really a breakout for a micro processor. Microprocessors you can get separately. A rPi is really a full system without that modularity.

There are also other size factors for that breakout board, many of which are much smaller than a rasberry pi and will have a much better battery life. And very often the abacus-level perf and half a dozen GPIO pins is all you really need.

Also some people enjoy having direct control over the chip in a way that a semi-stripped linux OS on a poorly documented platform just doesn't give. Hard realtime when you don't have full control over the system means you need to trust the RT-OS writers to actually hold to their documented deadlines.

ratchet freak
  • 3,277
  • 1
  • 11
  • 12
  • On the other hand from engineering standpoint it doesn't really seem to be wise to trust your own code more than industrial solutions at least as long as you didn't break everything into ASM code and compared against timings of individual instructions for certain uC. It's general rule of thumb to use as much of the shelf stuff as possible while designing RT systems to avoid necessity to prove time limits. – Lapsio Dec 09 '17 at 21:43