Next Article in Journal
Synthetic Aperture Radar Imaging for Burn Wounds Diagnostics
Previous Article in Journal
Establishment of Landslide Groundwater Level Prediction Model Based on GA-SVM and Influencing Factor Analysis
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

Monitoring of Temperature in Retail Refrigerated Cabinets Applying IoT Over Open-Source Hardware and Software

José Ramírez-Faz
Luis Manuel Fernández-Ahumada
Elvira Fernández-Ahumada
3 and
Rafael López-Luque
Department of Electrical Engineering, University of Córdoba, Campus de Rabanales, 14071 Córdoba, Spain
Department of Computing and Numeric Analysis, University of Córdoba, Campus de Rabanales, 14071 Córdoba, Spain
Department of Mathematics, University of Córdoba, c/San Alberto Magno s/n, 14071 Córdoba, Spain
Department of Applied Physics, University of Córdoba, Campus de Rabanales, 14071 Córdoba, Spain
Author to whom correspondence should be addressed.
Sensors 2020, 20(3), 846;
Submission received: 27 November 2019 / Revised: 22 January 2020 / Accepted: 3 February 2020 / Published: 5 February 2020
(This article belongs to the Section Internet of Things)


The control of refrigeration in the food chain is fundamental at all stages, with special emphasis on the retail stage. The implementation of information and communication technologies (IoT, open-source hardware and software, cloud computing, etc.) is representing a revolution in the operational paradigm of food control. This paper presents a low-cost IoT solution, based on free hardware and software, for monitoring the temperature in refrigerated retail cabinets. Specifically, the use of the ESP-8266-Wi-Fi microcontroller with DS18B20 temperature sensors is proposed. The ThingSpeak IoT platform is used to store and process data in the cloud. The solution presented is robust, affordable, and flexible, allowing to extend the scope of supervising other relevant parameters in the operating process (light control, energy efficiency, consumer presence, etc.).

1. Introduction

The agrifood chain is facing significant new challenges nowadays. Among others, monitoring and controlling temperature along supply chains emerges as a key aspect to deal with food waste [1,2,3], as well as increasing both food safety and the quality offered to consumers [4,5,6].
Whereas, the early stages of processing and distribution compliance with the temperatures established for food safety was reached [6], however, in the last three stages (considering here transport, retail, and households), temperature control and maintenance have become particularly complex [4,7,8]. In the retail sector in particular, the scarcity of data available on the fulfilment of cold chain control is highlighted [9,10]. In addition, there are many studies confirming that the temperature of display cabinets in refrigeration units is not always the appropriate one, according to safety standards [11,12,13,14].
In Europe, there is a regulation by the European Council and Parliament assigning food companies the responsibility for complying with temperature control requirements and microbiological criteria applicable to food products, as well as cold chain maintenance [15]. Concerning this last aspect, the regulation establishes the importance of controlling temperatures and proper operation of refrigeration equipment, considering that daily temperature reading is a valid method to control the cold chain in retail establishments. However, there are studies proving that this method cannot guarantee compliance with the perishable food safety specifications, especially in southern Spain [9].
Among the technologies offering temperature control solutions currently available throughout the cold chain, wireless sensor surveillance technologies, especially radio frequency (RF) and wireless sensor networks (WSN), have been regarded as leaders in this field [16,17], with many works on its implementation to achieve global food temperature traceability at different points in the chain, becoming part of broader food safety systems [18,19,20,21,22,23]. Nevertheless, far fewer research studies in the retail sector refer to cabinet and refrigeration equipment temperature control. Most of the scientific literature focusing on the retail sector emphasizes the estimation of the shelf life of food located in refrigeration equipment or whether they keep the required temperature levels [14], yet avoiding a deeper study of the systems used for temperature measurement and monitoring.
In order to provide solutions to solve this challenge, Internet of things (IoT) systems are becoming more relevant, where a wide range of sensors are connected to each other along the cold chain, sending useful information for decision-making and preventing potentially undesirable events [16]. As a result, the IoT is expected to help retail chains to control the quality of food products, to plan the handling of end-of-life waste, to manage the temperature of freezers, refrigerators and warehouses, and to contribute to the reduction of energy consumption [24].
On a commercial level, there are large companies specialised in refrigeration equipment [25,26], which offer systems for monitoring temperature, but which have the disadvantage of being expensive and do not offer the possibility of easily accessing the data generated or being integrated into systems that monitor other types of parameters. Other options, based on data recording devices located in each refrigeration unit [27,28], offer a cheaper alternative, but without constituting an affordable solution for small and medium-sized companies, for which this term is critical [29].
This is the line in which the proposal presented in this work is situated in order to respond to the challenge of monitoring the temperature of refrigeration equipment in the retail sector, by using new trends in technological development, such as free and open-source hardware (FOSH). FOSH is a hardware whose design is made publicly available so that anyone can study, modify, distribute, make, and sell the design or hardware based on that design [30].
In view of the above, the aim of this research is to develop a low-cost IoT system, based on free hardware and software, for monitoring the temperature in refrigerated retail cabinets. This system provides solutions in domains such as price management in perishable products, the frequency of temperature measurement in retail establishments, and economic problems caused by food waste [9,16,31]. Another aim is to create a system with enough flexibility to extend the scope of supervising other relevant parameters in the working environment (door opening-closing, consumer presence time in front of the exhibitor, lighting, and energy consumption).
The current work shows a complete functional solution for temperature monitoring in the food cold chain. By proposing it for open access publication and by developing it as open-source software and hardware, it confers an innovative aspect to the set of solutions available in the market. Thus, the full accessibility to all the details about the designed device opens the possibility to communities of scientists and technicians to correct and improve aspects, extend functionalities, replace components, or compare operation modes.
Nowadays, the emergence of freely participating communities in collaborative projects with scientific-technical objectives with free and accessible information is recognized as a revolution of the scientific development paradigm. In this sense, the work presented, developed as the genesis of a collaborative project, is a pioneer in proposing an open solution that is already operational, but which can still be improved by the scientific community. Undoubtedly, these improvements will contribute to the generation of scientific knowledge as well as to the improvement of humankind’s access to food.
The next section discusses the alternatives available in this research field and is followed by the solution design. The paper then focuses on the experimental implementation and solution evaluation. Finally, conclusions and research lines of future work are presented.

