Demonstration EMS Logger
About this page
This page was written by the New Horizons engineering team, which operated until December 2025. First-person references ("we", "our") are the original authors'. A number of those authors are now working with Phoenix GH, which maintains this material and stands behind it. Questions and comments are welcome — please get in touch.
Last update: April 1, 2025
Following the publication of the WHO PQS Equipment Monitoring System (EMS) specifications, New Horizons developed an EMS level-1 logger as a demonstration product and an opportunity to learn.
On this page (see Downloads), we share hardware and key parts of the source code of our demonstration logger with the hope that it will speed the development of commercial loggers. As a level-1 EMS device, the unit conforms to EMS data logger specification (WHO/PQS/E006/DL01) but not to the "equipment monitoring device" (EMD) specification (WHO/PQS/E006/EM01). The logger collects cold chain equipment data, stores it in non-volatile memory, and makes it available over a USB Type-C port. It does not have a display or audio-visual alarming functions.
Features
- Data sources
- Internal ambient temperature sensor.
- One or two temperature sensor harnesses for vaccine and freezer compartments.
- One or two door sensor harnesses with magnetic sensors.
- AC power presence can be logged based on the fridge power input.
- Compressor runtime can be logged based on a digital input.
- Optional connection to smart compressor controllers like the Secop 101N3110 weak grid/solar controller to obtain more detailed power and compressor operation data.
- Storage
- Non-volatile memory to store several years of data.
- Emulates USB mass storage controller to provide data over USB-C connection.
- Power
- Operates for up to 5 years from a non-rechargeable standard CR123A battery.
- Also powered by USB and CCE power, when available.
- Can provide 5 V, 1.1 A power to the “machine-to-machine” (M2M) interface.
Hardware

- STM32L476 microcontroller
- Winbond W25N01GWZEIG 1 Gbit NAND SPI flash memory
- AMS AS6212 I2C temperature sensors
- USB Type-C receptacle and protection circuitry
- 6-24 VDC power input
- DC/DC converter with current limiting for M2M power output
- LIN interface to optional Secop controller
A block diagram emphasizing the power flow but also showing major components:

Firmware
Firmware is based on STMicroelectronics STM32CubeMX and FreeRTOS.
We recognize that different implementations may use different microcontroller families and real-time operating systems (or no RTOS at all). We are not sharing the middleware files related to STM32 or its ports of FreeRTOS, as those are implementation dependent.
The source code is distributed in a zip archive (below) that contains:
- The RTOS tasks, notably:
- The logger task, which manages data collection, storage, and PDF file generation upon USB plug in.
- The compressor and modbus tasks, which obtain data from a Secop compressor controller.
- A bootloader and method to update firmware and/or set options over the USB interface.
- An interface between FATFS and a flash NAND memory using the open-source Dhara wear leveling library.
- Third-party libraries with permissive open-source licenses.
- Modest documentation of the logger task and some lessons we learned using STM's USB stack.
Downloads
Hardware
License: Hardware design files are licensed under the permissive CERN-OHL-P v2 Open Hardware License. Documentation contained within is licensed under the Creative Commons CC-BY 4.0 License. See the LICENSES.txt files enclosed in the archives.
-
Demo EMS Logger Printed Circuit Board Rev. 2.1. The circuit board and its enclosure.
-
External temperature sensor Printed Circuit Board Rev. 2.1. External sensor that can be used for either vaccine chamber temperature or freezer temperature. Contains the same sensor type that is placed on the main circuit board.
-
Installation of Demo EMS Logger in a minifridge. We installed the logger in a small fridge to be used as a test platform.

