Engineers Garage

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Simple data logger system with I2C memory and RTC using Arduino

By Ashutosh Bhatt January 16, 2023

Manufacturing or processing industries, like textile, chemical, pharmaceutical, and others, have many continuous processes that require monitoring and keeping a record of different physical parameters like temperature, humidity, pH, moisture, flow, viscosity, etc. So, all such parameters are continuously displayed and stored in mainframe computers. Modern industries have DCS and SCADA systems to monitor, store and control these parameters. With the latest technology, Industry 4.0 with IoT technology, these parameters are monitored and stored over the cloud.

The physical parameters are sensed using transducers (sensors), and their value is converted into digital. This digitized value is then stored on computer memory (hard disk) or semiconductor memory chip. To keep an accurate data record, the sensor value is stored with a timestamp (the value of physical quantity sensed by the sensor at a specific time and date (i.e., temperature: 45oC Time: 16:05:10, Date: 23/11/2022). This record is displayed on a computer monitor or any other display device anytime, whenever required.

This project demonstrates a simple system where I have used one temperature sensor and stored temperature readings into a serial memory chip. It also uses a real-time clock (RTC) to keep temperature reading records with time and date, and it also communicates with a computer to display this record on a monitor.

The system uses an Arduino microcontroller board with IIC memory 24C32 and an RTC chip DS1307 module.

System block diagram
The major building blocks of the system are a temperature sensor, RTC chip DS1307, serial IIC memory 24C32, an Arduino microcontroller board, and a computer.

Temperature sensor: senses the temperature and gives analog output voltage per temperature change.

DS1307 RTC chip: has a 100-year calendar from 2000 to 2100 and gives accurate time and date with the day. It is used to provide time and date with sensor reading to store records properly

Serial IIC memory 24C32: used to store (log) the data (sensor value—temperature readings) with time and date

Arduino NANO board: the primary building block of the system. It has an 8-bit microcontroller ATMega328 with 32 KB of FLASH and performs the following tasks:

  • Reads the temperature from the sensor and converts it into a digital value
  • Reads time and date from RTC chip
  • Write the sensor value with time and date into serial memory after every five seconds.
  • Displays stored sensor readings, time, and date on computer serial monitor

Computer: used to monitor temperature readings and display stored temperature records with time and date.

Before moving onto the schematic diagram, its working and operation, let us first collect the required items.

Required items
Analog and digital temperature sensor module

IIC memory and RTC DS1307 module

Arduino NANO board

Schematic diagram

Description
The figure shows that the complete system is built using only three components (or modules)—temperature sensor module, IIC memory, RTC module, and Arduino nano board.

  • The temperature sensor module has four interfacing pins. (1) +V, (2) G, (3) A0 and (4) D0. The +V pin is connected to the +5V output pin of the Arduino board. The G pin is connected to the common ground of the circuit. Analog output pin A0 is connected with Arduino board analog input pin A0. Digital output pin D0 is not used here.
  • IIC memory and RTC module have many interfacing pins, of which only four are used. (10 Vcc, (2) Gnd, (3) SDA, and (4) SCL. The Vcc pin is connected with the +5V output pin of the Arduino board, and the Gnd pin is connected to the common ground of the circuit. SDA and SCL pins are connected with I2C pins A4 and A5 of the Arduino board, respectively
  • The Arduino board communicates through a USB data cable with the main computer system. The sensor data is monitored on a serial monitor.
  • The Arduino board and modules get +5 V power from the main computer through a USB cable.

Here is a picture of the circuit arrangement.

Working and operation
The module consists of a comparator with a potentiometer. The temperature sensor is an NTC thermistor; its resistance changes per a temperature change. The change in resistance is converted into an analog voltage output. This analog output voltage is available on pin A0. Thus the module gives an analog voltage of the production as per temperature change.

This analog voltage is given input to the internal ADC of the Arduino microcontroller, which reads this analog voltage and converts it into a digital value. Next, the Arduino reads the time stamp in HH:MM: SS, DD/MM/YYYY format from RTC chip DS1307 through IIC pins SDA and SCL. It then stores the digital value of the sensor reading into IIC memory 24C32 with time and date.

The Arduino continues to read the sensor value and stores it in memory with time and date after every given second. This process repeats till the 32KB memory is full. After that, the sensor data is overwritten from the first memory location.

To read stored data at any time from memory, one has to send the command “r” from the serial monitor (computer) to Arduino through serial communication. When Arduino gets this command, it will read all the data stored in memory and display it on the serial monitor as a temperature value at a particular time and date.

Here is a picture of the output on the serial monitor screen.


Software program
The program is written in Arduino IDE and compiled and uploaded into the internal Flash of the Arduino microcontroller ATMega328. The program uses Arduino built-in wire library “wire.h” and RTC library “RTCLib.h” in the program. The “wire” library functions are used to write and read data from IIC serial memory.


Here is the youtube video link for this article

 

You may also like:


  • WiFi Based Real-Time Data Logger for Cupboard or Fridge

  • A Bluetooth-controlled datalogger robot

  • Arduino solar/sun tracker with data logger

  • Arduino Based 4-in-1 Data Logger System

  • SCADA Systems

  • Data logger

Filed Under: Electronic Projects, Featured Contributions

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • 12VAC to 12VDC 5A on 250ft 12AWG
  • Lightbox circuit help
  • Engineer's own PCB layout software guide?
  • LVS Mismatch Error in Simple Layout
  • Does mobility carrier ratio changes with Wn? (0.18um) inverter design

RSS Electro-Tech-Online.com Discussions

  • Lightbox circuit
  • Fuel Auto Shutoff
  • Kawai KDP 80 Electronic Piano Dead
  • Python help with keystroke entries
  • Do resistors fail like dominoes?

Featured – Designing of Audio Amplifiers part 9 series

  • Basics of Audio Amplifier – 1/9
  • Designing 250 Milli Watt Audio Power Amplifier – 2/9
  • Designing 1 Watt Audio Power Amplifier – 3/9
  • Designing a Bass Boost Amplifier – 4/9
  • Designing a 6 Watt Car Audio Amplifier – 5/9
  • Design a low power amplifier for headphones- 6/9

Recent Articles

  • ITG Electronics releases gate drive transformers with 200 – 450 V DC capability
  • Stackpole introduces HCJ jumpers with 70.7 amp continuous current capability
  • Infineon releases MCU with 128K flash and multi-sense capabilities
  • ST introduces 600V GaN gate drivers with 300 ns start-up time
  • ABLIC releases S-19116 automotive voltage detector with 6.8μs response time

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe