How to ESP32 saving measurements at SD-card and prevent data loss?, ESP32,guide,compatibility,Svet Črnil

How to ESP32 saving measurements at SD-card and prevent data loss?

For recording measurements at SD-the card needs a proper electrical interface, a proper file system and a controlled method of closing records. Do not use the card as an unlimited fast and indestructible storage.

What to check out

  • Check if the module has a regulator and a signal conversion. Naked SD-use card 3,3-V environment; the permitted power supply of the module is checked separately.
  • Connect Relevant SPI-signals and individual CS. Check their cooperation with several devices on the same bus.
  • Start with a short file creation, recording and rereading test. The format of the card must be supported by the used library.
  • Record the measurements with the serial number, time and validity status. Plan a flush or close files, full card and restart.

A Practical Example

CSV-the record may contain columns time, temperature, validity and serial number. After the disconnection test check which records have remained legible and how much of the latest data you may lose.

Common error

Power supply directly from GPIO is not an appropriate general solution. Current shocks in writing require a suitable supply path.

For further reading

Compatibility check products

Select products according to the above criteria; the list is not a confirmation that they are all interchangeable.

Published:

20.10.2026

Related products

Additional documentation

Related FAQs