Source code
License: Except for the third-party libraries, the attached code is released under the permissive MIT License. Third-party libraries are licensed under the MIT license, similar permissive licenses (no GPL), or are public domain. See the LICENSES.md file enclosed in the archive.
Firmware binaries
-
Demo EMS logger firmware, v1.0.0 (UF2 file, can be dragged and dropped onto logger)
-
Optional firmware updater Windows app + firmware v1.0.0 The updater automates copying data from the logger before updating firmware.
Working with JSON data files
Demo EMS Logger Manufacturer-Specific data objects
In certain configurations, the Demo Logger will create manufacturer-specific data objects as an example of how these objects would be used. The schema describes those data objects, zplug and ztpcm. More information about
manufacturer-specific data objects is on the custom JSON schemas page.
- JSON Schema for Demo EMS logger manufacturer-specific data objects, corresponding to firmware v1.0.0
Tool to convert EMS JSON to CSV
JSON is a self-describing human- and machine-readable data format, and has many advantages for data interoperability. However, it is difficult to visualize the progression of one or two data objects in the array of time-based records without transforming them to another format. EMS files that contain data elements at the root (top) level in addition to an array of time-based records cannot easily be read by spreadsheet applications like Microsoft Excel.
The EMS JSON-to-CSV converter tool is a small application that extracts the time-based records and creates a comma-separated values (CSV) file. This file can be opened with by spreadsheet and further manipulated, if necessary. The zip file contains a Microsoft Windows executable and directions for use. It is available on the Software Data Tools page.
Example logger data
The following zip files contain example filesystems generated by the Demo EMS Logger in different scenarios. Note that some of these loggers have been used for firmware development and testing, so historical DATA files do not always contain the same data objects. The files are as described in specification WHO/PQS/E006/DL01, plus some files and folders specific to the Demo EMS Logger:
- id_60DTR_SUMMARY_timestamp.pdf: Adobe portable document format (PDF) summary report of the last 60 days' operation.
- id_CURRENT_DATA_timestamp.json: JSON raw data from the past 0-60 days.
- id_SYNC_timestamp.json: Synchronization file containing data as of the time of USB mount.
- DATA_HISTORY: Folder containing historic JSON data files with filenames of the form id_DATA_timestamp.json.
- BINARY: (Demo Logger specific) Folder containing aggregated data that speeds the process of creating the PDF summary file when USB is connected.
- prov.txt: (Demo Logger specific) A "provisioning" file, describing static data objects like manufacturer name, as well as configuration information to allow the logger to work with different refrigerator types.
- prev.txt: (Demo Logger specific) The previous copy of the provisioning file, saved when changing provisioning.
Logger in mini-fridge with manufacturer-specific data objects
These data are from a logger that has been in one of the New Horizons demonstration minifridges, which are small consumer thermoelectric (TEC) cooler-based fridges that serve to hold the logger and emulate some aspects of a vaccine refrigerator. This implementation uses a single vaccine compartment sensor and is powered by the AC mains, and thus represents a typical ice-lined refrigerator. The logger records AC availability (SVA) and compressor runtime (CMPR). Compressor runtime is based on power applied to the TEC element. Because the TEC is not an efficient cooler, the runtime will be almost the same as SVA. It also means that if the ambient temperature is high enough, the cooler will struggle to get the “vaccine” compartment < 8 °C, and overtemperature alarms are likely. These data files contain the manufacturer-specific data objects described above.
The files here were collected 2025-03-27T14:24:28-07:00, when the logger had just over 98 days of data on it. Before day 84, the logger was operating with a pre-1.0.0 version of the firmware. Also before that time, it had a "vaccine compartment" sensor attached, but was not installed in a fridge, so there was no external power and the temperature was room ambient. Therefore, there was a high temperature alarm.
Firmware v1.0.0 added two manufacturer-specific data objects, zplug and ztpcm, described (TODO: link). Those objects also started to be collected at that time.
Logger in a solar-direct drive vaccine refrigerator
This set of files is from a logger in a fridge that has been retrofitted with a Secop BDn50k compressor and 101N3110 solar and weak grid controller. It is configured to communicate with the 101N3110 to obtain power and compressor information. The data files include both AC availability and DC voltage and current because the 101N3110 can accept both AC and DC. However, this fridge has been operating on solar power.
-
The data were collected 2025-03-24T17:23:54-07:00 on day 587 of the logger's relative time clock.
-
The logger had been updated to firmware version v1.0.0 earlier that day.
-
The logger is configured to expect both a vaccine compartment temperature sensor and a water pack freezer compartment temperature sensor (and two door sensors). This is merely as an example, as the fridge does not have a separate compartment. In this case, the freezer temperature sensor is inside the vaccine compartment (TFRZ is almost the same as TVC), and the corresponding door sensor is in the "door closed" position.
-
The fridge has experienced some rough testing, and its refrigeration system is not running
optimally. On some days cloudy days over days 552-559 it was unable to maintain temperature and had high temperature alarms. -
The logger's battery was low (shown by error "A"), and has since been replaced.
Logger in a solar direct-drive vaccine refrigerator on mains + solar
This set of files is from a logger in a different fridge retrofitted with a Secop BDn50k compressor and 101N3110 solar and weak grid controller. This fridge has been operating on a combination of intermittent AC mains and solar power, switching between the two power sources as needed.
-
The data were collected 2025-03-24T17:26:03-07:00 on day 661 of the logger's relative time clock.
-
The logger had been updated to firmware version v1.0.0 earlier that day.
-
In the raw data JSON files, you will notice that the solar DC voltage, DCSV, is around 43-44 V during the day and zero at night. DC current, DCCD, is 1.2 - 1.8 A during times that the compressor is running from solar. AC power availability, SVA, is intermittent. There are times when the compressor runs from mains, such as the time sample at RELT = P651DT11H42M3S, where there is both DC voltage and AC power availability with the compressor running but zero DC current.
-
The logger is configured to expect both a vaccine compartment temperature sensor and a water pack freezer compartment temperature sensor (and two door sensors). This is merely an example, as the fridge does not have a separate compartment. Instead, the freezer temperature sensor is not connected, hence the
nullvalue for TFRZ, "D" error code in for LERR (both in raw data JSON files), and fault "D" in the PDF summary report. The freezer door sensor is in the "door open" position, so DORF reads 900 seconds every sampling interval. -
This fridge's refrigeration system is a little too robust. As you can see from the PDF summary report, the vaccine chamber temperature is often between 1.5°C and 2.1°C. (TODO: check the sensor location, maybe touching a wall?)
-
This logger's battery was also low, and was replaced about 30 days ago.
Contact
Contact: Rod Hinman
For more information, contact us about the demo EMS logger.