Carbon footprint measurement using a mobile app integrated with IoT technology

It is known that global warming and the carbon footprint are directly proportional, that is, the more carbon footprint there is, the more global warming there will be, for this reason it was decided to take this environmental problem and calculate the carbon footprint of the engineering faculty of the Sinú University, in this way, the university can know the CO2 emission that is emitted in the faculty and in this way be able to take actions regarding the mitigation of these emissions. For this, a mobile application was developed with the Dart development language, this application can perform manual calculations of the carbon footprint, and a real-time calculation was implemented through a sensor that is connected to an Arduino, this Sensor can measure the electrical flow of a device and sends the information to an IoT server. Knowing the electric flux, the carbon footprint can be calculated. The application allows to control emissions, and organizes this information by means of graphs, and in this way the user can have a better understanding of the stored information.


Introduction
Currently society is going through an era of environmental crisis, temperatures are getting higher, leading to the melting of the geographic poles.The impact has been increasing over the last few years, bringing great consequences and side effects.This is due to the phenomenon called "greenhouse effect", which is created when some gases retain the energy emitted by the earth after being heated by solar radiation.
Greenhouse gases (GHGs) are increasing significantly according to the report presented by IDEAM and UNDP, prepared in the country, the increase has been 15%, going from 245 million tons of CO2 in 1990 to 281 million tons in 2010, causing solar radiation to remain within the atmosphere for longer than necessary.In this way, the greenhouse effect is not in itself a problem, but the excessive actions of mankind are making it difficult to eradicate, it is causing it to be further accentuated by the increase in gas emissions, especially carbon dioxide (CO2), which raises the planet's temperature.It is worth highlighting the impact of the industrial revolution on the climate, which has led to realize hundreds of investigations that indisputably show that global warming is closely related to this issue.For example, the Free University of Berlin, which is one of the pioneering institutions in these investigations, reported that it is the main cause, based on the pioneering study of the "natural climate archive" of the last 500 years.

Literature review
With the accelerated and diversified development of technologies in order to facilitate the most difficult tasks of the human being, these have begun to be introduced in the field of environmental care and even in the specialized area of carbon footprint calculation, as climate change is one of the biggest concerns and one of the most important problems currently faced by humans because many of the products consumed or used, including day-to-day activities largely denote the high index of greenhouse gases.Having said that, some investigations that propose solutions related to CO2 emission and carbon footprint were reviewed, including the following.Internet of Things system for monitoring protected crops, it is an Internet of Things (IoT)-based project to monitor crops in specific areas, using sensors which will send information to a web server, these sensors collect different data, such as relative humidity, temperature, water volumetric content in the soil and other factors.The architecture of the project is a sensor-cloud-server application model, the data is automatically updated, and the user will be able to display it through the website or from the mobile device either through graphs or tables.This system can send alerts to users so that in this way they have full control of the crops in the greenhouses (Gómez et al., 2018).
SGreenH-IoT: IoT Platform for Precision Agriculture, it is a platform designed to meet the needs of remote monitoring, thus reducing the investment of human resources, the platform is focused on the field of precision agriculture, it has mechanisms that generate a balance between agricultural production and optimization of the resources used like water and fertilizers.This type of agriculture contributes to combat epidemic diseases, to optimize resources and also provides added value to agricultural production, the platform has a four-layer architecture, it has sensors which are responsible for collecting information regarding fields of crops and greenhouses, the information is sent by the ZigBee protocol to the central server in the cloud, this stored data is analysed in the cloud, showing statistics about the crops and external factors, and the last layer allows users to view all the information on the dynamic website and the farmer can activate the systems manually or automatically (Guerrero et al., 2017).
Green Multimedia: Informing People of Their Carbon Footprint through Two Simple Sensors, this project carried out in Ireland by Dublin City University students, Aiden R. Doherty, Zhengwei Qiu, Colum Foley, Hyowon Lee, Cathal Gurrin, Alan F. Smeaton aims to estimate CO2 emissions related with the transport of a person using a simple portable accelerometer, present on many mobile phones, used as a means of estimating the CO2 of an individual related to transportation.
It was achieved by building an algorithm to detect when an individual is driving, based on the values of the motion sensor x, y, z, and from those calculations, the time that is driven and stops, then it is possible to make an estimation of how many litres of gasoline are consumed and what can finally be converted into CO2.In addition, they conducted extensive research to provide an estimate of transportrelated CO2 emissions through an interactive website and mobile application, which encompasses a set of users to be aware of their CO2 emissions (Doherty et al.., 2010).

Materials and methods
Throughout the work, different sensors were used, each one with the functionality we needed to perform the calculation of the carbon footprint in real time and thus be able to display the results from the mobile application.The sensors used during the work were as follows: Arduino UNO, ESP8266, RTC DS1307, ACS712, as shown in figure 1.After making the connections, as shown in figure 2, the system was programmed so that every certain time they would send the data to the IoT server and thus be able to process the data that would be displayed in the application later.The carbon footprint is measured in CO2 emissions and in order to find the emissions, mathematical operations are necessary, each emission source has an emission factor, from the beginning of the work we knew that two types of calculations would be implemented, one manual and the other which would be carried out in real time through sensors capable of measuring the electrical flow and in this way being able to calculate the carbon footprint of the device that has been connected to it.
For the calculations, the parameters for calculating the GHG inventory were used as shown in table 1.