2. Related Work and Technical Background

Temperature monitoring within the food distribution sector is supported by different technologies for information transmission, processing and control, measurement, and remote data storage and management.
As far as the information transmission is concerned, the use of wireless systems (WSN) have become widespread in opposition to wired systems that are expensive and not very flexible for scaling [32,33].
To provide support to WSN, communication networks are required. Three network clusters classified by range and transmission speed are identified [34]: (i) short-range networks, (ii) cellular networks, and (iii) long-range networks (Figure 1).
Short-range networks, notably Zigbee or Bluetooth, have no licence to use. Among their features (Table 1), low power consumption and high exchange speed are the most remarkable. Research works used Zigbee devices to monitor cold rooms and estimate energy consumption and product water loss [36] or vegetable transportation under real work conditions [37]. The work using Zigbee devices, analysing battery behaviour as well as data exchange quality for the control of refrigerated products, is also worth mentioning [38].
Still in the field of short-range networks, there are numerous applications based on radio frequency identification (RFID) covering areas ranging from shelf life control [39], through live animal transport control [40], and environmental variable monitoring such as humidity, temperature, and volatile gases. [41]. Applications with near-field communication (NFC) are less frequent than those based on RFID, but their compatibility with smartphones and tablets provide an interesting niche market. To this end, an application based on NFC sensors controlling meat product traceability have been developed [42].
Furthermore, cellular networks enable a high transmission speed in both short range (Wi-Fi) and long range with license (GSM, GPRS, 3G, 4G, and 5G). There are examples of applications of cellular networks that use GPRS communication in sample shipments from refrigerated trucks to generate shelf-life predictions for transported products [21]. In another work, the authors employ Wi-Fi and GPRS-compatible architecture, among other networks, to monitor environmental variables of perishable food containers with a very low rate of data loss in communication [20].
In the field of long-range networks, low power wide area networks (LPWAN) are being developed, being compatible with the IoT concept for low transfer rates and having lower energy consumption versus cellular networks (2G, 3G, 4G, and 5G) [43].
The free hardware philosophy has been used to control and process data in a wide range of technological applications. These technologies have not been used in the food sector yet, but they are gradually becoming more and more popular due to boards equipped with Bluetooth, Wi-Fi, Ethernet, Lora, LORAWAN, SIGFOX, Android compatibility, and a catalogue of sensors designed to interact and measure any variables. In this scope, ATMEL microcontrollers and those compatible with its development environment (IDE) are relevant [44]. Its features (free philosophy) together with low cost and size have favoured a gradual incorporation into the food traceability sector [45], combined with Android devices for meat quality control of beef [46] or for the foam quality of sparkling wines [47].
Table 2 details the most widely distributed boards integrating this open source philosophy and offering an intelligent node between temperature data reception, management, and cloud interaction as they include modules for wireless communication.
Within the scope of measurements, temperature reading in retail systems is a basic element in any refrigeration system architecture. As a result, a study of the different sensors is required. A variety of temperature sensors can be identified [48]: Resistive, electronic, and electromechanical. Table 3 shows the characteristics of those most frequently used in industrial refrigeration.
Concerning cold chain management, every technology presented in Table 3 was applied. Both the variety of temperature ranges studied for different products and the importance of controlling temperature have been emphasized [49]. Research works using silicon sensors to monitor the temperature in warehouses, containers, and vehicles [20] and for drying control by means of infrared sensors [50] are remarkable.
Finally, the technological demand for remote data storage and management (monitoring and performance based on IoT and cloud computing) is addressed in three ways in the bibliography [51,52]. First of all, specific programming models for given problems are available. This method implies a considerable programming effort since it requires the whole application codification without code reuse or adaptation to standard software. Secondly, there are adjusted commercial solutions in terms of measuring and uploading data to the cloud. Within this scope there are systems like Stellapps, an end-to-end dairy technology solutions company, providing IoT, big data, and monitoring services in the daily fresh produce area [53] or Innovecs which offers remote cold chain control services monitoring and controlling significant variables [54]. These solutions are closed to the user which represents a significant drawback. Finally, another approach to these technological challenges is dealing with generic commercial tools (IoT platforms) where the developer is responsible for customising the application to suit the required needs. Figure 2 displays the most representative IoT platforms as well as their market distribution [55]. Dealing with these IoT platforms, it is worth highlighting a research work that developed an IoT-based route planning system [56] was based on the IBM platform [57], and the one that was developed a platform to virtualize food supply chain was based on FIspace [58], a cloud-based platform for business collaboration [59].

3. Design and Implementation of the Proposed Solution

This work deals with the development of a temperature monitoring system based on free hardware and software (see Table 4), applying the IoT concept. The proposed solution was applied in an establishment of a chain of 75 stores (Andalusia, Spain).

3.1. Architecture of the Solution

