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:
Filed Under: Electronic Projects, Featured Contributions
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.