Mobile QR Code QR CODE

  1. (Department of Automation of technical systems, State Energy Institute of Turkmenistan / Bayramhan street No. 62 745400, Mary, Turkmenistan bayramtdei87@gmail.com)
  2. (Rector, State Energy Institute of Turkmenistan / Bayramhan street No. 62 745400, Mary, Turkmenistan serdar.nazar.tdei@gmail.com )



Heat energy consumption, Arduino-based smart meter, Temperature sensor, Water flow sensor, Thinger.io platform

1. Introduction

Monitoring of energy consumption is one of the most challenging tasks as energy generation and consumption happen simultaneously in many cases. Therefore, saving energy is a tough issue. In this sense, on 21st of February 2018, in Turkmenistan, a State Program of energy saving in 2018-2024 was accepted. This program includes points about renewable energy sources, heat provision systems, and methods of energy saving [1].

The Execution Plan of this Program consists of 28 tasks, one of which is about designing intellectual or smart systems in order to control heat and hot water supply. The concept of heat energy is used to define the energy provided to houses by means of hot water circulation. This kind of house heating is used in some regions of the country by burning natural gas. Therefore, unless the consumed energy is calculated, there are huge amounts of water, gas and energy losses.

A measurement method is proposed for calculating the amount of consumed heat energy that is supplied by hot water coming from a heater and circulating in a house through heat tubes. In this sense, this paper is dedicated to a smart heat measurement system that was prepared using an Arduino board, YF-S201 water flow sensor, DS18B20 waterproof temperature sensors, ESP8266 WiFi (wireless fidelity) module, and 16x2 LCD I2C. The project also used IoT (internet of things)-based solutions and billing systems. IoT is a network of physical devices in which data or signal is transferred and received over the internet [2].

2. Related Work

Nowadays, implementing smart systems in order to solve challenging tasks and to take control of a process is becoming more popular. Establishing IoT-based smart systems and monitoring a process or controlling devices online is one of the demands. In this sense, hundreds of Arduino-based projects and smart systems have been worked out.

There are several internet platforms or domains through which devices can be controlled and in which data can be stored. By the help of a DHT11 sensor, one study managed to send an input temperature and humidity data to ThingSpeak cloud through an ESP8266 WiFi module [2]. Palma et al. [3] developed a new way of classroom management using NFC (near field communication) technology and a Xively server platform, in which collected data is sent to the cloud by establishing internet connectivity using an ethernet shield. They also managed to integrate other technologies such as Google Maps, Zapier, and RF (radio frequency) in order to point out the power or usefulness of IoT for managing, storing, and sharing data.

Vithlani et al. [4] worked out a project in which environmental parameters such as air humidity, soil moisture, and carbon monoxide concentration are monitored in a Thinger.io internet service system. The Thinger.io service has several advantages, one of which is the presence of appropriate device, data, and status widgets. Thinger.io is a user-friendly environment in which data can be stored, displayed, and retrieved. Another benefit of using Thinger.io is that it has a possibility for both sensing and also actuating.

In this sense, Alvaro et al. mention that Thinger.io is a platform in which a sensorized environment can be modeled, and data fusion (DF) applications, which are related to integrating observational data, knowledge models, and contextual information, can be implemented [5]. There are other kinds of programs that can be used to display the results in a friendlier interface. For instance, consumed electrical energy was calculated using voltage and current transforms together with an Arduino, and the obtained results were demonstrated in Meguno Link software [6]. However, that type of installation works only for standalone computers, so the results can be used to analyze results locally, but not through the internet.

Sending information or reporting about the energy consumption can be done using the internet or a GSM (Global System for Mobile communication) service [7]. However, in order to make the proposed project universal and monitor the energy consumption online, internet connectivity was preferred. But there are some drawbacks and challenges of using or implementing smart systems based on IoT. Although every step of IoT-based smart solutions is clear and smooth, there are still some challenges to be handled. In this sense, Risteska et al. point out that IoT-based systems include challenges such as interoperability, security, and privacy [8], which may be a good topic for further research and analysis.

