Intermediate Project

Build a Digital Data Logger

A data logger automatically records measurements from sensors over long periods of time. It can store information such as temperature, humidity, voltage, current, pressure or light intensity on an SD card or transmit it wirelessly to a computer or cloud service. Data loggers are widely used in laboratories, industrial automation, environmental monitoring, renewable energy systems and scientific research.

Digital Data Logger

Project Overview

The microcontroller periodically reads one or more sensors and stores the measurements together with the current date and time.

Each record is written to an SD card or transmitted to a remote server, allowing the data to be analysed later using spreadsheet or graphing software.

The sampling interval may range from milliseconds to several hours, depending on the application.

Project Difficulty

ItemValue
Difficulty⭐⭐⭐ Intermediate
Build Time4–8 Hours
Supply Voltage3.3 V or 5 V DC
StorageMicroSD Card or Flash Memory
ControllerArduino, ESP32 or STM32

Main Sections

Section Function
Microcontroller Controls data acquisition and storage.
Sensors Provide measurement data.
RTC Module Adds accurate date and time to each record.
MicroSD Module Stores collected data.
Display (Optional) Shows current measurements.
Power Supply Powers the complete system.

Typical Sensors

Sensor Measurement
DS18B20 Temperature
DHT22 Temperature and Humidity
BME280 Temperature, Humidity and Pressure
ACS712 Current
Voltage Divider Voltage
BH1750 Light Intensity
MQ-135 Air Quality

Typical Components

QuantityComponent
1ESP32, Arduino Nano or STM32
1MicroSD Card Module
1DS3231 RTC Module
1–6Sensors
1OLED or LCD Display (Optional)
1Power Supply or Battery Pack
1Project Enclosure

How the System Works

The RTC provides the current date and time.

At each sampling interval, the microcontroller reads every connected sensor and combines the measurements with the timestamp.

The data is stored in CSV or TXT format on the MicroSD card, making it easy to open using spreadsheet applications.

In wireless versions, the same information can also be uploaded to a web server or cloud platform for remote monitoring.

Example CSV Record

Date Time Temperature Humidity Voltage
2026-08-03 14:30:00 28.5 °C 65 % 12.42 V

Applications

  • Weather stations.
  • Solar power monitoring.
  • Battery performance testing.
  • Industrial process monitoring.
  • Laboratory experiments.
  • Greenhouse automation.
  • Cold-room monitoring.
  • Environmental research.

Testing

  1. Verify the supply voltage.
  2. Check communication with each sensor.
  3. Confirm the RTC keeps the correct date and time.
  4. Insert and format the MicroSD card.
  5. Verify that data files are created correctly.
  6. Open the CSV file on a computer.
  7. Compare sensor readings with reference instruments.
  8. Test long-term operation.

Troubleshooting

Problem Possible Cause
No data saved MicroSD card not detected or incorrectly formatted.
Incorrect timestamps RTC not set or backup battery depleted.
Sensor readings incorrect Calibration or wiring problem.
Missing data Power interruptions or software errors.
Corrupted files Power removed while writing to the SD card.

Project Improvements

  • Add Wi-Fi cloud synchronisation.
  • Transmit data using MQTT.
  • Support LoRa communication for long-range monitoring.
  • Add GPS location tagging.
  • Display live graphs on a TFT screen.
  • Automatically upload data to Google Sheets.
  • Enable USB data export.
  • Add battery level monitoring and deep-sleep mode.

Skills Learned

  • Sensor interfacing.
  • Data acquisition.
  • Real-Time Clock (RTC) programming.
  • MicroSD card storage.
  • CSV file generation.
  • Embedded system design.

Safety Notes

  • Always disconnect power before inserting or removing the SD card.
  • Use high-quality MicroSD cards for reliable long-term recording.
  • Protect outdoor installations from moisture and dust.
  • Ensure sensors operate within their specified voltage ranges.
  • Back up recorded data regularly to prevent accidental loss.

Key Points

  • A data logger automatically records measurements over time.
  • An RTC provides accurate timestamps for every measurement.
  • MicroSD cards offer simple and inexpensive data storage.
  • CSV files can be analysed easily using spreadsheet software.
  • Data loggers are widely used in science, industry, renewable energy and IoT applications.

Next Project

Continue by building an IoT Weather Station, combining multiple sensors, Wi-Fi connectivity and cloud data logging for real-time environmental monitoring.

Next Project → IoT Weather Station