Freezer Temperature Monitoring with ESP32-DevKitC

Reporting from Shanghai, China
Feb 26, 2021

Learn how easy it is to use Edge Impulse for deploying embedded Machine Learning (ML) on an ESP32-DevKitC-based sensor!

Edge Impulse is a leading development platform for embedded machine learning (ML), used by over 1,000 enterprises across 10,000 ML projects worldwide. Edge Impulse provides an easy-to-use, end-to-end platform for:

  • Easily ingesting sensor data as inputs into an embedded ML model;
  • Efficiently creating an embedded ML model optimized for memory size and power consumption;
  • Easily deploying the model on a target sensor using the Edge Impulse SDK and your development environment of choice.

Software Applications Engineer Zin Thein Kyaw explored in a recent blogpost how makers can put Edge Impulse to good use for Cold Chain Monitoring applications, as an example of a specific vertical that could fully benefit from more intelligence at the edge. More specifically, he created a DIY freezer temperature monitor using an anomaly detection model with an ESP32-DevKitC, a MAX31855 board, and a K-Type thermocouple probe.

Freezer Temperature monitoring is important to ensuring that perishable products stay frozen at the right temperature. The following proof-of-concept demo configuration was used in Zin Thein Kyaw’s specific use case:

  • ESP32 DevKitC board
  • Adafruit MAX31855 Thermocouple board
  • K-Type Industrial Thermocouple probe
  • Embedded firmware compiled using Arduino IDE, including Edge Impulse SDK

However, this PoC demo configuration could be easily ported to other embedded targets. The public Edge Impulse project is available on the Edge Impulse Studio, so readers can take a closer look at the data sets as well as the way in which the anomaly detection model was trained. The embedded project is available on GitHub

With Edge Impulse, an anomaly detection embedded ML model was easily created using the temperature profile of the sensor, minutes after the freezer door had been opened or closed. This allowed for detecting whether the freezer door had been left opened or closed, while also obtaining a relative indication for how long this state had been in occurrence via an “anomaly score”.

One method of gathering data for training the anomaly detection model was to use the “data forwarder” tool that is part of Edge Impulse’s Command Line Interface (or CLI). The data forwarder created a secure web connection between the host PC, the sensor, and Edge Impulse’s platform to collect live sensor data, which could then be used to train the embedded ML model.

The Edge Impulse Studio also allowed to visualize critical temperature ranges that represented “danger zones”. These temperature transition ranges were used in Zin Thein Kyaw’s project, yielding important knowledge for the building  of an embedded ML model with K-Means Clustering, which would then be able to detect outliers in the data (labelled as “anomalies”).

Freezer Anomaly Detector Deployment (picture courtesy of Zin Thein Kyaw)

In general, Zin Thein Kyaw’s blogpost demonstrated how easy it is to use Edge Impulse to deploy an anomaly detector for temperature sensing enterprise applications, such as Cold Chain Monitoring using embedded ML. This can open the door to innovative use cases and powerful new capabilities in our systems by taking advantage of the advanced computing power already available on such edge devices as ESP32-DevKitC. This will in turn result in the overall reduction of complexity in system designs, and a significant reduction in ownership costs.

Share this article
Reuse this content