So my raspberry pi 4 sdcard bit the dust this week and I’ve been setting it up with an ssd to boot from, hoping that eliminates that issue. But while doing this, I was looking around for an alternative to the rpi if things fail again. I found an interesting computer called the Radxa x4, which is an intel pc (intel N100) with a raspberry pi pico (rp2040) installed on the board for the GPIO. The way it is implemented is the pico is mounted like a usb in the operating system.
I am curious if it would be possible to make Mycodo work on this. I can’t imagine it would work as is because it is an extra layer to the gpio and I have no idea what kind of work would be needed to adapt for this design, but this would be a fantastic little mycodo server if it would work.
So if mycodo were installed on it, I should be able to interact with the GPIO pins without any extra steps? I’m going to mark this on my list of upgrades then, in case my rpi4 fails again. Its seemsworth the risk to try this new thing. And if for some reason it doesn’t work, I still get a functional little x86 minipc.
Most of the online sales of the Radxa x4 boards are around $180… you can litterally buy 5 brand new Raspberry Pi 4s for that price… and you have no idea if Mycodo will even work on the Radxa x4… so how is that a viable “alternative” to the Pi?
i agree the price is a fair concern. But I am not buying one now. I still have a pi and a rockpro64 working; so I’m not spending money on another computer and creating ewaste with these two.
BUT I had 2 rpi4 and 1 rockpro64 fail on me in a single week. 1 bad microsd, 1 dead pi (it lived a good life) and no clue how the rockpro64 failed but after days of tinkering, I got it working again. The getting the rockpro64 going again reminded me of how much I dislike the arm ecosystem (every device is almost like it’s own little island, whether phones or sbcs).
So if I these fail me again, I will not buy another arm device. But I still need to interact with my sensors. Without raspberry pi, I can go the microcontroller route like an arduino, but I still need the pc for the server brains. This device gives me the option to use reliable x86 and gpio, if it fails, it is still a small pc that can interface with the arduino and still works. Maybe riscv because an option if these sbcs can last a while longer for me.
I have over a dozen Raspberry Pis… some dating back to 2012… and they are ALL still running… in fact my oldest Pi, a Rev 1 model B from 2012 is currently running both my MQTT broker and Pi-Hole at the same time with no issues. I have Pis running as security cameras that have been outside under the eaves of my house for many years in the Arizona desert partially exposed to the elements that are still running just fine.
The only time I’ve ever had a Pi “fail” was a bad one right out of the box from Amazon which got replaced with a working one in 24 hours. The only time I’ve ever had an SD card “fail” in the last 20 years was because of old age, they eventually reach their pre-programmed bad block limit and locked themselves into read only mode, which is exactly what they are designed to do when they get that old so that they don’t lose any data and you can still read the card to retrieve the data… you just can’t write to them anymore.
If you are having cards and Pis fail then you are probably doing something wrong… most likely a cheap off-brand SD card, a bad power supply or USB cable causing under-voltage or under-current, or a short circuit or over-voltage on your peripheral hardware that damaged the GPIO bus or something.
The “ARM environment” has been around since 1985… they are considered more reliable than any Intel or AMD CPU and there are actually far more ARM processors out there than any x86 CPUs (like over 280 BILLION ARM CPUs made and sold in just the last 30 years alone). The Raspberry Pi Foundation has gone to great lengths to make sure that the official Raspberry Pi OS runs on all Pi models interchangeably, so that no Pi is “like it’s own little island”. You can pull the SD card out of almost any model Pi and put it into another Pi and it will run like nothing has changed… so you’re really not making much sense by getting some obscure Intel-based development board that most likely will NOT run Mycodo unless you take the time to write a custom interface so that Mycodo can actually talk to the GPIO on the Pi that’s embedded on that board.
Here are some basic diagnostics I run on all of my Raspberry Pi setups to check for things like CPU throttling due to over-heating, or under-voltage which can cause SD card data corruption. Also, always use heat-sinks or thermal cases on all your Pis to prevent heat-related issues. Get in the habit of checking these things before you put any Pi into a “production environment” and you’ll have fewer surprises. Raspberry Pi Diagnostics.txt (4.3 KB)
I also think your SBCs failing is atypical. I’ve used dozens of Pis over the years and only one has ever died, and it was because I accidentally physically damaged it. So, I wouldn’t write them off just yet. I’d recommend using an SSD with a SATA-USB adapter (or M.2 NVMe SSD) to avoid potential issues using SD cards.
Ditto on what Kyle said about using an SSD instead of an SD card… especially on the Pi4 and Pi5 with the USB 3 ports. It will greatly reduce the chance of data corruption as well as greatly increase I/O performance.
I’ve been using these M.2 SSD enclosures… inexpensive and very fast read/write speeds… https://www.amazon.com/dp/B07MNFH1PX?ref=ppx_yo2ov_dt_b_fed_asin_title
My main suspect is power issues. I live in an area that has had A LOT of brown outs over the last couple of years. 3 fails so quickly must have had a similar culprit and that’s all that I can think of since we have had brownouts in the recent past. Maybe those brownouts killed the sdcard (not sure what happened to the rockpro, but maybe similar root issue…).
With that in mind, I finally bought UPS which I should have bought in the beginning. If that was the main issue, hopefully that fixes it.
On your advice, I found a usb ssd I had lying around so I installed debian and mycodo on it and velcroed the thing to the pi case.
If arm is as solid as you say, maybe it’s just my doing things sloppy that ultimately caused all this and I’m just throwing a tantrum about it after the fact. With my luck with tech, I could accept that I’m in the wrong here. And with the fixes, maybe things will run smoothly moving forward.
I would love to try a setup to assuage my worries though. I’ve worked with systems that have 2 pumps in parallel with only 1 working. If that one fails, the second one kicks on and keeps things running while you repair the first. It would be great if I could set up mycodo on the rockpro and the rpi so if one fails, the other takes over to keep things running. Is that sort of setup a possibility?
Big yes on the UPS … I have most of my “critical” devices on UPS units… like Mycodo, my Pi-based file server, my router and mqtt broker, and a local time server so that nothing on my network ever looses real-time even if I lose my internet connection and suffer a short power failure… but it’s possible I’m being over cautious. But then again the record for up-time on my Pi-based OMV server was over a year without a reboot, and that was back when I was running it on an old Pi model 2. Just upgraded it to a Pi4 last week
Yes, ARM is solid and isn’t going away any time soon… 7 billion smart phones and counting… not to mention everything else they’re embedded in now days.
Brownouts (or bad power supplies or cheap USB cables) or anything that can cause the Pi to have an under-voltage condition can definitely cause SD card corruption, I’ve had that happen a couple of times, but you just re-format and flash the card again and it should be fine.
There are some ways to build a failover system like you mentioned where if one Pi fails, a second Pi takes over.
Although setting this up on Linux with a Pi will probably require some script writing and probably some kind of network monitoring software that can detect when Pi 1 goes down or is no longer responding to pings, and then send a command to “wake up” Pi 2.
However, a UPS and a good power supply is usually more than enough to keep a Pi up and going for many years without incident. I try to make sure that any USB power supply I buy is at least 2.5 amps, preferably 3 amps, especially if you are running a Pi 3 or 4 with peripheral hardware attached to the GPIO.
And test your power supplies with a VOM meter. If a power supply’s output is less than 4.8V, it will cause under-voltage problems with the Pi.
Optimal voltage output for a Pi power supply is 5.1V. Anything above 5.2V may cause problems with the Pi as well.
For USB cables… buy ones that are rated for “fast charging”… they usually have thicker wires that have less voltage and current drop, Always use the shortest USB power cable that you reasonably can, I wouldn’t use any USB cables over 3 feet long to try to power a PI as they might cause too much voltage drop.