With regard to local architecture communication, considering the options detailed in Section 2 and due to the average size of the establishments where the proposed solution will be deployed, LPWAN was excluded because it is long-range. From the remaining options, Wi-Fi (cellular network) was chosen because it offers a higher speed than short-range solutions, its performance range is better suited to the size of an average-store and, essentially, most food establishments are equipped with Wi-Fi. Within the framework of a low-cost solution, it was considered appropriate to take advantage of the existing network for the exchange of information. Moreover, its bandwidth copes with the monitoring system requirements and this choice for device Internet access eliminates the need for a hub/gateway. Figure 3 shows how a general solution would be developed on the basis of Wi-Fi.
Devices equipped with Wi-Fi communication for cloud exchange information were considered for the control and processing of temperature readings. The characteristics and cost of the boards analysed are presented in Table 2. In this project, the Electrodragon ESP Relay (Figure 4), based on the ESP-12F module equipped with the ESP8266 microcontroller, was chosen. Its price is the lowest among the boards considered. An essential feature of this board is that it is powered from the AC mains at 230 Vac, since it integrates a 230 Vac/3.3 Vdc power supply. It also has two relays with a switched contact for voltages up to 250 Vac and 10 A. This solution enhances options based on RFID and BLE (Bluetooth Low Energy) communications with battery-powered nodes [17], which dismiss the Wi-Fi solution allowing greater range by making the system developed incompatible with a stand-alone solution. Although there are other options with a greater number of inputs and outputs, this is enough for the development of the proposed solution. Studies in the literature [23] show that the number of inputs supported by the central unit is limited. In the proposed solution, the system is decentralized, achieving a system with control based on ESP8266 enabling multiple inputs at a very low cost.
Considering measurement scope, the DS18B20 was selected from among the sensors analysed (Table 3) due to its accuracy, measurement range, low cost, and communication standard and for its broad use within the food industry literature [60,61]. Table 5 shows the most relevant characteristics of this silicon sensor.
The sensor is provided in TO-92 enclosure or sealed stainless steel sheath (Figure 5). This second option was chosen to allow immersion in water. Each sensor has an identification number engraved on its ROM, composed of 64 bits.
Connections between the electronic board and temperature sensors were established with the communication protocol 1 wire, a master slave type, developed by Dallas Semiconductor. For a maximum distance of 25 m up to 100 slaves (sensors) can be connected to the bus by implementing a 4.7 kΩ pull-up resistance. The bus consists of three wires: Vcc, GND, and DATA. In this way, with a microcontroller it is possible to monitor the temperatures of a large part of the equipment of an establishment. Although, given the cost of the microcontroller, it may be more profitable to increase the number of these as opposed to the extension of the bus wiring to the different measuring points. Figure 6 shows the connection diagram of the sensors.
In cases where a single sensor is connected such as 1-wire bus protocol, it is not necessary to specify the direction of the sensor.
Implementation in the field is simple, placing the temperature probe (DS18B20) next to the one corresponding to the control thermostat in the chilling cabinets. Considering that the probes are wired up to the board and, since the size of the average store is within the working range of the Wi-Fi network, it is not necessary to adopt a methodology for the deployment of sensors that would be mandatory in other types of applications with limited coverage [63]. The control board (ESP8266) takes the electrical supply from the same source as the cabinet. The board ESP8266 has a very low energy consumption (0.3 W average), so it can be connected to the cabinet power supply without affecting the normal operation of the cabinet and the electrical protections. The solution described avoids the use of batteries, which would imply a higher maintenance cost. Figure 7 shows the probe location in the freezer used for the experimental device. In a commercial solution, protection against intentional damage would be necessary.
Once all components are connected, programming can be implemented. There are libraries facilitating the use of this sensor on boards supporting the Arduino IDE for programming. In our proposal DallasTemperature.h and OneWire.h, and the ESP8266Wifi.h libraries were utilised [44].
Finally, the solution requires the choice of a system for remote data storage and management. As highlighted in Section 2, alternatives based on specific programmed models and closed commercial solutions had many drawbacks. In the present case, a solution based on an IoT platform was chosen by customizing our specific application. Concretely, the educational version of the ThingSpeak platform was used [64], which provides up to four channels with eight fields each, thus 32 variables can be updated at intervals of 15 s per channel. It supports up to three million data per year in this type of non-commercial account. The possibility of inserting the information in different ways is contemplated: HTTP, MQTT, and API-REST. In this project we opted for HTTP, using the ThingSpeak.h library for the Arduino IDE. The use of this library simplifies the writing procedure in the ThingSpeak channels (Figure 8).
The platform stores the information transmitted according to the structure described. Additionally, this platform provides some mathematical analysis tools based on MATLAB highlighting statistics and machine learning toolbox, deep learning toolbox, and predictive maintenance toolbox.
Communication between each ESP8266 board and the ThingSpeak platform was made via the WLAN of the establishment which was developed ex professo for this application. WPA2 Personal [65] has been selected as the security mechanism considering data sensitiveness. Figure 9 shows the implemented code in Arduino IDE for alarm generation. Alarm management is performed from each device, sending an e-mail to one or more addresses, identifying the establishment and the refrigerator where the incident occurred.
The operating logic at the level of alarm generation is based on the definition of an admissible temperature range and an offset time. This avoids the generation of false alarms caused by the defrost cycles of the condensing batteries.

3.2. System Scaling

The proposed solution allows for easy scalability at both individual store and store chain level, either in chilling (temperatures about 0 °C) or freezing (temperatures under −18 °C) [66].
When applying the system to a whole store chain, the need arises to carry out the initial configuration of the boards and possible changes in remote mode. For this purpose, a LAMP (Linux + Apache + MySQL + PHP) server has been developed, hosted on a Raspberry Pi computer.
Each device connects daily to the DataBase and updates the values of: Supermarket, number of sensors, sensor ID, device status, maximum temperature per sensor, minimum temperature per sensor, time out of range for alarm generation, addresses to which alarm email is sent, ThingSpeak channel ID, write API key (WAP) of the ThingSpeak channel, read ThingSpeak channel API key (RAK), and ThingSpeak channel field.
The database consists of five components (Figure 10): (i) proto_db spmarket refers to the name and number id of a supermarket; (ii) proto_db users registers the email address of maintenance managers with an identifying number (each email address is associated with a store); (iii) proto_db channels records the ThingSpeak channels to which each board must send temperatures; and (iv) proto_db devices collects data from the boards, its identifying numbers and operating status (error code: 0 if operating correctly). In addition, each device is associated with a channel and a store; (v) proto_db sensors collects the sensor data (identifier, maximum and minimum temperature, model, and operating status) associated with a device.
The standard version of ThingSpeak, which provides up to 250 channels of eight fields, that is up to 2000 variables that can be updated every second, is suitable for the deployment of the project in all the establishments of the chain. The maximum number of data per year is 33,000,000.

4. Experimental Scenario

The solution was implemented in a 372 m2 (public zone) supermarket, located in Cordoba (Spain). It offers different types of products requiring refrigeration, placed in refrigeration equipment whose characteristics are shown in Table 6.
The supermarket has six autonomous freezers, two dairy display cabinets, and two vitrines, one for charcuterie and one for meat. The sensors of the freezers were connected to the same board. There was one sensor for the vitrines connected to another board and for the dairy cabinets there were two sensors connected to an individual board each. Therefore, nine temperature sensors connected to four electronic boards were installed, located as shown in Figure 11.
Figure 12 details the design of the proposed technological solution.

4.1. Generated Data

The temperature data reached the platform at two-minute intervals per sensor. Table 7 shows the data set generated by the global solution (3.4 million data). The first three nodes (chilling cabinets and vitrines) received information from one sensor each. Node 4 received information from six sensors, one for each freezer.
Figure 13 shows an example of the operation of two display cabinets for a specific day as offered by the ThingSpeak platform. It can also be displayed in an app (ThingChart) for smartphones. These charts were developed by programming in Matlab through the ThingSpeak platform.