Research work related to thermal calculation of electric heating was carried out by Zhao et al., but not by means of hot water circulation [9]. They studied thermal storage and heat transfer characteristics of an EHSTSS (electric heating and solid thermal storage system). In order to increase energy saving in the process of heating the houses, one study worked out a new design for building walls [10]. Nowadays, there exist several methods of house heating, some of which are based on renewable energy sources, such as geothermal and solar energy [11]. The difference of this paper is based on the calculation of consumed heat energy, which is supplied by circulating hot water. Using all the mentioned advantages of IoT-based solutions, the proposed measurement tool is also connected to the internet in order to monitor the results remotely.

3. The Proposed Scheme

The main focus of this project is to work out an accurate method of calculating the heat energy and establish a billing system. The proposed strategy is simple and straightforward. The heat energy for heating up the house was calculated by measuring the amount of the water and the temperature difference of the input water (entering into the house) and output water (leaving the house). In this case, houses are heated by means of hot water circulation. In the case of hot water supply for domestic uses, the temperature difference between the water and the room temperature can be measured, so if there is not any change between the input and output temperature, there will not be any charge.

Supplying domestic heat and hot water is not only a complex task, but it also demands accurate calculation of the consumed and lost part of initial energy. In this sense, this project was developed to calculate the consumed part of the energy for domestic uses. In order to develop the current project, the following simple equation of calculating the heat energy was used:

(1)
$ Q=m\cdot c\cdot \Delta' T $

where $Q$ is the quantity of heat energy being calculated (cal), $m$ is the mass of circulating fluid or supplied hot water (kg), $c$ is the specific heat capacity (cal/(kg℃)), which is almost a constant value, and $\Delta' T$ is the change of temperature or a difference between the input water temperature and the output water temperature (℃). Therefore, if we assume that the specific heat of the technical and hot water is known, the main task is to calculate the mass of the water, which can be done by using a YF-S201 water flow sensor. Temperatures of water and the environment can be measured by the help of DS18B20 waterproof temperature sensors. By outside temperature, we mean the temperature of the room or house that is being supplied with heat energy.

The main parts or devices that have been used in the project are listed in the Table 1. Collected data is stored in an SD card and sent to the internet cloud using an ESP8266 WiFi module. The next step is connecting these parts properly and then uploading the necessary programming.

Table 1. Parts of the proposed smart system.

Name of the part

Description

Arduino UNO board

The board contains ATmega328 microcontroller and serves as a "brain" of the project. Necessary programming codes are uploaded to this board.

YF-S201 water flow sensor

The sensor works according to the principle of Hall's effect and serves as a "water mass calculator".

DS18B20 waterproof temperature sensor

Two pieces of this kind of temperature sensor are being used in order to measure the temperature of two different points.

Micro SD memory card reader

The memory card is placed in this card reader and amount of the consumed heat energy is being stored.

Liquid Crystal Display (LCD-I2C)

The LCD serves as an indicator or display of the heat energy meter.

DC water pump

The water pump is connected in series with the water flow sensor and it is used to circulate the water.

ESP8266 WiFi module

The WiFi module connects the energy meter to the internet and the amount of the consumed heat energy is sent to the IoT platform Thinger.io via this WiFi module.

Power supply

12V DC 2A

The AC/DC adapter will serve as a power supply for the whole system elements including the water pump and the microcontroller.

4. Diagrams and Working Principle

The first step is working out the logic of the system. The block diagram of the system is shown in Fig. 1. As can be seen from the figure, the temperatures of input and output water are calculated and compared with each other. Calculation of consumed heat energy is carried out only if the input temperature is higher than the output temperature. In other words, in order to charge the residents, there must be a drop in temperature, which means the consumption of heat energy.

A diagram of the proposed system is shown in Fig. 2. As shown in the figure, the temperature difference is calculated using two temperature sensors, while the YF-S201 water flow sensor is used to measure the mass of the circulating water. Red arrows indicate hot water circulation, blue arrows show information being displayed and stored, and dashed arrows indicate measurement data that the sensors send to the microcontroller. Next, the necessary programming was uploaded to the microcontroller, and the received results were stored and sent to the internet cloud Thinger.io.

Each element of the project was connected to the microcontroller in accordance with the user guides related to each device or sensor. After the connection was completed, the programming part was carried out, and each element was called within the program through their connected pin numbers.