Table 1. Equivalent emission factors by activity in kg of CO2.
To demonstrate that the manual calculation of the carbon footprint in the application works correctly, the manual calculation is carried out through a spreadsheet in Microsoft Excel software, the emission sources that were calculated were paper consumption and consumption of cardboard cups, this checking is performed taking the month of March as a reference.The results are shown in figure 3. The measurement was carried out weekly starting on Monday, 02/March/2020 and ending on Tuesday, 31/March/2020, performing the calculations every Friday of each week and in the last week it was carried out on Tuesday, in the figure you can see the total carbon footprint that was calculated weekly.This same simulation was conducted from the mobile application and the results are totally matched with those of Excel, if the manual calculation of the carbon footprint from the mobile application works correctly.The calculations made from the application must be stored in the database it is necessary for the user to save the results to be able to keep a detailed control of them, these calculations are displayed in a graph, which allows the user to better interpret these data.The results are shown in figure 3.
Figure 3. Graph of the result.Source: The authors Calculation of the carbon footprint in real time.This type of calculation was carried out with the sensors previously described, each sensor with its respective functionality allowed to measure the electrical flow of the device to which it has been connected, for the work, a LED diode was used, as can be seen in Fig 4, in this way, the ACS712 sensor capable of measuring the electrical flow, sends the data to the IoT server via the ESP8266 Wi-Fi microcontroller module, this data is sent promptly at 23:59:55, thanks to the RTC DS1307 module to which the time was configured (GMT-5) and this data can be displayed from the application in the form of graphs so that the user can better interpret this information.The deployment diagram illustrates the physical relationships of the different nodes that make up the calculation of the carbon footprint and the distribution of the components over said nodes.The TCP / IP and HTTP / HTTPS protocols are used.The site is hosted on a server with a Firestore database, as shown in figure 4. The application provides these results graphically, the user being able to better interpret these data, the application also provides additional information when selecting the line of the graph, this will provide the user with the result of the carbon footprint and the date with which this calculation was stored in the database.The data is represented in the application as follows on figure 5.

Results and discussions
This work allowed the elaboration and construction of a prototype of a mobile application, which contributes to the real-time measurement of the carbon footprint that occurs in each unit and equipment of a building, in this case of the engineering faculty of the Universidad del Sinú mainly, in addition, the ease of knowing the carbon footprint that is being emitted in it.For the verification, data were taken manually from periodic measurements of the energy consumption of the installation site which were compared with the measurements made by the DAQ module system and the application.
These measurements were compared obtaining errors of less than 2%, which are partially attributable to manual and automatic mediations not being synchronized exactly over time.Additionally, there is a difference due to the resolution of each meter and some other part of the error is attributable to the calibration and measurement uncertainty.However, in the medium-term tracking (one week), it is noted more detail in the automatic measurement due to how often the data is sample.This allows for a more reliable measurement of energy consumption and its carbon footprint than manual measurement because this is estimated in longer periods of time, which is not suitable in environments where consumption undergoes variations during use.The application according to the tests of use with various users shows ease of use, the results are easily accessible, and their display and interpretation is adequate.
This system allows the integration of multiple sensors for reading electrical consumption in various units or by equipment in each unit, other sensors of the same type can be integrated practically without changes, only a few configurations are required in the DAQ module and in the application.Other sensors that allow the measurement of other variables can also be integrated into the calculation of the carbon footprint, such as: drinking water consumption, garbage, and waste production, etc.Additionally, it is possible to monitor the temperature and humidity in the units to determine the relationship between the consumptions of the air conditioning equipment and the thermal comfort profiles, to evaluate their efficiency during the operation of this.All these systems require the activation of calculation modules in the application and the addition of hardware modules to the DAQ and the IOP Publishing doi:10.1088/1757-899X/1299/1/0120016 activation of software routines in the measurement, which were not enabled during the tests of this prototype, but which can be activated for more extensive tests.The measurement of the environmental temperature and relative humidity variables is included, as an additional value, which allows future relationships between energy consumption and environmental conditions to be obtained, as part of the analysis of the carbon footprint of these activities.For this, we use a DHT11 sensor connected to the data acquisition module (DAQ) developed from an Arduino Uno and an ESP8266, in communication with the ThingSpeak server and shown in the mobile application developed in Kodular, the update times of the Data was initially set in 15 seconds, but can be modified in the app.The results are shown in figure 7.

Conclusion
The application achieved all the objectives that were outlined from the beginning of the work, thus providing the Universidad del Sinú the possibility of having full knowledge about the carbon footprint and CO2 emissions, and thus, being able to take steps to mitigate the carbon footprint, and in this way the university can keep track of the devices that emit the most CO2 and find a way to prevent the excessive use of these devices.The application will provide the university with the knowledge of the carbon footprint that is emitted in real time and manual calculations can be performed, the application also provides to the user with control of all the emissions that are stored in the application and thus be able to apply steps to mitigate the carbon footprint and corroborate with the help of the application, whether the steps are successful or not.

Figure 1 .
Figure 1.Block diagram of the DAQ module.Source: The authors

Figure 2 .
Figure 2. Graph of the result.Source: The authors

Figure 5 .
Figure 5. System distribution diagram.Source: The authors