4.2. System Evaluation

The proposed system in the selected store was launched on 25 January 2018 and is currently functioning. To evaluate the performance of the system, a comprehensive analysis of the solution was conducted from implementation to 15 August 2019. System evaluation focused on three aspects: Functionality in the generation of alarms, performance of the archiquecture system, and cost.
Concerning the functionality scope, during the system operation, seven alarms were generated allowing action to be taken on the equipment before the product was to perish due to a cold chain failure. Figure 14 shows an example of an alarm event in a freezer. In this case, an alarm was detected when temperature limit (−15 °C) was exceeded for a set time (60 min). This value is configurable for each type of cabinet.
For the event shown in Figure 14, the detection of this alarm enabled the removal of the product, preventing losses of 1500 € (Table 6). The system used to send alarms via e-mail is decentralised and each device manages the alarms associated with the monitored equipment. Moreover, the system generates a complete report (temperature time series, in csv files and graphics as Figure 13) substituting information obtained from classical thermographs used for health services inspection [9]. Systems such as the one proposed, which reduce product waste, solve one of the main economic problems of the retail sector at European level [16].
With regards to system performance, the evaluation focused on the three levels of the solution architecture. In the area of measurement, there was only one specific failure registered in the reading from one sensor of freezer one. A reading failure indicates a measurement outside the range, i.e., above 40 °C or below −50 °C. When that happens, the data sent is 100, so it is easy to identify it among the other measurements. With regard to the control and processing area, no failure occurred in the electronic boards used and there was no need of replacement either. However, in the communications section, incidents recorded are worthy to be discussed. As shown in Table 7, although some data from all four nodes were lost, the percentages of data lost were negligible in three cases. Figure 15 analyzes lost data with more details. The figure shows the amount of data that was lost consecutively. In all nodes, it is observed that the higher frequency is associated with the loss of one single data, indicating, in terms of temperature control, that information was received every four minutes instead of every two minutes. Therefore, most of the lost data did not result in an important interruption of temperature control.
The failures can be attributed to three causes: (i) unavailability of the IoT (ThingSpeak) platform, (ii) internet connection error, and (iii) loss of connection of each node to the local Wi-Fi network. Since at the exact moment of data loss of a particular node, no simultaneous loss of the other nodes was recorded, the failures cannot be attributed to causes i and ii (these causes could also be a power failure). Therefore, all data losses were due to problems of connection of each node with the Wi-Fi. In this way, it could be expected that nodes 2 and 3, farther away from the router (see Figure 11), present a greater loss of sent data. However, results show that only node 3 had the greatest loss of data. This may be because node 3 is inside the cabinet, while node 2 is located above the cabinet. Being inside the cabinet may attenuate coverage, which may explain the greater amount of missing data associated with node 3.
Being able to continuously monitor the temperature addresses current challenges in improving quality control and transparency [6]. These changes are particularly relevant in areas with extreme climates, such as southern Spain, where previous studies had shown the importance of increasing temperature sampling frequency in retail establishments [9] and the need to introduce modernizations and technological improvements [10]. Furthermore, in this specific sector, the importance of having a time-temperature history has been highlighted as a critical aspect in perishable product price management [31].
Finally, concerning evaluation in terms of cost, Table 8 shows the material costs used in the system for the selected store, as well as the manpower required.
As shown in Table 8 and Table 9, the total cost of the system (for a medium-sized store) can be considered an affordable solution. In developing countries, where most temperature abuses are reported, the cost of the proposed solution is a reasonable alternative, without losing robustness and efficiency [49]. This approach is also applicable to meet the requirements in terms of new technological developments offered to SMEs (Small and medium-sized enterprises) [29]. The reduced cost of each node justifies why the number of nodes was not optimized, which could even be one for the whole store (technologically feasible as shown in Section 3.1). The cost of wiring each sensor to the board is higher than providing a greater number of nodes next to each display case. In this sense, Tsang et al. [56] propose a system based on a Wi-Fi local network and a gateway (3G/4G/LTE) where nodes are powered by batteries. In the case presented, this option has been rejected due to the high energy consumption associated with Wi-Fi communication and performed by means of wiring, confirming the aforementioned. When comparing the proposed solution with the commercial ones, it highlights, besides the cost, the possibility of working with electrical power without batteries and the open-source philosophy that, as it has been underlined throughout the work, allows the scientific community to improve the current research proposal.
After two years of operation of the proposed solution, having evaluated the reliability of the sensors and microcontrollers, as well as the availability of the Internet connection and the IoT platform from the 3.4 million data generated, it has been demonstrated that this solution is applicable at industrial level, representing a novelty and a scientific step forward with respect to proposals based on prototypes that have not reflected their performance over a long period of time. The solution helps to highlight the potential of IoT-based technological approaches in terms of “independent networks, that have the capabilities of self-configuration and self-optimizing among many other characteristics”, as already pointed out by other authors [16], providing an example of IoT application in the retail sector, where the adoption of this type of technology is still at an incipient stage, as other works remarked [24].
Additionally, distinctive aspects of the proposed solution, such as the use of open source hardware and software and its scalability and compatibility for integration into broader monitoring systems, are perfectly consistent with the guidelines of inter-organizational cooperation, transparency, and information-sharing argued by several authors as essential factors to improving efficiency, minimizing food waste, increasing product quality, improving sustainability factors, and the overall strategic position of food supply chains [67,68].

5. Conclusions

This work proposes the integration of several open-source hardware and software systems applied to the control of retail cold chain maintenance. Cost-effectiveness and reliability results confirm a very competitive IoT solution within the market. This competitiveness increases even more when considering the system as an open programming system, so that the architecture of the solution can be used to monitor and produce alarms in other relevant variables (door opening-closing, consumer presence time in front of the exhibitor, lighting, and energy consumption).
The operation and applicability of the solution has been evidenced by the evaluation performed on 3.4 million data obtained over twenty months. The proposed solution improves cold chain management control and monitoring in the retail sector, leading to better-quality standards traceability. As a result, this system simplifies the control tasks of inspectors or auditors (reports are automatically generated instead of using thermographs and dataloggers). Furthermore, this affordable solution enables an improvement in the corporate image for food retail companies which shows transparency in the way they control temperature and assure food safety, one of the major problems facing humanity.
The solution was installed in one establishment; however, expansion to the full network of establishments (75) is already in progress so the outstanding benefits will be extended to more stores.
In future works, the deployment of this solution over a prolonged period of time will provide a large volume of data leading to new approaches to data management (big data, trend analysis, adaptive models, neural networks, and deep learning) aimed at predictive maintenance, equipment comparison, and price management. A specific interface might also be designed to overcome the limitation that the generic one of Thingspeak could present for an efficient management of multiple establishments.