Fig. 1. Block diagram of the proposed heat measurement system.
../../Resources/ieie/IEIESPC.2023.12.2.155/fig1.png
Fig. 2. Diagram of the proposed measurement system.
../../Resources/ieie/IEIESPC.2023.12.2.155/fig2.png

5. Programming the Microcontroller

In order to write and upload the program of the project to the microcontroller, necessary libraries such as thinger.io, <LiquidCrystal_I2C.h>, <SPI.h>, <SD.h>, <ESP8266WiFi.h>, <ThingerESP8266.h>, <DallasTemperature.h>, and <OneWire.h> were downloaded. Next, in order to program the microcontroller, a corresponding ``Generic ESP8266 Module'' board was selected. On the Thinger.io platform, while creating a new device, the ``Generic Thinger Device (WiFi, Ethernet, GSM)'' option was chosen for device type.

The program of the microcontroller was divided into methods or functions, and a corresponding method was called within the void loop() block of the program. We created methods or functions such as SDcardmemory(), HeatCalculation(), and MassCalculation(). The following variables were assigned in the program:

int X; int Y;

float density=1.1; float TIME = 0;

float FREQUENCY = 0;

float WATER = 0;

float TOTALVOL = 0;

float TOTALMASS = 0;

float LS = 0;

float inputTemp; float outputTemp;

float CalculatedHeatEnergy=0;

float TotalHeatEnergy=0;

File SDdata;

The amount or mass of supplied and circulating hot water was measured by the help of the YF-S201 water flow sensor. To do so, the working principle of the sensor was analyzed. The sensor operates on the principle of the Hall effect [12]. There is a magnet attached to a rotating propeller inside the sensor. Therefore, when water flows through the sensor, it rotates the propeller, and every time the magnet passes by a Hall effect sensor, it sends a signal or impulse to the microcontroller. Therefore, by counting the number of incoming impulses, the volume of the water can be calculated. Afterwards, the mass (kg) was derived by the following well-known equation:

(2)
$ m=d\cdot V $

where $d$ is the density (kg/m$^{3}$), and $V$(m$^{3}$) is the volume of circulating fluid or supplied hot water. In this project, the density of the circulating water was calculated to be 1.1 kg/m$^{3}$. The program part for the calculation of mass or the MassCalculation() method looks like the following:

X = pulseIn(2, HIGH); Y = pulseIn(2, LOW);

TIME = X + Y;

FREQUENCY = 1000000/TIME;

WATER = FREQUENCY/7.5;

LS = WATER/60;

TOTALVOL = TOTALVOL + LS;

TOTALMASS = (TOTALVOL*1.1);

Next, temperatures were measured by the help of two temperature sensors, and their difference was calculated. As mentioned before, while one of these DS18B20 waterproof temperature sensors was placed in the input channel of heat provision system, the other one was mounted in the output channel. Therefore, the amount of temperature drop was converted to heat energy, and this energy was assumed to be the consumed energy. The program part for measuring the temperatures and then calculating the energy consumption with Eq. (1) is as follows:

#define TEMP_WIRE 5

OneWire oneWire(TEMP_WIRE);

DallasTemperature sensors(&oneWire):

float HeatCalculation()

{ sensors.requestTemperatures();

inputTemp=sensors.getTempCByIndex(1);

outputTemp=sensors.getTempCByIndex(2);

if (inputTemp> outputTemp)

CalculatedHeatEnergy = TOTALMASS*1.1*(inputTemp-outputTemp);

TotalHeatEnergy = TotalHeatEnergy + CalculatedHeatEnergy; }

else { CalculatedHeatEnergy = 0;

TotalHeatEnergy = TotalHeatEnergy + CalculatedHeatEnergy;}

return TotalHeatEnergy;}

In this way, the total amount of consumed heat energy was calculated, and the obtained result was sent to the platform via the ESP8266 WiFi module and also displayed on an I2C LCD screen. In order to provide the database with security, backup data, or a file, the SDcardmemory() method was also created and stored in the SD card memory simultaneously. To do so, a memory card reader was connected to the microcontroller, as illustrated in Fig. 2. The program part of the card or the content of the SDcardmemory() method looks like the following:

SDdata = SD.open("heatenergy.txt", FILE_WRITE);

SDdata.println(TotalHeatEnergy);

