Temperature Control System Using Mobile Application Interface

Temperature control becomes increasingly necessary with each day, be it in industrial, commercial or residential environments. In a similar way, technology has become a common tool in everyday life. Thus, the technologies need to accompany advances in the controls of processes in many fields, creating applications that can be used in mobile devices alongside these processes. Therefore, this paper proposes temperature monitoring of an environment, via Bluetooth wireless communication and with interface display on a mobile application, developed in MIT App Inventor. While implementing commands via hardware and software a procedure to lower room temperature was applied through a ventilation system. The data are collected through a DHT11 temperature sensor, and the wireless communication is through a HC-05 Bluetooth module, both connected to the development board Arduino. It was possible to condition the cooler to work accordingly with a preset temperature range by using its IDE (Integrated Development Environment). Thereby, this project is a low-cost and advantageous alternative to temperature control and monitoring supported by technological advancements.


Introduction
In residential or commercial environments, physical or chemical processes and logistic chains in industries, among other environments, temperature plays a great role in establishing quality of the means and the final product. In many areas of scientific research and the productive sector, temperature is an important physical quantity that needs to be measured and controlled (ENJING et al., 2014).
Temperature control has been vastly applied in the transportation of medical products, live tissue storage and blood transfusion (LIU et al., 2016). Temperature control is important to optimize thermic conditions of greenhouse operations (CHOAB et al., 2019). In Subahi and Bouazza (2020)'s work it was developed a monitoring system applied to a greenhouse environment to control its internal temperature with the goal of reducing energy consumption while maintaining good conditions that would improve productivity.
The fundamentals to use temperature control systems range from applications in industrial sectors that need to improve productivity avoid instantaneous alerts by sensors and create transparency in its supply chains, to services that need to maintain quality and compliances.
The study of a case in the industrial sector of steel production presented the need for temperature control on the environment and with certain procedures. According to ArcelorMittal (2020), in labs where mechanical properties and chemical analyses are made, temperature control allows standardized results. In addition, it was reported by the company that in melting and solidification of steel, to manipulate temperature implies in the control of energy consumption and equipment deterioration. Procedures such as lamination and cold-mechanical transformation of steel need temperature control to regulate mechanical properties of steel, energy consumption and equipment damage (ARCELORMITTAL, 2020).
In contact with the industrial metallurgical sector described in the previous paragraph, it was informed that are used: mechanical, electrical and electronic systems to administer processes; are applied in this industry: sensors such as contact thermocouple, infrared thermometer, contact pyrometer and digital or analogical thermometers; the efficiency of these control methods can be compromised in cases of big product demands, or the specific handling of a process, for example: controlled temperature of a volume of 100 tons of liquid steel, or temperature control of a rod with speed of 200 m/s. With technological development, the need to evolve and innovate the control of productive processes in many sectors made necessary the creation of mobile applications. Simply, a mobile application is a software created with the purpose of entertaining, facilitating and or connecting the user, through an intuitive and easily accessed platform. Being used in different kinds of devices, such as smartphones and tablets Android and IOS, and smart TVs, these softwares assist people. Aware of the advantages presented by wireless communication, the possibility of a mobile application for temperature control has become an alternative.
Data correspondence can be done in many ways, through radio, satellite, microwaves, infrared, 4G, 5G, Wi-Fi and bluetooth. The last one is a wireless communication that transmits the wanted data between devices, as long as the distance between them it is short, which means that it depends on the proximity of the devices. The use of apps in mobile devices with wireless bluetooth communication offers many opportunities in commercial, industrial and medical areas, as well as in our daily routine. With that, developing applications with use in mobile devices becomes an opportunity to solve problems in industries, transportation, logistics, financial management, businesses and health related activities ( . In these researches, temperature control is shown in order to hone specific processes, which were previously traditionally done, and today can be benefited by the automated development. According to Choab et al. (2019)'s work home automated controlled systems are low cost and flexible, using a micro web server, IP (Internet Protocol) connectivity to access and control devices remotely using an Android smartphone. In Sawidin, Pongoh and Ramschie (2018)'s research, temperature and humidity control is done via a microcontroller controlled by an Android smartphone. Moreover, in Santos (2017)'s work temperature control is used inside a greenhouse using two control techniques along with a friendly interface to monitor and regulate temperature via smartphone.
Besides domestic environments, it was developed temperature control in medical areas, as indicated in Pinem (2020)'s work, which designed an application for medical teams of high mobility that supported the referral health system in Indonesia. Furthermore, temperature control systems are highly used in many fields, like the transportation of medical products and organs storages, and blood transfusions (LIU et al., 2016).
According to Ciriello, Richter and Schwabe (2018), digital technologies contribute to transforming society and economy, in a way that they are the result and the foundation to the development of digital innovations; therefore, the results of digital innovation are elaborated through distributed, combined and or other technological platforms of innovations. This way, combined innovation means that new technological solutions are made through a combination of elements with digital characteristics, or different technological modules with the same patterns; like this, many branches of digital innovative development can arise (CIRIELLO, RICHTER, SCHWABE, 2018). This project has as innovative potential a wide solution and open to improvements, meaning that it is a project of combined innovation, as its goal is the development of technologies that have reached the stage of dominating solution, but through recombination, it can reach sectors such as industries, commerce or services. The goal of this work is to control temperature via a cooling system using a friendly interface that monitors in real time the room temperature. Also, its goal is to control temperature by implementing a simple cooling system that will be activated according to the sensed temperature. With this, a more complete system, where temperature is controlled through an easily accessible interface and monitored in real time. To do so, wireless communication and a mobile application will be used, while it will be a low cost system. This article is organized as follows: section 2 describes the methodology of the proposed system. Section 3 presents the results and its discussion, and at the last section, the work is concluded with future improvements.

Materials and methodology
The research's proposition is to control temperature with a mobile application, using development boards and bluetooth communication (MON, 2015). The programming uses Arduino and its IDE (Integrated Development Environment), an open-source software (McROBERTS 2011).
Arduino allows for serial communication (PICORETI, 2020) and its code is based on C programming language (SCHILDT, 2001). The programming environment of MIT App Inventor will be used to develop the app's interface, Figure 1.

Hardware
In order to elaborate a physical project, it was necessary to assemble the components, with its main elements as the temperature sensor DHT11, Arduino Uno and the Bluetooth module HC-05, with its specifications presented on Tables 1,2 and 3 respectively. Furthermore, other components were used to compose the circuit, such as a 10k resistor, a 1k resistor, a 1N4007 diode, a NPN TIP122 transistor, a heat sink, alligator clips and jumpers. The DHT11 temperature and humidity sensor described on Table 1 has as its main characteristic measurement of temperature, but it can also be used to measure humidity in the same room. Below on Table 2, there is the description of the development board Arduino Uno SMD that used an ATmega328 module, and its port's structure allows for the use of jumpers to connect sensors, a characteristic that contributed to this component being chosen. With the components defined, the project was assembled. Initially, the pins between the temperature sensor and the development board were connected through jumpers on the protoboard: Vcc pin from the sensor, connected to 5V pin on Arduino. Afterwards, the sensor was connected to Arduino through a 10k resistor, which was connected to the second pin on the sensor. Also, the Ground (GND) pin on the sensor was connected to the GND pin on Arduino. With these connections, a test code for the DHT11 sensor was used to verify the connections made.
Continuing the process, to connect the bluetooth module to Arduino, the protoboard was also used: the GND connection between both pins; Vcc module pin to 3.3V entrance on Arduino; TX port on the development board to RX entrance on the bluetooth module; and at last, RX port of Arduino to TXT output on the module.
In order to connect the cooler to Arduino, a diode, a transistor, heat sink and the 1k resistor were necessary. The diode was connected to an outside power source of 12V, so that it could be connected to the cooler, which was also connected to the transistor connected to pin 9 on Arduino through the resistor. The heat sink was used on the transistor, functioning as it should, as the heat emitted by the transistor was absorbed, protecting the equipment and increasing its efficiency.
In Figure 2 below, the block diagram represents the connections made on the hardware described previously, making it possible to comprehend that the cooling system behaves as an output that depends on the data collected by the sensor: To finish the first part of the project, a code had to be built in Arduino's platform, which is indicated by the flowchart on Figure 3. To this end, it was necessary to add the DHT11 sensor's library to the code. Firstly, the code verifies if the sensor is working, and in case it is not a message "Failed to read from the DHT sensor" is presented. Then, when it is working correctly, the sensor reads, and then sends the temperature and humidity of the room, followed by the condition to turn on the cooling system. Finally, if the program is not closed, the code repeats.

Interface
For the innovative development of the project described in the previous topic, an interface was created through the MIT App Inventor platform. Thus, the visual parts of the application were defined, establishing button locations, and answer boxes for the sensor. In this moment, for the purpose of aesthetics and organization, a new screen was created, which a button would activate and its purpose would be to select a bluetooth device to connect.
After the necessary elements for the app were defined, it was possible to build the code for the application and establish its relations with the components of the project, presented on the flowchart of Figure 4. In order to establish the flowchart from Figure 4, the Blocks area from MIT App Inventor platform was used, where the programming of the visual components can be made. Firstly, a variable "device" was initialized so that it could be related to the bluetooth. When the main screen of the app opens, if the bluetooth of the device is not turned on, a notification to do so would appear. This way, the button to search for other devices could be clicked and the screen to look for and select other devices could be seen. If no device connects, then the process repeats, else, it opens the temperature screen.
When opening this screen the image of a thermometer with the color, red if temperature is hot, blue if temperature is cold and black if it is room temperature, will show, and after the sensor measures the temperature it will show in digital format above the image, alongside the humidity. In addition, on the other side of the thermometer image the status of the cooler will appear, if it is on or if it is off. Finally, to continue seeing the temperatures of the room it is necessary only to stay on the app, else, it should be closed.
To simplify the tests made of the program and define the venting system, temperature boundaries were established: above 30°C hot temperatures, below 20°C cold temperatures, and between those, room temperature. Nonetheless, the code can be adapted according to the finality of the application. For example, in greenhouses the best growing temperature is from 21-24°C, the minimum being 18.5°C and the maximum 26.5°C (JONES JR., 2002). Medications to be kept at room temperature must be in a wellvented place, between 15 and 25°C, or up to 30°C depending on the climate zone (HEWSON et al., 2013). Therefore, the temperature bounds of the code must be defined by the purpose of the application.

Results and Discussion
After the parameterization of the temperature values in three categories: hot, cold and room temperature, the project was tested as a whole, resulting in the visualization of the measured temperatures and humidity via the built mobile application and in real time.
The results also included a working ventilation system defined by the developed codes, and behaving according to the measured temperatures. The visualization of data was presented on the app's interface, shown in Figure 5. The limitation of the developed project imposes the proximity between mobile device and the bluetooth module in the developed circuit, so that the data can be transmitted when measured by the sensor. The assembled circuit is shown on Figure 6, with the hardware mentioned on Table 4, and the schematics for it are represented on Figure 7 with the project's pin out.  In this work, physical parts were acquired, consulted and the values of each of the devices and equipment established. On Table 4  Besides the real time visualization benefit of the project, this application is advantageous in the matter of cost to assemble it. In production processes, in laboratories, industries, greenhouses and other areas with the need for temperature control, equipment such as thermocouple, digital or analog, infrared and contact thermometers are used. Table 5 shows the necessary hardware to control temperature in a professional environment, which requires quality equipment. When comparing the values on Table 5 with the ones  on Table 4, it can be concluded that the use of the developed innovative temperature control system is advantageous.
Likewise, stands out the advantage and ease provided by the mobile application that is monitored via digital values. It is not needed to depend on an analogical system, which in cases of precision, is subject to parallax errors. The control adjustments given by the app present more precision in temperature measurement and control.

Conclusion
This work developed a low cost system composed of a mobile application, electronic devices and development boards used for temperature control. As it is low cost, its application becomes viable in many commercial areas, logistic chains, and industrial processes, transportations of products and in laboratories.
Even though its combinatory innovative functionality, the project can still be improved so that it has greater usability, can cover broader areas and has more developed functions. The emphasized innovation is described in literature as stages that start to develop separate pieces quickly in order to create new products through already existing infrastructure. About the developed system, an application with Wi-Fi or Ethernet connection can be built, this way, the necessary proximity between devices presented by bluetooth connection, will no longer be necessary. Therefore, the project would benefit with a system based on an IoT (Internet of Things) structure to control electronic devices through a smart system.
Furthermore, the implementation of new commands to the app, such as increasing and decreasing temperature with the assistance of new buttons, via interface of IoT structure and ventilating tools, would enrich the current project. This way, it would become a different system, where temperature could be remotely controlled through an easy access interface, monitored and used in real time.
From the literature, in Gunarathne e Kalingamudali (2019), an app was developed to communicate with a smart system to reduce energy consumption. There is a need to review how electric energy is used in order to avoid its waste. The ABESCO (Brazilian Association of Energy Conservation Service Companies) points out that Brazil has over 1.7 billion Dollars in annual losses with the improper use of electric energy annually generated (BRESCIANI, 2019). The rational use of electric energy is one of the challenges to power electric systems with the purpose of lowering energy consumption and consequently lowering economic costs.
In this sense, the control system developed reduces energy waste, given that it avoids triggering the cooling system in a periodic way, and it cooperates with the improper losses of electric energy. The ventilating process will only be triggered when a certain temperature level is reached.
As future projects, suggests that research to measure energy consumption using the current application be developed, so that the measurements of reduced energy use is shown. Finally, in a future research it is proposed that other applications for irrigation control, housing associations access and residential automation be developed. Still, it is possible to evaluate through users of different areas in this research, if the mobile application answers the requirements: usability, functionality and efficiency.