Author Contributions

Conceptualization, J.R.-F. and R.L.-L.; methodology, L.M.F.-A. and E.F.-A.; software, J.R.-F. and R.L.-L.; validation, J.R.-F., L.M.F.-A. and E.F.-A.; formal analysis, E.F.-A. and R.L.-L.; investigation, J.R.-F. and L.M.F.-A.; resources, E.F.-A.; data curation, J.R.-F. and E.F.-A. writing—original draft preparation, J.R.-F., L.M.F.-A. and E.F.-A.; writing—review and editing, J.R.-F., L.M.F.-A., E.F.-A. and R.L.-L.; supervision, R.L.-L. All authors have read and agreed to the published version of the manuscript.


This research received no external funding.


The authors would like to thank Simon Craig for his contribution to English edition.

Conflicts of Interest

The authors declare no conflict of interest.


  1. Diaz-Ruiz, R.; Costa-Font, M.; López-i-Gelats, F.; Gil, J.M. Food waste prevention along the food supply chain: A multi-actor approach to identify effective solutions. Resour. Conserv. Recycl. 2019, 149, 249–260. [Google Scholar] [CrossRef]
  2. Food and Agriculture Organization of the United Nations (FAO). Food Wastage Footprint; Food and Agriculture Organization of the United Nations (FAO): Rome, Italy, 2013. [Google Scholar]
  3. Gustavsson, J.; Cederberg, C.; Sonesson, U. Global Food Losses and Food Waste; Food and Agriculture Organization of the United Nations (FAO): Rome, Italy, 2011. [Google Scholar]
  4. Derens-Bertheau, E.; Osswald, V.; Laguerre, O.; Alvarez, G. Cold chain of chilled food in France. Int. J. Refrig. 2015, 52, 161–167. [Google Scholar] [CrossRef]
  5. Kim, W.R.; Aung, M.M.; Chang, Y.S.; Makatsoris, C. Freshness Gauge based cold storage management: A method for adjusting temperature and humidity levels for food quality. Food Control 2015, 47, 510–519. [Google Scholar] [CrossRef]
  6. Göransson, M.; Nilsson, F. Jevinger Temperature performance and food shelf-life accuracy in cold food supply chains—Insights from multiple field studies. Food Control 2018, 86, 332–341. [Google Scholar] [CrossRef]
  7. Derens, E.; Palagos, B.; Guilpart, J. Microbial Contamination of Food Refrigeration. In Proceedings of the IUFOST, 13th World Congress of Food Science & Technology: Food is Life, Nantes, France, 17–21 September 2006; pp. 51–64. [Google Scholar]
  8. Kou, L.; Luo, Y.; Ingram, D.T.; Yan, S.; Jurick, W.M. Open-refrigerated retail display case temperature profile and its impact on product quality and microbiota of stored baby spinach. Food Control 2015, 47, 686–692. [Google Scholar] [CrossRef]
  9. Baldera Zubeldia, B.; Nieto Jiménez, M.; Valenzuela Claros, M.T.; Mariscal Andrés, J.L.; Martin-Olmedo, P. Effectiveness of the cold chain control procedure in the retail sector in Southern Spain. Food Control 2016, 59, 614–618. [Google Scholar] [CrossRef]
  10. Zhao, H.; Liu, S.; Tian, C.; Yan, G.; Wang, D. An overview of current status of cold chain in China. Int. J. Refrig. 2018, 88, 483–495. [Google Scholar] [CrossRef]
  11. González, D.; Vitas, A.I.; Díez-Leturia, M.; García-Jalón, I. Listeria monocytogenes and ready-to-eat seafood in Spain: Study of prevalence and temperatures at retail. Food Microbiol. 2013, 36, 374–378. [Google Scholar] [CrossRef]
  12. Morelli, E.; Noel, V.; Rosset, P.; Poumeyrol, G. Performance and conditions of use of refrigerated display cabinets among producer/vendors of foodstuffs. Food Control 2012, 26, 363–368. [Google Scholar] [CrossRef]
  13. Likar, K.; Jevšnik, M. Cold chain maintaining in food trade. Food Control 2006, 17, 108–113. [Google Scholar] [CrossRef]
  14. Lundén, J.; Vanhanen, V.; Kotilainen, K.; Hemminki, K. Retail food stores’ internet-based own-check databank records and health officers’ on-site inspection results for cleanliness and food holding temperatures reveal inconsistencies. Food Control 2014, 35, 79–84. [Google Scholar] [CrossRef]
  15. Corrigendum to Regulation (EC). No 852/2004 of the European Parliament and of the Council of 29 April 2004 on the hygiene of foodstuffs. Off. J. Eur. Union 2004, L 226, 3–21. [Google Scholar]
  16. Badia-Melis, R.; Mc Carthy, U.; Ruiz-Garcia, L.; Garcia-Hierro, J.; Robla Villalba, J.I. New trends in cold chain monitoring applications—A review. Food Control 2018, 86, 170–182. [Google Scholar] [CrossRef]
  17. Giusto, E.; Gandino, F.; Greco, M.L.; Grosso, M.; Montrucchio, B.; Rinaudo, S. An investigation on pervasive technologies for IoT-based thermal monitoring. Sensors 2019, 19, 663. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  18. Amador, C.; Emond, J.P.; do Nascimento Nunes, M.C. Application of RFID technologies in the temperature mapping of the pineapple supply chain. Sens. Instrum. Food Qual. Saf. 2009, 3, 26–33. [Google Scholar] [CrossRef]
  19. Badia-Melis, R.; Garcia-Hierro, J.; Ruiz-Garcia, L.; Jiménez-Ariza, T.; Robla Villalba, J.I.; Barreiro, P. Assessing the dynamic behavior of WSN motes and RFID semi-passive tags for temperature monitoring. Comput. Electron. Agric. 2014, 103, 11–16. [Google Scholar] [CrossRef] [Green Version]
  20. Wang, J.; Shen, M.; Zheng, L.; Tan, X.; Li, L.; He, J.; Min, H.; Wang, H. Wireless sensor network for real-time perishable food supply chain management. Comput. Electron. Agric. 2014, 110, 196–207. [Google Scholar] [CrossRef]
  21. Xiao, X.; He, Q.; Fu, Z.; Xu, M.; Zhang, X. Applying CS and WSN methods for improving efficiency of frozen and chilled aquatic products monitoring system in cold chain logistics. Food Control 2016, 60, 656–666. [Google Scholar] [CrossRef] [Green Version]
  22. Zhang, M.; Li, P. RFID Application Strategy in Agri-Food Supply Chain Based on Safety and Benefit Analysis. Phys. Procedia 2012, 25, 636–642. [Google Scholar] [CrossRef] [Green Version]
  23. De Venuto, D.; Mezzina, G. Spatio-temporal optimization of perishable goods’ shelf life by a pro-active WSN-based architecture. Sensors 2018, 18, 2126. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  24. Kamble, S.S.; Gunasekaran, A.; Parekh, H.; Joshi, S. Modeling the internet of things adoption barriers in food retail supply chains. J. Retail. Consum. Serv. 2019, 48, 154–168. [Google Scholar] [CrossRef]
  25. Danfoss. Available online: (accessed on 15 July 2019).
  26. Eliwell. Available online: (accessed on 15 July 2019).
  27. AKO. Available online: (accessed on 15 July 2019).
  28. Testo. Available online: (accessed on 15 July 2019).
  29. Adesta, E.Y.T.; Hilmy, I.; Agusman, D. Toward Real Time IoT Based Paste Monitoring System for Small to Medium Enterprise (SME). J. Phys. Conf. Ser. 2019, 1167, 1–6. [Google Scholar] [CrossRef]
  30. Pearce, J.M. Open-Source Lab; Elsevier: Amsterdam, The Netherlands, 2014; ISBN 9780124104624. [Google Scholar]
  31. Mercier, S.; Villeneuve, S.; Mondor, M.; Uysal, I. Time-Temperature Management Along the Food Cold Chain: A Review of Recent Developments. Compr. Rev. Food Sci. Food Saf. 2017, 16, 647–667. [Google Scholar] [CrossRef]
  32. Simpson, R.; Teixeira, A.; Almonacid, S. Advances with intelligent on-line retort control and automation in thermal processing of canned foods. Food Control 2007, 18, 821–833. [Google Scholar] [CrossRef]
  33. McGrath, M.J.; O’Connor, J.F.; Cummins, S. Implementing a process control strategy for the food processing industry. J. Food Eng. 1998, 35, 313–321. [Google Scholar] [CrossRef]
  34. Centenaro, M.; Vangelista, L.; Zanella, A.; Zorzi, M. Long-range communications in unlicensed bands: The rising stars in the IoT and smart city scenarios. IEEE Wirel. Commun. 2016, 23, 60–67. [Google Scholar] [CrossRef] [Green Version]
  35. Mekki, K.; Bajic, E.; Chaxel, F.; Meyer, F. A comparative study of LPWAN technologies for large-scale IoT deployment. ICT Express 2018, 5, 1–7. [Google Scholar] [CrossRef]
  36. Badia-Melis, R.; Ruiz-Garcia, L.; Garcia-Hierro, J.; Robla Villalba, J.I. Refrigerated fruit storage monitoring combining two different wireless sensing technologies: RFID and WSN. Sensors 2015, 15, 4781–4795. [Google Scholar] [CrossRef] [Green Version]
  37. Ruiz-Garcia, L.; Barreiro, P.; Robla, J.I.; Lunadei, L. Testing zigBee motes for monitoring refrigerated vegetable transportation under real conditions. Sensors 2010, 5, 4968–4982. [Google Scholar] [CrossRef] [Green Version]
  38. Ruiz-Garcia, L.; Barreiro, P.; Robla, J.I. Performance of ZigBee-Based wireless sensor nodes for real-time monitoring of fruit logistics. J. Food Eng. 2008, 87, 405–415. [Google Scholar] [CrossRef] [Green Version]
  39. do Nascimento Nunes, M.C.; Nicometo, M.; Emond, J.P.; Melis, R.B.; Uysal, I. Improvement in fresh fruit and vegetable logistics quality: Berry logistics field studies. Philos. Trans. R. Soc. A Math. Phys. Eng. Sci. 2014, 372, 20130307. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  40. Zhang, Y.; Wang, W.; Yan, L.; Glamuzina, B.; Zhang, X. Development and evaluation of an intelligent traceability system for waterless live fish transportation. Food Control 2019, 95, 283–297. [Google Scholar] [CrossRef]
  41. Chen, Y.-Y.; Wang, Y.-J.; Jan, J.-K. A novel deployment of smart cold chain system using 2G-RFID-Sys. J. Food Eng. 2014, 141, 113–121. [Google Scholar] [CrossRef]
  42. Pigini, D.; Conti, M. NFC-Based Traceability in the Food Chain. Sustainability 2017, 9, 1910. [Google Scholar] [CrossRef] [Green Version]
  43. Fernández-Ahumada, L.M.; Ramírez-Faz, J.; Torres-Romero, M.; López-Luque, R. Proposal for the Design of Monitoring and Operating Irrigation Networks Based on IoT, Cloud Computing and Free Hardware Technologies. Sensors 2019, 19, 2318. [Google Scholar] [CrossRef] [Green Version]
  44. Arduino Arduino. Available online: (accessed on 15 July 2019).
  45. Barge, P.; Biglia, A.; Comba, L.; Gay, P.; Ricauda Aimonino, D.; Tortia, C. The influence of food composition and tag orientation on UHF RF IDentification. J. Food Eng. 2019, 246, 242–252. [Google Scholar] [CrossRef]
  46. Hosseinpour, S.; Ilkhchi, A.H.; Aghbashlo, M. An intelligent machine vision-based smartphone app for beef quality evaluation. J. Food Eng. 2019, 248, 9–22. [Google Scholar] [CrossRef]
  47. Condé, B.C.; Fuentes, S.; Caron, M.; Xiao, D.; Collmann, R.; Howell, K.S. Development of a robotic and computer vision method to assess foam quality in sparkling wines. Food Control 2017, 71, 383–392. [Google Scholar] [CrossRef]
  48. Fontes, J. Temperature Sensors. In Sensor Technology Handbook; Elsevier: Amsterdam, The Netherlands, 2005; pp. 531–561. [Google Scholar]
  49. Ndraha, N.; Hsiao, H.-I.; Vlajic, J.; Yang, M.-F.; Lin, H.-T.V. Time-temperature abuse in the food cold chain: Review of issues, challenges, and recommendations. Food Control 2018, 89, 12–21. [Google Scholar] [CrossRef] [Green Version]
  50. Rezaei, S.; Behroozi-Khazaei, N.; Darvishi, H. Microwave power adjusting during potato slice drying process using machine vision. Comput. Electron. Agric. 2019, 160, 40–50. [Google Scholar] [CrossRef]
  51. Atzori, L.; Iera, A.; Morabito, G. The Internet of Things: A survey. Comput. Netw. 2010, 54, 2787–2805. [Google Scholar] [CrossRef]
  52. Tzounis, A.; Katsoulas, N.; Bartzanas, T.; Kittas, C. Internet of Things in agriculture, recent advances and future challenges. Biosyst. Eng. 2017, 167, 31–48. [Google Scholar] [CrossRef]
  53. Stellapps. Available online: (accessed on 26 June 2019).
  54. Innovecs. Available online: (accessed on 26 June 2019).
  55. The 2016 Maker Survey Official Report. Available online: (accessed on 26 June 2019).
  56. Tsang, Y.P.; Choy, K.L.; Wu, C.H.; Ho, G.T.S.; Lam, H.Y.; Tang, V. An intelligent model for assuring food quality in managing a multi-temperature food distribution centre. Food Control 2018, 90, 81–97. [Google Scholar] [CrossRef]
  57. IBM. Watson IoT. Available online: (accessed on 19 July 2019).
  58. Verdouw, C.N.; Wolfert, J.; Beulens, A.J.M.; Rialland, A. Virtualization of food supply chains with the internet of things. J. Food Eng. 2016, 176, 128–136. [Google Scholar] [CrossRef] [Green Version]
  59. FIspace. Available online: (accessed on 19 July 2019).
  60. Jara, P.B.T.; Rivera, J.J.A.; Merino, C.E.B.; Silva, E.V.; Farfán, G.A. Thermal behavior of a refrigerated vehicle: Process simulation. Int. J. Refrig. 2019, 100, 124–130. [Google Scholar] [CrossRef]
  61. Shi, B.; Sreeram, V.; Zhao, D.; Duan, S.; Jiang, J. A wireless sensor network-based monitoring system for freshwater fishpond aquaculture. Biosyst. Eng. 2018, 172, 57–66. [Google Scholar] [CrossRef]
  62. Maxim Integrated DS18B20 Datasheet. Available online: (accessed on 21 October 2019).
  63. Wu, C.H.; Ng, C.K.; Wang, L.; Ho, G.T.S.; Ip, W.H.; Zhang, J. Design of a Wireless Sensor Network Monitoring System for Biological and Pharmaceutical Products. Int. J. Distrib. Sens. Netw. 2015, 11, 760242. [Google Scholar] [CrossRef]
  64. ThingSpeak. Available online: (accessed on 26 June 2019).
  65. Lepaja, S.; Maraj, A.; Efendiu, I.; Berzati, S. The impact of the security mechanisms in the throughput of the WLAN networks. In Proceedings of the 2018 7th Mediterranean Conference on Embedded Computing (MECO), Budva, Montenegro, 10–14 June 2018. [Google Scholar]
  66. Fellows, P.J. Food Processing Technology: Principles and Practice, 3rd ed.; Woodhead Publishing Limited: Sawston, UK, 2009; ISBN 9781845692162. [Google Scholar]
  67. Hsiao, H.I.; Huang, K.L. Time-temperature transparency in the cold chain. Food Control 2016, 64, 181–188. [Google Scholar] [CrossRef]
  68. Aung, M.M.; Chang, Y.S. Temperature management for the quality assurance of a perishable food supply chain. Food Control 2014, 40, 198–207. [Google Scholar] [CrossRef]