SDdata.close();

6. Measurement Results

The validity and efficiency of the proposed method were tested using the devices listed in Table 1 and a wattmeter. As shown in Fig. 3, an experimental setup was developed and included a small heater, water pump, sensors, and container in which an Arduino UNO board, LCD, memory card reader, and ESP8266 WiFi module were placed. In the experimental setup, water was heated with the help of electrical energy. In other words, electrical energy was converted to heat energy. The amount of consumed electrical energy was compared with the amount of heat energy being calculated by the proposed smart system. In order to measure the quantity of electrical power, a certified wattmeter was used. The smart system calculates heat energy in calories, whereas the wattmeter measures electrical power in watts and electrical energy in watt*hours. Therefore, Eq. (3) was used to convert the units of electrical energy into calories.

Fig. 3. Experimental set-up for calculating heat energy consumption.
../../Resources/ieie/IEIESPC.2023.12.2.155/fig3.png
(3)
$ 1\mathrm{watt}\cdot \mathrm{hour}=860.42\mathrm{cal}=3600\mathrm{J} $

Measurement was carried out once a day during 1 hour throughout a week. On each day of the week, the water in the small water tank was heated and circulated with the help of the pump for one hour, as shown in Fig. 3. The measurement results were then compared. Table 2 shows the values of measured and generated (theoretical) heat energy in kilocalories. Using the generated heat energy, the amount of consumed electrical energy was considered.

For each day of the experiment, the results were recorded, as shown in Table 2. Then, the absolute error or the amount of heat loss or measurement $\left(\beta \right)$ was measured using Eq. (4):

(4)
$ \beta =\frac{Q_{measured}-Q_{generated}}{Q_{generated}}\cdot 100% $

where $Q_{measured}$ is the measured value of heat energy by the proposed smart system, whereas $Q_{generated}$ is the amount of electrical energy consumed for keeping the water at 40℃ during one hour. As a result, the proposed system of calculating heat energy consumption intended for domestic uses operated properly and with minor errors. The maximum absolute error between the theoretical and experimental values of consumed heat energy was calculated to be around 3%, which corresponds to the values recorded on Friday, September 9, 2022. The measured amount of heat energy was always below the generated or theoretical value. Therefore, some part of heat energy was lost outside the heated ``house'' due to internal and external issues [13].

Table 2. Theoretical values and measurement results of heat energy registered by the experimental setup.

Days

Generated heat energy ($Q_{generated}$), kcal/hour

Measured heat energy ($Q_{measured}$), kcal/hour

Monday

(05-Sep-2022)

35.62

34.9

Tuesday

(06-Sep-2022)

33.84

33.1

Wednesday

(07-Sep-2022)

32.47

31.5

Thursday

(08-Sep-2022)

33.33

32.8

Friday

(09-Sep-2022)

36.76

35.65

Saturday

(10-Sep-2022)

32.74

31.8

Sunday

(11-Sep-2022)

30.59

30.3

7. Conclusion

Smart processing of information helps to make quick calculations and store data for future works. In this regard, this paper presented a novel way of calculating heat energy consumed for heating houses or buildings with the help of hot water circulation. A diagram, program, and experimental results of the proposed system were discussed. Relevant measurements were carried out in order to test the validity of the smart system, and positive results were obtained. As a result, this smart system calculates the consumed heat energy with a maximum of 3% error.

By making mathematical adjustments in the program part of the device, measurement errors can also be eliminated. However, prior to making such corrections, the place where the smart system is being implemented must be studied because the measurement errors depend mainly on the length of the heat tubes outside the house. Briefly, this project can be used in order to realize relevant activities of the State Program of energy saving in 2018-2024, in which the aim is to work out intellectual solutions for heat supply and hot water provision systems.

The project was further improved by connecting it to the cloud. The system can also be used for calculating the hot water consumption by adjusting the circuit of the project. In that way, it will help to reduce heat losses occurring due to the improper use of hot water and other natural factors. The project can further be improved by using different sizes of devices or water flow sensors in order to measure the mass of the water for the pipes with higher diameters and to calculate the heat energy consumption.

REFERENCES

