IntermediateSensors and Data Logging

Weather Data Logger

Log BME280 readings with timestamps to a microSD card for later graphing.

Estimated time: 2–4 hours Ā· Skills: I²C, RTC, SPI, CSV files, sensor placement

Parts from the database

Other supplies

Amazon links may be affiliate links. As an Amazon Associate, Electronics Hobby Hub earns from qualifying purchases.

Connections

  1. Share 3V3/GND and I²C SDA GP4/SCL GP5 between BME280 and DS3231; verify their addresses.
  2. Connect microSD module to SPI pins supported by the chosen Pico core; use 3.3 V-compatible logic.
  3. Keep SPI wires short and insert the card only after power is off.

Build steps

  1. Test the BME280 and RTC individually before adding the SD card.
  2. Run a microSD write/read example and confirm a CSV file opens on a computer.
  3. Write one row per minute with timestamp, temperature, pressure and humidity.
  4. Run for an hour, inspect missing rows, and graph the CSV to spot placement or timing problems.

Software and firmware setup

Firmware is required, but a complete combined logger sketch is not included yet. Bring up the BME280, DS3231, and SD card with their own library examples first. Then append one CSV row per minute; select an SD library and SPI pins that match your Pico core and exact 3.3 V-compatible module.

Test your build

The saved CSV should contain a header and correctly timestamped rows. Protect the sensor from direct sun and heater drafts for useful ambient trends.

Troubleshooting

  • If the card is not found, confirm FAT32 format and module CS/SPI pin mapping.
  • If rows are corrupted, close/flush the file safely and avoid removing the card while writing.
  • If RTC timestamps are wrong, set the clock once and confirm the backup cell.

Safety and limitations

Use a low-voltage USB supply. This is an indoor hobby logger; do not expose unsealed boards to rain or condensation.

Manufacturer and platform documentation

Community Notes for This Project

These are unverified visitor contributions, separate from the build guide and manufacturer specifications. Verify technical advice against the linked datasheets before relying on it.

Set up the comments service to load community notes.

Share a tip or question about this build

← Browse all projects