About half a year ago I read on Hacker News about these affordable yet robust microSD cards from ATP (Taiwan). A 4GB card is about $15, which is pretty damn cheap for anything “industrial”.
This model is supposed to tolerate sudden power cuts much better than the typical microSD card, which, as many have noticed, often dies after a couple of power cuts.
For the past few days I’ve been power-cycling a Raspberry Pi 3B+ a few thousand times with this card, running our Balena app. It currently writes quite verbose log files to the SD card on startup.
Tldr: so far, it’s looking pretty good. A few thousand random power outages (5 seconds power outage, then the device gets power for 2-152 secs, linearly randomly), and it’s still booting fine.
I’ll report back with more progress and details - I plan to test this for at least 10k random reboots.
"- Enhanced F/W algorithm to minimize the risk of a sudden power-off
ATP aMLC SDHC/microSDHC cards are designed for most up-to-date industrial applications, such as surveillance, medical imaging, transportation, drive recorder and automation where customers require higher reliability, endurance and performance but also seek for cost-effective solution to meet their budget.
Moreover, with SIP (System-In-Package) manufacturing process, the operating/storage temperature of ATP aMLC SD/microSD cards is -25 to 85 degrees Celsius. ATP aMLC memory cards passed a series of power cycling test and thorough evaluation process."
This is the test setup. I actually found an old device I had around from 13 years ago (“Aviosys IP Power 9212”) to handle the power cycling. It didn’t respond to modern browsers’ HTTP requests (I’m guessing the requests were too large), but I figured out a way to control it via UDP packages. I cut the +5V part of a flat micro USB cable and routed it through the relays inside this device.
Have you tested the SanDisk Industrial cards per chance? Priced similarly (even cheaper) but also touts “power immunity”:
These high endurance, industrial-grade solutions offer extended product life cycles. Combined with proactive Health Status Monitor on the cards, our industrial solutions reduce the total cost of ownership per system by eliminating costly redesigns and re-qualifications, and minimizing unnecessary maintenance calls. Advanced memory management FW features power immunity, auto/manual read refresh, ECC, wear leveling
No problem - I’m doing this anyway for our own purposes and figured I might as well share the results since we’re addressing a tiny niche with our Balena-driven product.
My instinct is that most of the magic here is in the SD card firmware (frankly, it seems like a bug fix - perhaps something that limits write performance), and not in the process itself, but I don’t really know the details.