Figure 1. Data rate versus range in wireless networks. Source: [35].
Figure 1. Data rate versus range in wireless networks. Source: [35].
Sensors 20 00846 g001
Figure 2. Top Internet of things (IoT) platforms. Source: [55].
Figure 2. Top Internet of things (IoT) platforms. Source: [55].
Sensors 20 00846 g002
Figure 3. General solution based on Wi-Fi communication.
Figure 3. General solution based on Wi-Fi communication.
Sensors 20 00846 g003
Figure 4. Electronic board Electrodragon ESP Relay.
Figure 4. Electronic board Electrodragon ESP Relay.
Sensors 20 00846 g004
Figure 5. Sensor DS18B20 with TO-92 enclosure (left) or sealed stainless steel sheath (right).
Figure 5. Sensor DS18B20 with TO-92 enclosure (left) or sealed stainless steel sheath (right).
Sensors 20 00846 g005
Figure 6. 1-wire bus scheme.
Figure 6. 1-wire bus scheme.
Sensors 20 00846 g006
Figure 7. DS18B20 probe placed in a freezer for the experimental setup.
Figure 7. DS18B20 probe placed in a freezer for the experimental setup.
Sensors 20 00846 g007
Figure 8. Reading and delivery of a temperature sensor.
Figure 8. Reading and delivery of a temperature sensor.
Sensors 20 00846 g008
Figure 9. Alarm generation code.
Figure 9. Alarm generation code.
Sensors 20 00846 g009
Figure 10. Database structure.
Figure 10. Database structure.
Sensors 20 00846 g010
Figure 11. Layout of the installed elements in the store.
Figure 11. Layout of the installed elements in the store.
Sensors 20 00846 g011
Figure 12. Definitive architecture for the adopted solution.
Figure 12. Definitive architecture for the adopted solution.
Sensors 20 00846 g012
Figure 13. ThingSpeak visualization of temperature records associated to different display cabinets.
Figure 13. ThingSpeak visualization of temperature records associated to different display cabinets.
Sensors 20 00846 g013
Figure 14. Example of alarm event.
Figure 14. Example of alarm event.
Sensors 20 00846 g014
Figure 15. Data lost consecutively in chilling nodes (a) and the node of freezers (b).
Figure 15. Data lost consecutively in chilling nodes (a) and the node of freezers (b).
Sensors 20 00846 g015
Table 1. Short range wireless networks communication technology characteristics.
Table 1. Short range wireless networks communication technology characteristics.
StandardIEEE 802.11 a,b,g,n802.15.1802.15.4Several standardsISO/IEC 13157
Frequency2.4 GHz2.4 GHz868/915 MHz, 2.4 GHz13.56MHz13.56MHz
Data rate2–54 Mbps1–24 Mbps20-250 kbps423 kbps424 kbps
Transmission Range20–100 m8–10 m10–20 m1 m0.1 m
TopologyStarStarTree, star, meshPoint to pointPoint to point
Energy consumptionHighMediumLowLowLow
Table 2. Features of the electronic boards considered.
Table 2. Features of the electronic boards considered.
NodeMCUHeltec Wi-Fi LoRa 32 V2Arduino MKR1000Pycom WiPi 3.0ELECTRODRAGON ESP RELAY
ProgrammingArduino IDE CompatibilityArduino IDE CompatibilityArduino IDE CompatibilityMicroPythonArduino IDE Compatibility
ROM32 kB448 kB256 kB448 kB32 kB
RAM32 kB520 kB32 kB520 kB32 kB
Logic level 3.3 V3.3 V3.3 V3.3 V3.3 V
Analog input10185181
Digital I/O20282235
Other FeaturesWi-Fi, BLEWi-Fi, BLE, OLED displayWi-FiWi-Fi, BLE, 230 Vac POWERING, Wi-Fi
Price (2019)30 €12 €45 €35 €6 €
Table 3. Resistive and electronic temperature sensor characteristics.
Table 3. Resistive and electronic temperature sensor characteristics.
ParameterThermistorRTDThermocoupleSilicon SensorsInfrared (IR) Pyrometers
Range (°C)−100 to 300−200 to 600−200 to 2300−271 to 200−18 to 538
SizeSmallLargeSmall SmallHigh
Table 4. Open-source equipment for the proposed solution.
Table 4. Open-source equipment for the proposed solution.
Electrodragon ESP RelayHardwareControlling and processing temperatures
IDE ArduinoSoftwareProgramming temperatures alarms, communication, information placement
Raspberry PiHardwareServer hosting
LAMP (Linux + Apache + MySQL + PHP) serverSoftwareUpdating values for DataBase
Table 5. DS18B20 sensor characteristics [62].
Table 5. DS18B20 sensor characteristics [62].
Supply Voltage3–5.5V
Measure Range−55 to +125°C
Thermometer error −10 °C to 85 °C± 0.5°C
Thermometer error −30 °C to −10 °C± 1°C
Stand by current750nA
Active current1mA
Communication protocol1 wire
Cost (stainless steel shell) (2019)2
Table 6. Refrigerated cabinets in the pilot shop.
Table 6. Refrigerated cabinets in the pilot shop.
.Dairy ProductsCharcuterie/MeatFrozen Products
TypeDisplay cabinetVitrineCabin
ModelSAMFL-3SV-6/CIEC26 1850
Set Point (°C)22−18
Client accessYesNoYes
Net volume (dm3) 600
Dimensions L×W×H (mm)5800 × 1130 × 2000 3900 × 1130 × 20003800 × 1100 × 1200
Stored product ($)2200 148028001500
Table 7. Records of generated data.
Table 7. Records of generated data.
Node 1Node 2Node 3Node 4
Total amount of generated data339,876339,867339,7392,365,602
Sent data338,470338,181327,9732,359,650
Lost data1406168611,7665952
% of lost data0.
Table 8. Implemented solution cost.
Table 8. Implemented solution cost.
ConceptUnit Cost ($)UnitsTotal ($)
ELECTRODRAGON ESP82666.854.0027.40
Temperature Sensor DS18B20 (Waterproof)2.1010.0021.00
Wi-Fi Router (Existing)
Extension wires for sensors (meters)0.8012.009.60
Labour (hours)307.5225
Table 9. Features of commercial solutions versus research proposal.
Table 9. Features of commercial solutions versus research proposal.
Commercial SystemsCommunicationsPower SupplyMeasure Unit Cost ($)Gateway Cost ($)Platform Cost ($/Year)Philosophy
JRI MySyriusRF/EthernetBattery155.5384.51000 up to 500 unitsProprietary
JRI MySyriusLoRa/EthernetBattery182.2684.51000 up to 500 unitsProprietary
SEEMOTOBluetooth/EthernetBattery167–222no need133.3 per unitProprietary
TESTO Saveris 2Wi-Fi/EthernetBattery140 no need17.8 per unitProprietary
THINGPARKLoraWanBattery143.3193.338.9 per unitProprietary
COMPLIAN-CEMATE PlusLoRa/EthernetBattery 1555 per five unitsProprietary
NTT Docomo USA Battery 1189 per two unitsProprietary
AKOdata IoTNB-IoTBattery617.8no needIncluded for two yearsProprietary
Proposed solutionWi-Fi/Ethernet65–265 Vac10no need666.7 up to 310 unitsOpen-source

Share and Cite

MDPI and ACS Style

Ramírez-Faz, J.; Fernández-Ahumada, L.M.; Fernández-Ahumada, E.; López-Luque, R. Monitoring of Temperature in Retail Refrigerated Cabinets Applying IoT Over Open-Source Hardware and Software. Sensors 2020, 20, 846.

AMA Style

Ramírez-Faz J, Fernández-Ahumada LM, Fernández-Ahumada E, López-Luque R. Monitoring of Temperature in Retail Refrigerated Cabinets Applying IoT Over Open-Source Hardware and Software. Sensors. 2020; 20(3):846.

Chicago/Turabian Style

Ramírez-Faz, José, Luis Manuel Fernández-Ahumada, Elvira Fernández-Ahumada, and Rafael López-Luque. 2020. "Monitoring of Temperature in Retail Refrigerated Cabinets Applying IoT Over Open-Source Hardware and Software" Sensors 20, no. 3: 846.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop