Sensors and Data Logging for Science

Updated June 2026
Automated sensor systems collect scientific data continuously, precisely, and without the errors and gaps that manual measurement introduces. Whether you are monitoring environmental conditions, tracking an experiment over days, or recording data from multiple locations simultaneously, a well-designed sensor and data logging system replaces tedious manual readings with reliable, timestamped digital records. This guide walks you through building a custom data logging system from defining requirements to deploying a calibrated, field-ready system.

The cost of scientific sensing has dropped dramatically. Sensors that cost hundreds of dollars a decade ago now cost two to ten dollars each, and microcontroller platforms like Arduino and Raspberry Pi provide affordable, programmable brains for data collection. This means that building a multi-sensor data logging system is now within the budget of almost any research project, classroom, or citizen science initiative. The challenge is no longer cost but design: choosing the right sensors, connecting them correctly, calibrating them properly, and ensuring reliable long-term operation.

Define Your Measurement Requirements

Before selecting any hardware, answer four questions about your data collection needs. First, what physical quantities do you need to measure? Temperature, humidity, pressure, light intensity, soil moisture, pH, dissolved oxygen, wind speed, and acceleration are among the most common scientific measurements, and affordable sensors exist for all of them. Second, what accuracy and resolution do you need? A classroom weather station can tolerate plus or minus 1 degree Celsius accuracy, but a climate research station needs plus or minus 0.1 degrees or better. The required accuracy determines which sensors are appropriate.

Third, how frequently do you need readings? Once per minute is sufficient for most environmental monitoring. Once per second is needed for tracking dynamic processes like chemical reactions or mechanical vibrations. Frequencies above 1,000 readings per second require specialized hardware and are beyond basic Arduino capability. Fourth, how long must the system operate unattended? A lab experiment lasting hours has different power and storage requirements than a field deployment lasting months. Long deployments require low-power operation, large storage capacity, and weatherproof enclosures.

Documenting these requirements before shopping for components prevents two common mistakes: buying sensors that are not accurate enough for your research, and over-engineering a system with expensive sensors and features you do not need.

Select Sensors and a Logging Platform

For temperature measurement, the DS18B20 digital sensor ($3 to $6) provides plus or minus 0.5 degree Celsius accuracy in a waterproof probe form factor suitable for air, water, and soil measurements. For higher accuracy, the BME280 ($5 to $10) measures temperature (plus or minus 1 degree Celsius), humidity (plus or minus 3 percent), and barometric pressure (plus or minus 1 hPa) in a single package. For light intensity, the TSL2591 ($6 to $8) provides calibrated lux measurements across a wide dynamic range. For soil moisture, capacitive sensors ($3 to $5) measure water content without the corrosion problems of resistive sensors.

Choose your logging platform based on your project complexity. Arduino Uno or Nano ($5 to $25) handles simple, low-power data logging with one to five sensors, writing data to an SD card at intervals from once per second to once per hour. The Arduino platform is ideal for battery-powered field loggers because it draws very little power (especially in sleep mode). Raspberry Pi ($35 to $80) is better when you need on-device data processing, internet connectivity, camera integration, or the ability to run Python scripts for complex data handling. Commercial data loggers from Onset (HOBO), Campbell Scientific, and others provide plug-and-play reliability with calibrated sensors, at a higher price point.

For SD card logging, an SD card breakout module ($3 to $8) connects to an Arduino or Raspberry Pi and provides removable, large-capacity storage. For real-time data transmission, WiFi (ESP32 boards, $5 to $15), LoRa radio modules ($10 to $20 for long-range, low-power transmission), or cellular modules ($30 to $60) send data to a remote server or cloud platform. Choose based on your deployment location: WiFi for indoor labs with network access, LoRa for rural or remote sites up to several kilometers from a gateway, and cellular for any location with mobile phone coverage.

Wire, Program, and Test Your Data Logger

Wire each sensor to your logging platform following the manufacturer's connection diagram. Use a breadboard for initial testing, then transfer to a soldered protoboard or custom PCB for permanent deployments. Keep wiring neat and organized, using consistent colors and labeled connections. A wiring mess that works on the bench will fail in the field when a loose connection vibrates free or corrosion attacks an unreliable joint.

Write your logging code to follow a consistent pattern: initialize sensors and storage on startup, then enter a loop that reads all sensors, formats a data line with timestamp and comma-separated values, writes the line to storage or transmits it, then sleeps until the next reading time. Include error handling that logs sensor failures rather than crashing the entire system. If one sensor in a multi-sensor system fails, the others should continue recording.

Test the complete system on your bench for at least 24 hours before deployment. Verify that data files are formatted correctly and can be imported into your analysis software. Check that timestamps are accurate and consistent. Confirm that power consumption is sustainable for your planned deployment duration. Identify and fix any issues in the controlled lab environment where debugging is easy, not in the field where it is difficult.

Calibrate Sensors Against Reference Instruments

Raw sensor readings are rarely accurate enough for scientific use without calibration. Calibration establishes the relationship between what your sensor reports and the true physical value, as determined by a reference instrument of known accuracy. For temperature sensors, compare readings against a calibrated digital thermometer at three or more temperatures spanning your expected range. For humidity sensors, use saturated salt solutions that produce known humidity levels (sodium chloride produces 75 percent relative humidity at 25 degrees Celsius, for example).

Record paired readings (your sensor value versus reference value) and fit a calibration equation, usually a linear relationship of the form corrected_value = slope * raw_value + offset. Apply this calibration equation in your logging code so that all recorded data is already in corrected units. Store the calibration date, reference instrument model, and calibration equation in your project documentation so that the calibration can be verified or repeated later.

Recalibrate periodically, especially for sensors that drift over time. pH sensors, dissolved oxygen sensors, and electrochemical sensors are particularly prone to drift and typically require weekly to monthly recalibration. Temperature and humidity sensors are more stable but should be checked against a reference at least annually.

Deploy, Monitor, and Maintain the System

Install the system in its operating location and verify data collection over an initial monitoring period of 24 to 72 hours. Check for issues that only appear in the deployment environment: electrical noise from nearby equipment, temperature extremes that affect sensor accuracy, moisture infiltration, wildlife interference, or connectivity problems.

Establish a maintenance schedule based on your hardware. Battery-powered systems need battery checks or replacements at predictable intervals. Sensors exposed to harsh environments (rain, soil, salt water) need periodic cleaning or replacement. SD cards should be swapped or downloaded before they fill. Remote-monitoring dashboards that display real-time data help you detect problems early, before they result in lost data.

Keep a maintenance log that records every site visit, battery replacement, sensor cleaning, calibration check, and data download. This log becomes part of your research documentation and helps explain any anomalies in your data. A gap in your dataset is much more interpretable when you can point to a maintenance log showing that the battery died on a specific date and was replaced two days later.

Key Takeaway

A well-calibrated sensor logging system built from an Arduino, a few inexpensive sensors, and an SD card module can collect scientific data continuously for weeks or months at a total hardware cost under $50. The key to reliable results is proper calibration, thorough bench testing, and a documented maintenance schedule.