Unpopular Opinion: Don’t Use a Raspberry Pi for That
set-inform.com
set-inform.com
Something like ESP32 is much more reliable at controlling hardware. It will never miss on a triggered limit switch in time because memory ran out for some reason and it started swapping.
But I mostly agree with the article, I have a Gigabyte Brix fanless NUC-alike as my real home server, and a couple of Pis doing little things (and switched to 'overlay file system' so running only from memory and not writing to those frail SD cards).
An ESP32 can still have both of those things in some capacity.
https://randomnerdtutorials.com/esp32-ntp-client-date-time-a...
There's knowing the time, which you can do with something like NTP. That the RPI can manage just fine.
And there's acting with precise timing, eg, if you need to control a mechanism and reliably react on a deadline of a few ms. A RPI doesn't perform well there, which is why 3D printers use microcontrollers instead.
A long time ago, I was playing with Project Nerves on an Orange Pi running some flavor of debian. I was doing some I2C transaction (at 400 kHz, each bit is single-digit microseconds), and I ultimately had to have a re-attempt loop because the transaction would fail so often. I found a failure cutoff of 5 attempts was sufficient to keep going. I don't recall the failure rate, but basically, whenever a transaction failed, I'd have to reattempt 2-3 times before it eventually succeeded.
Meanwhile, on a bog-standard Arduino with an ATMega328P, I send the I2C traffic once, and unless the circuit is physically damaged, the transaction will succeed.
Seriously, stick a scope or logic analyser on e.g. an I2C line and look at the timing consistency. Even on specialised kernels for realtime use, you can have variable timing delays between each transaction on the bus. And this is all in-kernel stuff that's inconsistent--it looks like it's getting pre-empted during a single I2C_RDWR transaction between receipt of one response and sending of the next message. The actual transmission timing under control of the hardware peripheral is really tight, but the inter-transmission delays are all over the place. Compare it with an MCU where the timing is consistent and accurate, and it's night and day.
> control a mechanism and reliably react on a deadline of a few ms
I actually did measure this with an oscilloscope on embedded Linux (not a raspberry pi). A PPS signal was fed into Linux, and in response to the interrupt Linux sent a tune command to a radio. Tuning the radio itself had some unknown latency.
End-to-end, including the unknown latency of tuning the radio, I never observed a latency that would even round to 1 ms. That's unpatched and untuned Linux, no PREEMPT_RT. I didn't dig any further because it met our definition of "reliable" and was well, well within our timing budget.
I'll be the first to admit it wasn't some kind of rigorous test, just a casual characterization. I would not suggest anyone use Linux for a pacemaker, airplane flight controller, etc.
This is making me itch to buy an oscilloscope and run some more thorough tests. I'd like to see how PREEMPT_RT, loading, etc changes things.
What is acceptable does of course depend upon the requirements of your application, and for many applications Linux is perfectly acceptable. However, for stricter requirements Linux can be a completely inappropriate choice, as can A-profile cores. They are not designed or intended for this type of use.
Profiling this stuff is a really interesting challenge, particularly statistical analysis of all of the collected data to compare different systems or scenarios. I've seen some really interesting behaviours on Linux when it comes to the worst-case timings, and they can occasionally be shockingly bad.
Eg, your process can randomly get stuck because something in the background is checking for updates and IO is being much slower than usual, or the system ran out of RAM and everything got bogged down by swap.
On a microcontroller you just don't have anything else running, so those risks don't exist. Eg, a 3D printer controls a MOSFET to enable/disable the heaters. The system can overheat and actually catch on fire if something makes the software get bogged down badly enough. On a Linux system there's a whole bunch of stuff that can go wrong, most of which is completely outside the software you actually wanted to run.
Sure, a single purpose MCU controlling a heater MOSFET has a lot fewer failure modes than a Linux device doing the same.
I don't dispute there are a lot fewer ways it's even possible for that system to misbehave.
The original comment was recommending ESP32s over Raspberry Pis for DIY projects like opening your curtains or flashing LEDs. The ESP IDF runs on FreeRTOS, so we're already moving away from the bulletproof single task MCU. People will almost certainly be adding some custom rolled HTTP webserver on top. They might be leaking memory all over the place, there are probably all kinds of interrupts they have no idea about firing off in the background. I wouldn't trust an ESP32 curtain-bot not to strangle me any more than I'd trust a Raspberry Pi based one.
Your example about running out of RAM seems just as relevant to MCUs. You can leak memory and crash an MCU. You can overload an MCU with tasks and degrade performance. You can use cgroups or ulimit to help prevent a bad process from bringing Linux down.
I agree that Linux is not going to be as reliable as going baremetal, and I'm not recommending you use it as a motor controller. But even the most reliable MCU can fail. An MCU can get hit by cosmic rays or ESD. People might spill water on the 3d printer or physically damage it. It's not even a binary "works right or dies" thing. I've voltage glitched MCUs to get them to skip instructions and get into an unanticipated state.
In any case, the best path to safety is to imagine that the computer might be taken over by Skynet and do everything in its power to kill you. Or worse, ruin your print. If safety is the goal it's probably best to achieve through requiring the computer system to take some positive action to keep the heater on. Or even better, a feedback safety mechanism like a thermal fuse.
Access to most of the hardware and real-time deterministic behavior. It’s a really great project and lets you twiddle those gpio pins at ridiculous speeds with perfect timing (less than a millisecond).
A PI comes with a whole bunch of great hardware baked in, so if you have one laying around, and want to do some microcontroller stuff, I think it’s a great choice.
There are a bunch of clocks that run plenty fast to enable high resolution timing as well.
Low latency can be a good thing, but it's also not related to consistency, particularly when you start looking at what the worst-case scenario can be.
The A-profile cores are for throughput and speed, not for accurate or consistent timing. However, you can disable both the cache and the MMU, if you want to, which will get you much closer to the behaviour of a typical M-profile core, modulo the use of SRAM and XIP. If you're running bare metal with your own interrupt handlers, you should get good results, excepting for the above caveats, but I don't think you'll be able to get as accurate and consistent results as you would be above to achieve with an MCU. But I would love to be proven wrong.
While most of my bare metal experience has been with ST and Nordic parts, I've recently started playing around with a Zynq 7000 FPGA which contains two A9 A-profile cores and GIC. It's a bit more specialised than the MPU since you need to define the AXI buses and peripherals in the FPGA fabric yourself, but it has the same type of interrupt controller and MMU. It will be interesting to profile it and see how comparable it is to the RPi in practice.
Having said that, I think some of the concerns have fairly simple mitigations. Because of the high clock speed, I can’t see that disabling cache and MMU is required. The maximum “stall times” from either of these components should still fall well below what would be needed. It’s bounded non determinism. That’s completely different to running things under Linux.
Secondly, having multiple cores allows for offloading non-deterministic operations. The primary core can be used for real-time, while still allowing non-deterministic operations on others. The only thing to consider is maximum possible time for synchronization (for which there are some helpful tools).
As I said, I’m far from an expert. It was close to 20 years ago when I last did embedded development for a job, and I was a junior back then anyway. Still, I’d be interested to know if you think I’m way off beam.
There are certainly multi-core MPUs and MCUs with a mixture of cores. The i.MX series from NXP have multi-core A7s with an M4 core for realtime use. Some of the ST H7 MCUs have dual M7 and M4 cores for partitioning tasks. There are plenty of others as well, these are the ones I've used in the past and present.
MCU interrupt latency can be extremely deterministic. I ran some measurements for work and found Linux to be adequate for many uses, but it is a valid concern. There are some Linux kernel patches like PREEMPT_RT that attempt to bound Linux latencies, but generally MCUs are a lot better suited if latency is critical. In part because they just have less software running on them to interfere with timing.
That said though, programming embedded devices like Arduino and ESP32 needs a completely different style of thinking than with high level languages or web stuff. Things like MicroPython reduces the friction just a bit to make it easy enough to get on board.
It isn’t rocket science, but there are loads of little details like that which will make you pause and then write loads of bugs and awful software before you finally figure it out. Meanwhile, accomplishing the same thing with a high level language might be trivial.
It can be discouraging but I’ve come to love it. You learn a lot, and having a physical board doing a tangible thing with actuators and sensors can be really gratifying.
This can only improve FreeRTOS and the embedded ecosystem in general.
And, if Amazon becomes a problem, people can fork and bail.
why am I laughing at how much this stings? we're not that old, damnit!
Trying to automate something truly reliable and consistently with a microcontroller on the other hand can be simultaneously soul crushing and exciting — there are so many edge cases and challenging problems.
Sometimes I'll spend hours trying to figure out how to interface with a single sensor, and while it isn't important or impressive in the scheme of things, I really enjoy it.
I found a fake sensor like that once.... was wondering why my code done by datasheet didn't worked on cheapo breakout board I bought off aliexpress.
Then I read ID register and they used older chip that had some of the stuff set up differently...
fade a GPIO LED on/off cyclically in 6 lines of code. It should read "every millisecond or faster" but OK.
And I agree. All programmers should at some point work on a super slow, super limited AVR or something like that. Something where you have to make hard decisions either because you don't have enough RAM, not enough CPU power, not enough storage, not enough I/O pins etc.
Even non flagship phones are more powerful than the boxes running Windows Embedded 20 years ago.
I can't begin to tell you how incredibly annoying it was, but it taught me a lot. I know a lot of people who would be completely dumbfounded at 128B of memory. That's only four int32!
Many still don't grasp how powerful ESP32 actually happens to be.
Although I have heard the Pico is not very competitive in terms of power optimization. I haven't done many battery powered projects to encounter these issues though.
Exotic, but simpler mental model for most people. 8 independent cores and a simple non-interrupt driven programming model for doing basic timing and I/O with any of the 32 pins configurable for either input or output.
And super easy to interface both 3v and 5v, available in DIP, and in various easy format boards.
Most of the use cases I've seen have them report to Home Assistant or something similar, but I think some people use them directly without a host.
Zero Ws have a $10 MSRP (of course, huge shortage at the moment). I think they're pretty cost competitive for DIY IoT.
Buildroot makes it really easy to create a custom Linux OS with your software preinstalled, any kind of custom kernel tweaks you want, and an impressive amount of software packages available. If you strip unneeded functionality from your kernel you can boot a lot faster too.
Here's a list of some stuff I like about a Pi Zero W vs an ESP32
* Ease of programming. Flash an SD card and swap it out, without having to hook the device up to a programmer.
* Extremely solid TCP/IP stack.
* Multitasking with real process isolation.
* Program organization (related to above). I find the OS abstraction very useful for enforcing cleaner designs.
* Access to Linux software packages. I can easily add nginx, apache, or lighttpd to my rootfs. It doesn't involve mangling any of my other software packages
* Interactive access. I can debug the applications by sshing into the Pi and looking at logs. I can scp new files onto the Pi.
AFAIK this "at the moment" period has now extended all the way from the time they were introduced to the present day. One long moment for sure.
The reason I'd go for an ESP32 for this use case isn't because RPis are overkill, but rather because it's much easier to write, compile, flash, and run code on bare metal on an ESP32 that has access to Bluetooth and Wi-Fi but isn't vulnerable to file system corruption. You can do this on an RPi, it's just much harder.
But yeah, especially now with various ESP32 firmwares like ESPHome you can essentially just make a YAML with specification on where to listen and what bit to flip and get simple switch/controller with zero actual coding.
There is even custom firmware to turn off-the-shelf IOT devices to work with "open" standards.
That’s an insane amount of compute on something that can be sub-2W over POE, or 1.3W on WiFi.
Though for all the homelabbers out there, you probably have a NAS. Use Log2RAM, and present some ISCSI volumes to the Pi, and you’d be staggered with the very real work a Pi can do when not saddled by the SD card - without having to directly attach storage.
- -
I’d argue that for “IoT” stuff even Arduinos are overkill in terms of computing power. Granted, I realize this is the case functionally because of BOM optimization and making it forgiving (more power than needed) for beginners.
- -
Granted, going back to the original article: Yes, 1L form factors are nuts. Mac Minis are insane (but not cheap), and if you look at 35W Zen 3 Ryzen 7 PROs you can get similarly insane power cheaper if you need x86. But all the much older former office 1Ls are everywhere and offer ludicrous performance to hobbyists for pennies on the dollar, with (as mentioned by the article) sub-10W idle.
- -
Honestly, it’s just a great time to be a tinkerer. We’re drowning in ubiquitous, cheap compute.
There is nothing else out there that hits the sweet spot in between price, power consumption, processing speed, extensibility, software compatibility, out-of-box experience and lots more.
I’ve had AVRs (of mine) running in the house for 9+ years without being touched (and ESPs for over 5).
Things do just work out of the box on them (often easier than installing Raspian, getting it onto wifi, setting up ssh, looking up the commands to set a GPIO, figuring out cron, rc.d, etc.)
It’s way faster IME to just use the Arduino digital_write() functionality in setup and loop. (I’m a long-time c/c++ programmer, which helps a bit.) The exploitable footprint is way lower, so you pretty much never need to do a security patch. If the power fails, you’ll never* end with a bad volume; it just boots back from flash and resumes working.
I've set up my Buildroot project to copy "authorized_keys" and "wpa_supplicant.conf" from the fat32 formatted boot partition to their normal locations. So I flash an SD card, drag and drop the files onto the SD card, plug it in the Pi and SSH right in.
With regards to filesystem corruption on power failure, you can mount the root filesystem as read-only. If you need to write to files you could mount a tmpfs volatile filesystem.
I can still see how for some people it is still worth it, because, say an HP thin client decidedly isn't a good substitute if you want to, say, fit it in an outlet box and run off 5v USB power. For anything where you're not using the GPIO/"hats"/whatever though, unless size is a big concern, I would use a small older computer over a Pi.
If I am doing a project with a 'hardware' component tomorrow though, I agree with you, I'd (grudgingly) overpay for a Pi rather than those other things, because, of all platforms with interface GPIO pins that you can use to do cool stuff, the Pi is the one most likely to have "support" out there -- meaning either someone else has already made a tool to do some of the things I want, or someone else has run into the problems I'll run into and prompted a discussion about how to fix it.
But https://pine64.com/product/pinecone-bl602-evaluation-board/ costs $4. It fits a different sweet spot for price, power consumption, etc. A drawer-full of 20 Pis could run me $2000. A drawer-full of Pinenuts would run me... well perhaps $2000 because I could fit 1000 of them in a drawer.
If I want to browse the web, PineTab probably beats Pi. And that's only considering a single vendor.
Not knocking Pi. If it works for you, that's fine with me.
I have a bunch of pine devices, but if you think raspberry pi’s are difficult to come by, finding a pine device in stock over the last few years has been a challenge at least for me personally. Things have started to get much better though, it seems.
I can find more powerful laptops for cheaper. I can get a Dell R720 which has drastically more computing power (32x RAM, much more powerful CPU) for twice the price.
RPI used to be economical. If it still cost $50 USD, I'd grab them in a heartbeat to do these types of projects, but as it is, on price, they are almost Apple levels of overpriced (if not more).
As far as I can tell, the only Pi that you can reliably buy in quantity 1 at list price is the Pico.
As a full stack web developer, I am always finding myself getting bogged down in activities to support the work of development (managing dependencies, deployments, builds, etc). I don't enjoy that part of being a developer.
The experience of being able to write a few lines of C code and have stuff happen right away is very pleasant and a breath of fresh air. Unless it's necessary, I would rather not complicate things by having to deal with an OS and everything that entails.
You can get an ESP32 (Seeed Studio Xaio) Arduino-compatible board for $5 from Digikey. Incredibly cheap for hobby-scale projects!
The second is most of the comments here, declaring that novices should just learn embedded programming and use an arduino for everything! If you're in this camp, you should consider _why_ people chose to use raspis for project. and watch your ass because an EE is about to arrive to drag you for not just using a 555 timer in your projects.
For people that think this is a significant barrier, I'd suggest to take a look at MicroPython (on something like a ESP32 or RP2040 -- there's no reason to bother with the classic 8-bit Arduinos anymore). It gives you an environment that's surprisingly similar to what you'd use on a Pi.
I know from an electrical engineer that with microcontrollers having become that cheap, it can often be cheaper to use a massively produced microcontroller instead of a 555 despite the former often being insanely overpowered for the task at hand.
Devops like to use Intel NIC, ECC memory only. But somehow Pi junk gets pass because it is "open-source" or what.
Great, we will run this mission critical deployment from cheap SD CARD!!!!!
It's small, it's inexpensive, it gets the job done.
Last problem I had with Pi: my keyboard did not work for some reason. Guess what, Pi has shitty USB 1.1 implementation (USB 2.0 is different stack), on top of that it does not give enough power to connected devices. With normal computers I had similar problems in 2003!!!
For serious use it is like Gentoo. You have to learn about its boot process, how it bootstraps from video memory.... Or how USBC power delivery is not really important (remember Pi4 initial batches?)...
It only makes sense if you are deploying embedded devices on midscale (~100 devices). For hobby projects it is a nonse. You have to learn completely new HW platform just to read sensor data...? Haha
I doubt anyone is using an off the shelf Pi with SD card for an actual safety critical deployment and expect to get it certified. There are options like the Revolution Pi which is half PLC and uses the Pi's Broadcom SOC for non-safety calculations. Some even support CODESYS.
I agree that most ARM embedded Linux SOC's can be absolute dumpster fires when it comes to peripheral documentation and poorly maintained device trees (looking at you, Texas Instruments!!!) but that's nothing new in embedded dev. Learning how each manufacturer/platform do hardware peripherals is half the battle.
So I agree that the pi isn't always the best device for an application. Cost and power savings on an ESP32, better processing on your old laptop-turned-server, and so on. But the Pi does have excellent documentation, and was lucky enough to gain enough traction to create an ecosystem that reduces friction to just get something running for beginners, which is literally its original design intention.
At the end of the day, it seemed like the manufacturer had the (good) idea to automate the dosing, but thought that all the standard industrial automation tactics (PLCs, ladder logic, HMIs, etc) were somehow overkill for the application.
Which meant that the end users had to write all the software to make it work with a standard industrial automation system anyway. It was super annoying.
I'm sorry you had issues, but these are just normal embedded systems problems. I totally get if that's not what you want to deal with, but you should really consider a different platform like a NUC.
Hey, nerds! Do some real hacking and program with solder and a 555 timer!
Regards, The EE who showed up to drag you all
Power consumption inefficiencies often make this a very poor choice (for same workload than can be done on low-wattage rpi or similar).
On the other-hand, if you have existing software that you want to move over to a small system, then a platform with a widely supported OS is going to be easier.
Raspberry pie lets me work at a higher level that I actually find enjoyable.
There's an alternate timeline where CPUs are really hard to make, so every SOC 'wasted' on a curtain-opener or a glorified doorbell deprives someone who badly needs a general-purpose computer and can't afford one. But in our timeline, every day probably a million perfectly good "computers" (cell phones, desktops, smart speakers, etc) get tossed in e-waste anyway, so it's not a sin to use an overkill computer for a task. (Ironically of course the Pi itself is in a shortage but... :shrug:)
This bit was always the head scratcher to me. I've never owned or worked with a pi, simply because I have an old SFF PC that is many times more powerful. I remember reading stuff here on HN about people building k8s clusters and similar things on raspis... why would you do this to yourself? Just virtualize on the junky old PC if you really want to have multiple "nodes" of some sort.
I get there are use cases where "put a small slow computer in a physical location" is what you actually want, but it feels like raspi gets jammed into a lot of uses which don't make much sense. Just because you can doesn't mean you should...
An RPI uses as much power as charging a phone. Your old junk PC probably uses an order of magnitude more, and most people don't need the extra CPU power. Why waste electricity? I bought all of mine at MSRP, and at that price its likely covered by the savings on power quickly.
That said, I've also used a few "thin client" PCs to build a cluster when I got the space. As much as I've wanted it, I can't convince the better half to let me install a full server rack in our guest bedroom (or pay for electricity).
On top of all this, it's small, so it can fit anywhere. I ran a few hanging with zipties under the bed frame in my dorm room years ago. My first apartment was 400sqft - I threw out my "server" PC I built and used a few Pis. When not in use they fit in a shoebox or drawer, so it's easy to have extras.
Rpis are almost never the optimal/cheapest/best option for a project, but they’re almost always the optimal computer to reuse in 10 different projects over and over!
I have a Pi3 that's dedicated to Octoprint - just because I want it to have all the resources when printing and I have some heavy plugins (the Arc Welder, for one).
However, the Pi4 is running Home Assistant and several other things within HassIO, like Adguard, NodeRed, the UPS monitor, Tailscale, etc. It's a much more powerful Pi, with 8GB. I would replace it with a TinyMiniMicro if it died today. Although, given that it's currently sitting in a rack, I want to also give it control of the rack fans(heat dissipation is not a problem most of the time) and add some RGB lighting, which would be perfect for the Pi.
I'd argue that, given the current prices, if you don't need the GPIO pins, the author is correct.
Even so, OP is about running server stuff rather than electronics or robotics hobbyist stuff. The Pi works as a little hass and automation server, but only barely.
I've been "mini pc" curious for a while, and TFA mentions a "TinyMiniMicro" resource that seems quite useful.
"I migrated my Pi-hole from an actual RPi"
Can a RPI be a final solution? It sure can! Can an RPI be a bridge to something else? Yes and that is where it shines!
Having a RPI or two around gives you tools to experiment with. It can be a server, or it can act as an IOT device, or a USB HID device or...
Some of my RPI projects have been replaced with old laptops, or Beelink boxes, or ESP hardware. I think of RPI as a first step, that lets me play before committing to something (and spending).
I use a combination of Intel NUCs, Gigabyte Brix, and flashed Datto Altos (branded Zotac Z-Boxes) for various roles and they absolutely shine whether running Linux or Windows-based workloads.
I bought a set of four 10-year-old HP rackmount servers instead - 56 cores, 88GB of RAM, and 12TB of storage total (note: I pay for the electricity solely with home solar, so the ~400w idle isn't a financial concern). They run Kubernetes for workload scheduling. All told, it cost about $500 to acquire all of the equipment.
Honestly, I haven't looked back to the Pi days. Provisioning a new service in my homelab used to have a lead time of two weeks (acquire a Pi, image it, install services, etc.), and now I can deploy something new in 15-30 minutes. I learned a ton through running systems on resource-constrained ARM32 devices like those, but it's ultimately not a great use for them.
Maybe not a financial concern but probably an environmental one. Yearly that is 3.5 MWh that could be used to de-carbonate the grid instead.
That being said, it's entirely possible for someone who has a solar set up to also have switched to electric heat, it's just pretty uncommon in northern climates still.
Generally though, yeah, I prefer NUCs and the like over servers for home use for power and noise constraints.
Yeah, there's things I want to move to more powerful hardware. But it's a step up: it's more expensive, more setup, a more persistent system (even if everything's in containers). I wouldn't steer people away from using Pis based on that tradeoff, they still have a high ceiling for what they can do and when you do bump into that ceiling it's much easier to justify spending 10-100x for the right hardware. It took me 7 years of tinkering to hit that ceiling with my projects, I don't regret staying on Pis for so long.
And if that person can afford the Pi's, they can afford the power, so there's no point quoting power costs.
In theory, I could leave all the taps on 24/7, however that’s A) abuse of a free service, and B) a complete waste of resources.
Even cleaning the car I’m very strict about turning the hose off when I’m using the sponges.
If that power were coming from locally finite source such as solar or wind, or battery, it's a different story.
Not necessarily true. Even some of the TinyMiniMicros mentioned in the article have a single digit W consumption when idle (because they are basically laptop parts).
Now, when loaded this would be true. However, their higher processing power also means tasks get completed faster, so they don't stay at the higher power states for long.
Related to a sibling comment, a decent UPS could power a Dell like that for a couple of hours if it's mostly idling.
Optipliex desktop is around 10-15W idle
Laptops with screen off can hit around 5W (close to pi under load).
I would assume what loads the pi would almost be idle in these older dell machines.
But... it's nice to have a system that has a very minimal footprint, which isn't exactly the case with a laptop.
Then again, we can argue semantics over "need" vs "want".
But you'll lose Internet points.
You might not need a Pi. You can by a hundred ESP8266 boards for the price of a modern Pi. ESP8266 and ESP32 are also more forgiving with their GPIOs.
That seems separate from the hardware issue with the raspi, like something that would happen with better hardware as well.
It feels like this needs to be handled in the dev tools where going into a dangerous state is automatically followed up by exiting it once an operation is performed and you can't mistakenly stay in the dangerous state. And then have an exhaustive analysis of the FSM to show it performs as expected with the correct state transitions.
What was it (an automated curtain puller?) and did the machine have useful hardware lockouts, such as physical rope-speed limiters or whatever, to make sure it couldn't do bad stuff even if commanded to?
I am more concerned with hardware issues, since the plethora of ESPs and Arduinos being made do not go through a Six Sigma type process to control the process. Also, the piece I pointed out did not have other separate hardware or other safety watchdogs in the box, like a Pilz unit supervising Beckhoff i/o. It was an Arduino with some relays off of its GPIO pins. High-integrity systems need to include both the hardware and software. There are actually standards for high-integrity systems aside from the usual aerospace stuff that applies to show control or machinery control. Safety-Related Control Systems (SRCS) are being addressed more and more in ASTM F24 for Amusement Rides and Devices.
I loved my Basic Stamp, Pic-chip, and Propeller chip days. Fun, but I am glad I progressed beyond the hobby level before anyone let me put a piece of kit up! Window displays were fairly innocuous!
I've always tried to add actual physical, mechanical interlocks on some of the stage machinery I've designed where a flipped bit or faulty i/o would cause harm or death! See my Arduino reference below.
I wish SPARK2014 would get more love. It has been around for a while with real-world applications, but Rust is the darling of the tech crowd now. AdaCore and Ferrous Systems are teaming up to bring some Ada goodness to Rust along with the legacy experience and apps.
Cool article on drones and SPARK2014: https://blog.adacore.com/how-to-prevent-drone-crashes-using-...
Cubesats: https://www.cambridge.org/core/books/building-high-integrity...
Arduino and Safety-Critical Circuit: https://forum.arduino.cc/t/safety-critical-circuit/319986/2
SPARK2014 the programming language and the dev tools include a verification toolset, automated proofs, and unit testing. Rust may eventually catch up ;)
I agree with the hardware safety interlocks, which I guess is why I don't think so much about the software - because I imagine it was programmed by a monkey (perhaps myself, late the previous night) and I don't trust it anyways. It's like a switch an untrained stagehand might hit which needs to be safe regardless.
(I've never made anything to be around a performance, but some of my things could certainly have hurt me or friends if we weren't careful.)
> SPARK2014 the programming language and the dev tools include a verification toolset
This is something that third-party FSM libraries often lack, decent controls and verification.
The cubesats are cool. Usually I can walk over and kick my creations when they need a reset, that's a whole 'nother level.
I had been using various BeagleBones and found them more reliable than RasPi's and faster to boot than the NUCs in the office.
But depending on the availability of a TI part is the road to perdition, so maybe I'm just using the wrong NUC models.
I've been using RPis and "clones" for internal services for years, and there's hardly any fuzz with them at all. At most a power cycle once a year.
They've endured house losing power multiple times, I've yet to swap SD-card on any of them, they just keep chugging.
But sure, I wouldn't trust my life to one. I just find it odd that people say they're highly unreliable while all of mine just work.
The longest I've had running was a The Things Network gateway on a Raspberry Pi 3: OK for 2 years, then it killed the sd card (not corruption, it just wouldn't work anywhere anymore). I set it up again and it killed the new card within a week. Again, and within a month. I gave up and it sucks because the LoRa shield is Raspberry-specific.
A Raspberry Pi 2 died just because while decoding ADS-B. SD was fine.
For the rest of the experiences, I always found some data corruption at some point. Often hanging and needing monthly reboots.
The only worse SBC (and it wasn't really an SBC) I've experienced was the Cubox i4-Pro. I eventually lost it, and I'm almost glad, weekly data corruptions and crashes, underwhelming performance and very fickle behavior overall.
Other <randomfruit> Pis have turd-tier hardware support but whatever you manage to get running tends to be reliable. Pine64 (the oldest model) is so far the only SBC I haven't seen crash, trash an SD card yet, or have FS corruptions yet.
We deployed over 1k RasPi's for a particular customer. We averaged about five reboots per day. On top of that I had to deal with the RasPi Organization's insistence that they were not an ODM. Though these were the RasPi B's and RasPi2 B+'s. I'm sure the reliability has gotten better over the years.
I'm not a big TI fan, but everything I needed I got in a BeagleBone: they're more reliable than RasPi's, you can actually get the firmware source code and they have a "normal" returns process.
I don't have the data for the BBB based cube-sats running Kubos (which was the project after the RasPi project) and there were less than 50 deployed, but I've never heard of any of them rebooting themselves unless the ground told them to do so or there was a battery failure.
Is that the proper tool for the job?? I just read an article saying "Unpopular Opinion: Don't Use a Raspberry Pi for That" (https://news.ycombinator.com/item?id=35260322)
Nobody imports BeagleBone here so have to get it through DigiKey or similar, which means prices are way higher.
- avoid writes to sd card too much (log2ram mitigates this, alpine in read-only solves this)
- plenty of power (the recent 3 and 4 have huge sipkes of current draw !)
Do you know the reason for your reboots ? Also before the 3+, the die have no RF shield. The B and 2 B+ are exposed if you don't use a metal case with a seperation from the PSU.
Actually this is a good point I forgot about.
I had one Pi which would reboot or hang every week or so. Dismissed it for a while but then decided to troubleshoot it. I had a USB cable tester, and quickly found that the USB "charging cable" I had bought from a local shop had a 1 Ohm resistance! Threw it away and replaced it with a good one and never had an issue again.
Please tell me they were using the GPIO pins for something.
Seriously though, we used a GPIO pin to stroke the watchdog.
Regardless, I'd also recommend setting up the hardware watchdog just in case. It's saved me in the past when I overloaded my Pi with a bad cron job.
Should you use a Raspberry Pi for that? The best way to answer that question was to try it out. The first 20 units were built out with a beefy, though small UPS and a decent enclosure. They were deployed alongside existing systems to see if they a) worked, b) gave the same data as the expensive system and c) were reliable.
The answer was... some individual units did not hit the 4 9's reliability target. The ones that did, seemed to continue to be reliable up to at least 5 9's. But it was hard to determine which would fail without putting them in the field, waiting six months and seeing which ones hung. But the price was cheap enough that putting two in the same corner of the wiring cabinet and adding a hardware watchdog was quite affordable.
We deployed just over 1000 in this redundant configuration and it worked fine.
By this time we collected enough data to chart a MTBF histogram, essentially a chart of how many machines lasted how many days without needing a reboot. We wound up using a lot of Original RaspberryPi B+'s in 2015, which was after the RasPi 2 came out. (Purchasing at this client took a LONG time.) I often wonder if our supplier sent us boards that had been returned from other customers.
I had good experiences with BeagleBoard's in the late 2000's and this was just as the Black was coming out. We deployed another 600 with BeagleBone Blacks and got MUCH better reliability numbers. Is the BBB an intrinsically better product? I dunno. Did I just get a batch of bad RasPi's from my supplier? I dunno. Should you ever run an embedded system without a hardware watchdog? Probably not, no matter how reliable you think your system is.
But... the real problem with the RasPis was support. How do you return a RasPi? You don't. You throw it away and get a new one. Yeah. That doesn't work for a lot of people. How do you get the firmware for a RasPi in 2015? You don't. Can I get the gerbers so I can turn a few custom boards? No. I talked with RPT several times about this and their response was "we're not an ODM."
And that's PERFECTLY FINE. I never said I though RasPi's were "bad" -- I may have said "there are applications for which RasPis are not a great fit." If you need the firmware, consistent reliability or the ability to turn custom boards, you absolutely don't want to buy a raspberry pi in 2015.
Also... a lot of people are responding with "Except for the several times the system rebooted, I didn't have to reboot my RasPi," which I'm not sure I understand.
Maybe you got a bad batch. My Pis never had any problems whatsoever.
Please check logs to see if they are experiencing brownouts. Not all power supplies work, specially with a Pi4.
The thing that likes to fail a lot is SD cards. My homeassistant Pi uses a SSD(harvested from an old Chromebook) because of that.
TinyMiniMicros seem to be a better option than NUCs these days. Boot faster too.
Shrug. At this point I see RPis as a litmus test.
But a lot of times, an ESP8266 or even just ATmega part is just fine.. other times, some old laptop or PC is way better..
Currently, my only Pis in operation is the Pi400 on the living-room TV for retropie, and the one attached to the printer and scanner to network those without having to install weird stuff on the windows/linux clients
I have an i3-8100T version which includes on-cpu video encoding, ideal for Plex. Runs unRAID. Replaced a much larger system which took much more power.
Raspberry Pi was great for $35. For $150 not so much.
I'm just building a outside watering system. I was going to use a RasPi, simply so that it can log the things like temperature, light levels, rainfall, and water butt levels that it uses to work out how much water to dole out, and so that I can log in remotely and change the settings. But there's a shortage and I ended up getting an Arduino instead. It can do everything I need except data logging and remote access, but those don't matter so much.
RasPi should be split into two camps - one being a system for people who want to build a small computer, with decent speed, RAM, real time video decoding, etc, and the other for people who just need a slow low power device with Linux that has GPIO.
You could also use a $1 ESP8266 or a slightly more expensive ESP32.
SD cards are saturated by 2W TDP Raspberry 2, but the 4 has workload speeds for CPU intense operations.
This cloud hosting service has been running from my home fiber with better uptime than AWS/GCP for the last 10 years: http://host.rupy.se
Longevity is the key value.
I want reliable and quiet. I have RPis running for more than a decade everyday with not a single crash.
In what conditions are those used PSU? Who knows. I'm also not a fan of bringing other people's dust and keyboard grease along.
I didn’t replace my RPi with a NUC but I did get a Celeron powered mini PC. It’s basically silent and has been happily running Ubuntu under my desk for over a year now.
If it's used, I'm not interested.
I had the original Model B running continuously for 8+ years until the USB contacts rusted-out due to high humidity.
The prices in the article are absurd: why would I choose a $260 SFF PC vs a $5 RPi Zero W I got 5 years ago? The comparison may make sense for new purchases with the ongoing shortage.
After prototyping, redeveloping for a different platform is often not worth the cost. If you didn't use the GPIO, switch to a NUC or similar. Or don't.
Raspberry Pis are in data centers now, occupying server racks. Don't fight the signal; retransmit.
For instance, using SD cards for storage is problematic for certain uses, but that doesn't include the popular practices of using a small USB-attached SSD, nor of logging to RAM, nor of logging / writing to NFS. That by itself is just a factor, not a reason.
Likewise, price and availability make the assumption that we're talking about Raspberry Pis, which we know have gone commercial and are way too expensive and hard to get. There are many, many other kinds of Pis like Orange, Nano, Rock, et cetera.
There are plenty of other factors which are good or bad, depending on your situation, like power supplies - a single NUC power supply brick can be HUGE, but a single IKEA USB power adapter can power several USB devices - so it depends on your use case.
These are nitpicks, but what really irks me is when people make comments like this:
..."don’t have to put up with the quirks of Raspian or running an alternative distro that has zero community"
That's dismissive, reductive, and a rather shitty take. Perhaps this author shouldn't be running Linux at all because of all the quirks in each distro. Perhaps they should run Windows. Oh, wait! Windows has even more quirks, and arguably a community so large and disparate that I'd consider it worse than any community of any OS project with "zero community".
Oh, well. My take is that Pis of all sorts are wonderful little devices that have an assortment of advantages and shortfalls for many, many use cases, and you can learn lots using those advantages and overcoming those shortfalls, if you want. That last part - "if you want" - means more than anything. It's personal, and others shouldn't tell you what you should or shouldn't want.
Common MLC media is good for 5,000 writes before end of life. SLC media can take 100,000 writes, and is available in SD card form (but it is more expensive).
I have a habit of using heavy-duty sdcards, because they also seem very susceptible to ESD in this dry, year-round desert weather.
RPis are fun toys and I got a lot of mileage out of an $80 kit I picked up while I was in community college. I got some attachments and a 7" touchscreen and I had so much fun installing Raspbian on it. I later attempted to configure it as some sort of surveillance station but that didn't go well. Then I installed the actual Pi-Hole package on it and that was great, but I eventually migrated to NextDNS.
Nowadays I have practically no use for a Linux box with a tiny screen and abysmal storage abilities. It's sitting on my desk, darkened screen for months on end. I couldn't even think of a use case. I tried making it some sort of media server to hook up to my speakers, but the media centre packages are abysmal and crashy and can't handle Bluetooth or anything useful. I couldn't even get them to play YouTube videos. They're as bad as the surveillance packages.
Also the later generation thin clients (i.e. Dell/Wyse 5060, 5070) are cheaper still and also pretty good. They're reasonably responsive for desktop tasks and can even drive 4k60 over DisplayPort.
Note that I could solder my own boards together from bare PCBs and components. I just don't want to have to when someone else has already done the hardware work for me.
2. Probably can do the same (electronics) with an Arduino or run (a lightweight job) in a container on an existing computer.
Yeah, it's option to consider but I don't think price comparison is fair or even important here.
What is however is that you can just generally shove an SSD to NUC and forget about it for forever and not worry about microSD woes, finding the right case and power supply for rPi etc.
I think pi only gives real benefits when you actually are using the IO it provides over "normal PC"; or if you really need to shave that few watts off.
“You do not have access to set-inform.com. The site owner may have set restrictions that prevent you from accessing the site.”
I got an error when visiting set-inform.com/2021/08/24/unpopular-opinion-dont-use-a-raspberry-pi-for-that/. Error code: 1020 Ray ID: 7ac01a0f4d06415e Country: IN Data center: bom06 IP: 49.37.133.177 Timestamp: 2023-03-22 17:19:49 UTC
An important point was that the solution had a regular browser that worked with every streaming website out there.
So, I got an Asus TinkerBoard, because it had good video rendering. I constantly had issues with that thing. Updates, connection problems, etc.
Then the FireTV stick was released with the Silk browser. I bought one, and never went back.
If OS options is making you skittish, pick one with good Armbian support.
If you need the extra power (even an rpi4 sounds like overkill for a weather station) you could also look at Intel embedded systems. I haven't verified but I'd wager you can find something comparable to the M2 in size and power for half the price or less.
Here is archive: https://archive.is/HmDQz
Error code: 1020
Ray ID: 7abeef5a9d8c6e55Some recommend the miniPCs from Dell, Fujitsu etc. But they also have custom firmware with their own set of problems and strange design decisions which you won't be able to change if you needed to.
Have you considered read-only boot & system partitions? That way, your pi will always boot, at the cost of have to remount in read/write mode to perform updates.
The Raspberrys USB ports sometimes did not work properly and we feared that we could quickly kill the SD card. Additionally the processing power was not that great.
In the end we switched to an Intel N5000 notebook with a broken screen (working HDMI) that we had lying around (used price under 100€,in this condition maybe under 50€). The system now has aN uptime of over 100 days and works much better.
In this case, I would prefer to manage 1 set/type of hardware for all my uses unless I really needed to deviate. If the difference is $100 in overkill for a Pi-hole, but right-sized for other use cases, I find value in the consistency.
1 form factor, 1 OS, 1 set of hardware compatibility, if a script works 1 place, it works everywhere, etc.
The file server is an old i7 2600k that used to be my desktop PC before I added some hard drives and installed Unraid on it. Unraid makes managing docker containers incredibly easy, especially with the Community Applications and Auto Update Applications plugins.
But what if there was a "Pi" that would boot from the network. Not local, but from Internet. With some tinkering, you could add a small network mounted drive for persisting things like configuration information. Bootup times would be long, but quite often these type of devices are not constantly turned on and off.
the whole supply-chain fiasco was a great example of their current priorities when their arm was twisted. they started out with promoting cs education but ended up being more loyal to their corporate partners.
but to be fair to them, half the problem was us, who want it for cheap computing. the "hackers" in this site could easily achieve similar results by repurposing an old phone than to buy another one of these sbc for their home lab. to be honest, we are spoilt by the rpi ecosystem, and we choose it even when overkill because we can (or at least could until they became over $100).
at the end of the day, you do what you want with your wallet.
I guess it depends on what you're doing. I like working with hardware and low-level software.
I need to split some services off of my overloaded Raspberry Pi 4 but I just can't find any in stock anywhere. That NUC is so low priced it's hard to resist pulling the trigger, and in all likelihood it probably crushes the RPI4 in terms of performance.
Of all places, London Drugs sometimes carries them. Places that sell POS (point-of-sale) systems are more likely to have the small form factor computers.
I went with rockpi because of the shortages .. works just as well and has a little more punch.
<insert my standard disclaimer regarding oracle based on lived experience>
https://news.ycombinator.com/item?id=29514359
Just because you haven't been bitten yet, does not in any way mean you won't be, and crucially: it doesn't preclude others following your advice being bitten.
Just Google which ones are actually always free. Didn't have any problems personally.
I'm a reasonably smart individual, I did not click through blindly and made a concerted effort to discover the free option and was taken aback by the fact that I couldn't find an option that was branded as being free and was assured by a friend (working for Apiary in Oracle) that it was fine to pick the shape I picked.
Look, Regardless of how it came to pass: I should have been permitted to cancel. I continually paid what I considered to be the final bill (3 times in fact) until ultimately I was charged for an amount that it was not possible for me to actually pay (imagine trying to pay 0.1 US Cents or $0.001).
I know we like to think that we're smarter than other posters and that "maybe they were holding it wrong", but I can't put into words how sincerely you'd be mistaken in thinking that in this case. You are very likely thinking while reading this: "Yeah, but that wouldn't happen to me, it hasn't happened, I feel safe enough in my decisions I could get out of it" -- you'd be wrong.
I was about to give Oracle free tier a try for some hobby projects.
Not a particularly unpopular opinion anymore though. Most subreddit for example are already steering people towards minipcs
Sure, buying one now is (relatively) expensive for what it is, but I bought my Pi's back when they were MSRP ($45-54 USD for RPI4 4GiB and $35 USD for RPi3B+). Nothing can compete at that price point. While there are cheaper options or more powerful options for a bit more, none of them have the same support the Raspberry PI has.
As for reliability, dropping ~$25 USD for a drive enclosure and having it boot from that is doable with the Raspberry Pi 4 (and the 3 but I've never tested it).
Anyone else get this?
Guess they want the opinion stay unpopular after all shrug
The NUCs you see from e.g. Intel had a "custom solutions header", which was a bunch of common buses on an internal header you could expose with some bios config and wires, including 1-2 GPIOs, but that was it.