by pedalpete · 10y ago · 0 comments
With the low price of something like the Pi Zero which is running a full version of linux, or something like the Esp8266 which can run many different languages, you're basically paying shipping costs. What benefit does arduino have in this future, other than a large existing network, which I understand can't be overlooked as a strength.
That's the difference between having to change a couple AA batteries every day or two (Pi Zero) and running for a year off of a coin cell (Arduino).
Here's an article on power consumption of an Arduino Pro Mini: http://www.home-automation-community.com/arduino-low-power-h...
Here's one on Pi Zero power consumption: http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi...
You'd have to deal with different architectures and a lot of headaches, but it's the idea behind ARM's big.LITTLE, where you pair high-perf high-power and low-perf low-power cores. So your tablet's SoC might have a ~200mW A53 for mostly-idle use with a ~1W A72 for more active "high-performance" work loads. And the only additional hardware is the additional cores and the interconnect, the SoC is shared between "low-perf" and "high-perf" cores, which probably wouldn't be the case for an arduino/arm mix.
The Arduino is underpowered for anything more than a supervisory role, and even those applications are tending towards Cortex-M series.
Maybe that can be worked around? eg if updating only a small area. Or as a second display for docs.
If the eInk display doesn't use this raster model but rather an addressing model then it might be possible to support partial updates. I doubt very much that it does though.
see also: https://arduinohistory.github.io/#when-did-arduino-begin-and...
Not just the timing is critical, also the failure causes (and modes) are far bigger in number when running an OS.
E.g. if you properly code in C or ASM for a microcontroller and avoid things like recursion, it's very hard to crash due to OOM errors.
- DRAM refresh
- cache hits/misses
In essence, a job that requires 90% of the CPU time on predictable hardware can often be solved by just throwing faster hardware at it. If the RasPi can do it using 5% CPU, then it's probably fine.
YMMV. Don't do this on medical equipment, space rockets, or self-driving cars.
The AM335x has a pair of "PRU" units on the die, that are roughly little microcontrollers that have access to the main ARM's memory.
So, you can write to main memory from Linux, jitter and all, and then let the PRU stream it out to anything that needs high speed, predictable data.
This guy put a BB black inside an old MAC SE, and is driving the CRT with the PRU...very cool: http://www.nycresistor.com/2014/02/02/30th-anniversary-mac/
Very cool project, thanks for linking!
Not saying running on the bare metal is worthless, but an Arduino is a really low end board.
Microcontrollers like the Arduino/Atmel are perfect for situations where you need to guarantee that some signal will be asserted exactly 250 (no more, no less) nanoseconds after some other external event, _no_matter_what_.
Since there's usually no OS running on something like an Arduino, you're basically forced to write very deterministic event driven programs. Also, since most (maybe all) instructions on those Atmel microcontrollers execute in a single clock cycle, you can easily dissect your C functions and know exactly how long they will take to execute.
I wouldn't trust Linux for such an application even with a "real time" scheduler.
Linux as a RTOS certainly has it's place, but it's best left for systems that can actually benefit from the added complexity.
For most typical microcontroller projects, the extra features of a full Linux kernel would just get in the way.
Note: There's nothing stopping someone from using a RPI in such a way as well (bare metal), but they are really geared for more complex applications, so there isn't as much support in that area. Also, the hardware is probably a little more complex. Therefore, my statements assume we're comparing an Arduino to an RPI running Linux.
What is an example of something like that?
Just because it's slow doesn't mean you can't predict what's going to happen, they're two separate issues.
Does an architecture (ARM / AVR / x86) limit the possibility of writing real-time code if the code is the OS, and just runs on the bare metal?
Your program would run in ring 0, be the only "process" and have full access to RAM. You decide whether you want to handle interrupts or not. (I assume there's a way to select what interrupts you want to handle.)
[1] For e.g., this tutorial explains how to write a basic x86 kernel: http://www.jamesmolloy.co.uk/tutorial_html/
The Pi Zero is the next thing over from vaporware. I know some people who have a few, but all of the official vendors linked from https://www.raspberrypi.org/products/pi-zero/ are either out of stock, or have "limit one per household."
I'd been having trouble figuring out where to source the BCM 2835 SoC that powers the Zero, and there's (allegedly) a reason for that: https://olimex.wordpress.com/2014/08/28/who-fears-from-the-c...
I really like that bigger better tiny hobby computers are being developed, but the things you mentioned - running Linux & many different languages - don't appeal to me the same way Arduino does. Adding modern day benefits like tons of memory or 3D display means I'll be just programming, like I would at my day job developing console games. With the Arduino, on the other hand, I'm always hacking.
Yes it has sleep modes, but they are not as deep as the arduinos, and require work to make them effective.
The only problem I've heard of with these is that the drivers are not shipped with some operating systems (such as OS X) and so you might have the hassle of installing a driver. FTDI drivers come with all major operating systems, so one less thing to deal with.
I believe I've seen Uno clones on AliExpress that are about twice as expensive as the cheapest clones (so around $6) that use an ATmega16u2 to handle this, which is what a genuine Arduino Uno uses, and so is no more hassle than a real Uno.
There are some USB->serial chips that cost more than a CH340 but quite a bit less than an FTDI, and that work with the generic serial communications driver that is built into all major operating systems. I haven't seen any Arduino clones that use these, which is a shame. I'd love not having to rely on any vendor-specific code.
Altough as a prototyping platform, i can understand how javascript would be more appealing. And for production, even by startup, the Arduino is far from ideal, mbed is much better.
And things like the Beaglebone Black have better real time capabilities but as someone who has worked with BBB for over a year now, it is so horrible to develop for I almost cried.
Embedded Linux is pretty bad for hacking, but it's pretty good for industrial controllers and other "solved" problems. Microcontrollers are still the way to go.