A data logger is a device that is used to collect and store data over time. It is a small electronic device that can be used to measure various physical parameters such as temperature, humidity, pressure, light intensity, and many others, and then record that data for later analysis. Data loggers are important because they allow for the collection of valuable data that can be used for a variety of purposes and contribute towards better decisions. For example, data loggers are commonly used in scientific research to collect data on environmental conditions or to monitor the behavior of animals. They are also used in industrial settings to monitor and control manufacturing processes, and in the automotive industry to collect data on vehicle performance; and measure the micro-environments in a polyhouse. One of the key benefits of data loggers is their ability to collect data over long periods of time. Unlike traditional data collection methods, which may require manual data entry or monitoring, data loggers can be left in place for days, weeks, or even months, collecting data continuously. This allows for a more comprehensive and accurate view of the data being collected. In addition, data loggers are often compact and portable, making them easy to deploy in remote or hard-to-reach locations. They can also be configured to collect data at specific intervals or in response to certain events, providing even greater flexibility and control over data collection. Data loggers are an essential tool for anyone who needs to collect and analyze data over time. Their ability to collect accurate and reliable data over long periods of time makes them an invaluable resource for scientific research, industrial monitoring, and many other applications.

In Vigyan Ashram, there is a great amount of work going on in the field of drying. The two important factors affecting the drying process is the temperature and humidity. These parameters are repeatedly studied to understand the drying process better. This created a need of the data logger. The previous one’s built posted the readings on an online database on the internet and therefore were dependent on the WIFI connectivity. To use the data logger in a low resource location it required the data to be stored in hardware storage, like the micro memory card. Identifying the requirements of portability, memory card based storage and temperature/humidity measurement, a data logger was developed.

Version 1.0 (Temperature data logging)

First prototype

The first prototype was a trial to test the various input and output devices and try to fit them in a portable box. This prototype had a PCB holding the ESP32 with slots for the peripherals like DS18B20 temperature sensor and memory card reader (SPI). The temperature sensor needed Along with this the box contained a female DC jack to power it using a 5V adapter and a toggle switch to start the device. The SD card to be used requires to be formatted to the compatible FAT32 file format. On testing the device readings were collected and stored in the memory card as desired. The data was stored in a .txt file. The file can easily be converted to excel file by using comma “,” as a delimiter.


  • ESP-32
  • SD card Module
  • DS18B20 temperature sensors
  • Female DC jack
  • Toggle switch
  • 5 mm LED with cover
  • 220 ohms resistor
  • Cable gland
  • micro SD card
  • ESP-32 PCB
  • PCB connectors
  • Junction box
  • Wires, screws, etc

Second prototype

The second prototype developed had addition features. A new temperature sensor was added to the device, allowing it to measure temperature of two different places. Along with this a small slot was created on the bottom side of the box to allow the insertion and removal of the memory card without opening the box. An LED was added to the side of the box to be used as an indicator. The LED glows up when the device is measuring and storing the temperature. To make the device more portable it a lithium ion battery was fitted inside along with a TP4056 charging module. The connections were rewired properly and the device was tested. The device uses a one-wire library for the measurement of temperature using two sensors. The device can be switched on and off using the toggle switch. To charge the device it must be connected to an adapter and must not be switching on during charging. The battery takes approximately 2.5 to 3 hours to charge completely and is indicated by a faint blue light on the side of the box. A trial was conducted to test the how long the battery lasts. The device took readings for 22 hours and 40 minutes until it completely discharged.

Further updates

  • The duration of the operation of the device on a single charge can be increased by testing the ESP32 sleep mode.
  • The data logger needs to be upgraded to measure temperature and humidity. For this AHT25 sensor was ordered but it failed to communicate with ESP32 via I2C communication protocol.
  • Since the PCB is modular and can connect multiple devices, other sensors can also be used.


NOTE: The ESP32 sleep mode was tested and the device was able to take readings for over 24 hours on full charge.

Version 2.0 (Temperature and humidity)

Similar to the previous version an upgraded version of the device was developed. This upgraded version of the device utilized an AHT25 sensor to measure and log temperature and humidity. This sensor communicated with the ESP32 via the I2C communication protocol. The AHT20, SD card module, LED and power pin were connected to the PCB connectors. Initially the sensor had problems in displaying the readings but upon talking to the experts it was found out that the best suited library for this sensor was the AHTxx library by enjoyneering. Using this library the sensor was used in the device. The device was able to give temperature and humidity readings for more than 24 hours.