[SPEC-03 // FLD-051]
Solar Field Logger with Lossless Compression
Remote environmental data logger that survives six months unattended on a 5 W panel and stores 12 channels of calibrated sensor data in a compact binary log.
- // Status
- BENCH TEST
- // Reference
- FLD-051
- // Revision
- 2026.09
- // Published
- AUG 19, 2026
- // Updated
- SEP 30, 2026
Context
A remote site with no mains power and no network. The brief: record enough environmental data to characterise a microclimate across a full winter without visiting the site more than twice. Off-the-shelf loggers either assume mains power, assume connectivity, or store CSV at a density that fills flash in weeks.
Constraints
- One 8 MB flash die, no SD card. The card slot is the first thing to corrode.
- Six months unattended, including weeks without meaningful sun.
- No network. Data leaves by physical extraction over USB-C.
- Sensor calibration must be applied at capture time, not at export, so a corrupt export cannot silently change the meaning of past samples.
Architecture
- Sampling. The RTC wakes the core every 60 s. Duty cycle is ~210 ms: four I²C reads, calibration polynomial, frame append, sleep. Everything else is stop mode at 2 µA.
- Framing. Each record is
[u32 millis][u8 channel_map][i16 × n][u16 crc]. A double-buffered header page tracks write cursor and rollover count, so a torn write loses one record, never the log. - Compression. Channel values are delta-encoded against the previous sample with a 1–2 byte zig-zag varint. Temperature and humidity move slowly; most samples compress to 31 bytes from an uncompressed 40.
- Power. MPPT is a simple perturb-and-observe on the panel voltage with a hard floor at 3.2 V cell voltage. Below the floor the logger stops sampling and records the gap explicitly rather than pretending continuity.
Trade-offs
- No retransmission. The log is append-only and extraction is destructive (read-then-truncate). Simpler, but a failed extraction can lose data — hence the physical rule of two extractions per visit to different media.
- Calibration baked in. Changing a sensor means a new firmware revision and a header record marking the change. It makes retroactive recalibration impossible, which was the point.
- Stop mode over low-power run. Wake latency is 1.2 ms; the alternative would keep I²C peripherals alive and roughly double idle draw.
Failure modes handled
- Panel disconnect: header flags a
POWER_GAP; sampling resumes on restore. - Sensor NAK: three retries, then the channel is marked invalid in that frame rather than writing a fabricated value.
- Flash block wear: log rotates across blocks in a fixed ring; the first estimated wear-out is beyond 30 years at this record rate.
Status
Prototype deployed. One full winter cycle completed with 187 consecutive sunless days (the panel was snow-covered) and no data loss. Enclosure revision 2 is in progress: the current gasket admits condensation at the cable gland during freeze-thaw, which the next revision addresses with a desiccant chamber and a vertical gland entry.