IntermediateSensors and Data Logging
Weather Data Logger
Log BME280 readings with timestamps to a microSD card for later graphing.
Parts from the database
- BME280 Ć 1Environmental sensor breakout
- DS3231SN Ć 1Timestamp source on a breakout
- Raspberry-Pi-Pico Ć 1Microcontroller
Other supplies
- microSD breakout with 3.3 V logic compatibilityCommon build supply
- microSD card formatted FAT32Common build supply
- BME280 breakoutCommon build supply
- DS3231 breakout with backup cellCommon build supply
- Pico boardCommon build supply
- USB power supplyCommon build supply
- jumper wiresCommon build supply
Amazon links may be affiliate links. As an Amazon Associate, Electronics Hobby Hub earns from qualifying purchases.
Connections
- Share 3V3/GND and I²C SDA GP4/SCL GP5 between BME280 and DS3231; verify their addresses.
- Connect microSD module to SPI pins supported by the chosen Pico core; use 3.3 V-compatible logic.
- Keep SPI wires short and insert the card only after power is off.
Build steps
- Test the BME280 and RTC individually before adding the SD card.
- Run a microSD write/read example and confirm a CSV file opens on a computer.
- Write one row per minute with timestamp, temperature, pressure and humidity.
- 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.