What storage should I design into an IoT device that logs sensor data for years?
Design in soldered storage, not a removable card, and size it by write volume rather than by capacity headline. A logger writes continuously for years with no user present, so the two things that decide success are how the writes are distributed across the memory and what happens when power is lost. Specify the memory grade against your actual write rate, confirm the controller does wear levelling and bad-block management, and make the file system tolerant of abrupt power removal.
Start from the write profile
Before choosing a part, write down four numbers: bytes per record, records per interval, how long each record must be retained, and whether the device is ever serviced.
Those four numbers determine everything else. A device writing a kilobyte a minute has an easy life; the same device writing a megabyte a minute is a different engineering problem, even though the code is identical.
| Input | Example (illustrative) | Why it matters |
|---|---|---|
| Record size | 256 bytes | Multiplied by frequency, this is your daily write volume |
| Frequency | Once per minute | Continuous writes stress endurance |
| Retention | 12 months | Sets minimum capacity |
| Service interval | Never | Failure must be graceful, not recoverable by hand |
Why soldered beats removable here
A card slot introduces a connector, an insertion failure mode, and the possibility that somebody removes the media while the device is writing. In a sealed device that is never serviced, a connector is a liability with no compensating benefit.
A soldered module also lets you specify the memory grade and interface as part of the design, so the endurance and thermal behaviour are known rather than inherited from whatever card the installer happened to buy.
Power loss is a design requirement, not an edge case
Battery devices brown out, mains devices lose power during faults, and industrial installations have noisy supplies. A logger will lose power mid-write eventually, and the question is whether it comes back.
Three defences matter: a file system or storage layer designed for abrupt removal, a controller that handles interrupted writes without corrupting its mapping tables, and firmware that can recover or rebuild on boot rather than assuming a clean shutdown. Ask each supplier what their part does when power disappears during a write — the answer separates parts designed for embedded use from parts designed for a desktop.
Sizing, and the case for headroom
This is one of the few cases where buying more capacity than the arithmetic requires is justified: writes spread across more cells, so each cell is erased less often, which extends life.
That is a deliberate endurance decision, not a habit. Let the write volume and the target service life set the number, then round up one band if the wear calculation is marginal.
Sources
- JEDEC — memory endurance and reliability standards
- SD Association — power-fail and reliability behaviour
- Linux kernel — flash file system documentation
Figures quoted on this page are from the published reporting listed above. Where a number is an estimate rather than a published figure, it is described as approximate.
Frequently asked questions
Can I use a microSD card socket for easier field replacement?
Yes, if field replacement is a real requirement — for example if the media must be swapped to retrieve data. But then design for it: choose an endurance-rated card rather than whatever is cheapest, specify the file system and formatting, and decide what the device does when the card is removed or fails. A socket used as a convenience rather than a requirement is where most field failures come from.
How do I estimate whether the storage will last the product life?
Multiply bytes written per day by the expected service years to get total bytes written, then compare against what the memory grade and wear levelling can sustain, with a safety factor. Use peak write rate rather than average, because firmware updates and event bursts can dominate. The estimate does not need to be precise; it needs to be explicit, so the grade can be chosen against a number instead of a guess.
Does the file system choice matter for a logger?
Yes, considerably. Simple file systems are easier to recover after a power loss but scale poorly and fragment; more complex ones handle large files and metadata better but are harder to repair. What matters most is that the chosen combination has documented behaviour on abrupt power removal, and that the firmware can detect and recover from an unclean shutdown.
Working on a specification?
Send us the product type, capacity, quantity and target date. We reply to business enquiries within 1 business day.
Request a quote