1 
State Program of energy saving in 2018-2024. Turkmenistan (2018).URL
2 
S.A.S. Mohammed, A. Aluri, K.K. Duru, C. Karra, P. Venkatachalam and S. Kalluri. IoT Based Humidity, Temperature, and Gas Monitoring Using Arduino UNO, ECS Transactions, vol. 107, no. 1, (2022), pp. 6435-6444.DOI
3 
D. Palma, J.E. Agudo, H. Sánchez and M.M. Macías. An Internet of Things Example: Classrooms Access Control over Near Field Communication, Sensors, 14, (2014), pp. 6998-7012.DOI
4 
R. Vithlani, S. Fultariya, M. Jivani, H. Pandya. An open source real time IoT based environmental sensor monitoring system, Proceedings of International Conference on Research and Innovations in Science, Engineering and Technology, India (2017). pp. 145-150.DOI
5 
A.L. Bustamante, M.A. Patricio, J.M. Molina. Thinger.io: An Open Source Platform for Deploying Data Fusion Applications in IoT Environments, Sensors, 19, (2019), pp. 1-23.DOI
6 
P. Srividyadevi, D.V. Pusphalatha, P. M. Sharma. Measurement of Power and Energy Using Arduino, Research Journal of Engineering Sciences, vol. 2, no. 10, (2013), pp. 10-15.URL
7 
S. Nazarov, B. Jumayev. Smart Alarm System for Gas Leakages, International Journal of Engineering Research & Technology (IJERT), vol. 9, no. 5, (2020), pp. 973-976.DOI
8 
B.L. Risteska Stojkoska, K.V. Trivodaliev. A review of Internet of Things for smart home: Challenges and solutions, Journal of Cleaner Production, (2016).DOI
9 
H. Zhao, N. Yang, Z. Xing, L. Chen, L. Jiang. Thermal Calculation and Experimental Investigation of Electric Heating and Solid Thermal Storage System, Energies, 13, (2020).DOI
10 
Y.S. Vytchikov, A.Y. Vytchikov, M.E. Saparev, A.A. Chulkov. Features of calculation of heat consumption for heating energy-efficient buildings, Vestnik, 04(8), (2021). pp. 66-71.DOI
11 
A.Y. Jumayev, B.A. Jumayev, K.A. Sariyev. Building Photoelectrical Power Station in the Region of Turkmenistan, Handbook of Research on Renewable Energy and Electric Resources for Sustainable Rural Development, (2018). IGI Global, pp. 61-85.DOI
12 
S. Singh, P.C. Prakash, P. Singh, L. Sharma, A. Saini. Design Fabrication and Testing of Fuel Measurement Kit for Two Wheeler Vehicle, International Journal for Scientific Research & Development (IJSRD), vol. 5, no. 1, (2017), pp. 1317-1319.URL
13 
D. Salomone-Gonzalez, P.L. Curto-Risso, A. Calvo Hernandez, A. Medina, J.M.M. Roco, J. Gonzalez-Ayala. Pumped heat energy storage with liquid media: Thermodynamic assessment by a transcritical Rankine-like model, Journal of Energy Storage, 56, (2022).DOI

Author

Bayram Ashyrmyradovich Jumayev
../../Resources/ieie/IEIESPC.2023.12.2.155/au1.png

Bayram Ashyrmyradovich Jumayev is Senior Lecturer and Head of the department at State Energy Institute of Turkmenistan. He is also leading Young Scholars` Council of the institute. He received his M.S. degree in Physics Education and Minor degree in Solid State Physics from Middle East Technical University, Ankara, Turkey, in 2011. He is the owner of “Lecturer of the year – 2022” Grand Prix in Turkmenistan. He has participated in several international projects related to education and science. His research interests include smart systems, quantum information technology, sensors, power engineering, and digital education.

Serdar Nazarov
../../Resources/ieie/IEIESPC.2023.12.2.155/au2.png

Serdar Nazarov is the Rector of State Energy Institute of Turkmenistan. He studied Physics, Physics education and graduated from Turkmen State University named after Makhtumkuli in 1996. He also studied at Academy of State service under the President of Turkmenistan in 2019. He received his scientific degree “Candidate of technical sciences” in 2022 from Academy of Sciences of Turkmenistan. His research interests include power engineering, renewable energy sources, hydrogen energy and applied physics.