
Building a two-board BLE heat pump display with field-calibrated power metering
Challenge
A heat-pump manufacturer needed a modern touchscreen display retrofit for their units - one that could show real-time refrigerant, water, and outdoor temperatures, live power draw and heating output, a field-accurate efficiency reading rather than a spec-sheet number, and a full day/month/year energy history, without a hardwired connection between the display and the unit's sensor and control electronics, since the two needed to be physically separable and independently serviceable. It also had to guarantee a given display only ever talks to its own paired unit, since an installer could easily have several units running within range of each other.
Solution
We built two cooperating ESP32 firmwares linked over BLE with NimBLE: a sensor and controller board reading refrigerant gas and liquid line temperatures, water in/out temperatures, outdoor and boiler temperatures, a pulse-based flow sensor, and a Microchip MCP39F511 power-monitoring IC for real electrical input power and RMS current, and a 480x480 touchscreen display board built with SquareLine Studio and LVGL showing live data, mode control, and an energy-statistics dashboard. We designed a compact, versioned, CRC16-protected byte-framing protocol shared between both boards' firmware - the sensor board pushes a full sensor snapshot over BLE every 500ms, and the display pushes back single control commands for mode changes, flow-protection thresholds, meter calibration values, and RTC time sync - so the same wire format holds up regardless of which link carries it. For pairing, the display remembers its partner's BLE MAC address in flash after first connection and filters every future scan to that address only, so a display in a multi-unit installation can never accidentally lock onto a neighboring unit, with a one-tap pairing-reset button to re-pair it deliberately. Because compressor motors don't present a unity power factor, we built an in-field calibration workflow for the MCP39F511: a technician measures true voltage, current, and power with a reference meter, enters those values on the display, and the firmware calibrates the metering IC's registers - phase included - against them, so the power and efficiency readings are field-accurate rather than trusting factory defaults. For energy history, we designed the sensor board's flash storage specifically around write economy: today's hourly buckets, each calendar month's daily buckets, and the year's monthly rollups are stored under independent keys instead of one large yearly blob, so a normal day of logging only ever rewrites the one small key that changed instead of touching the whole year's history, with a bitmask tracking which months actually have recorded data so a request for data that predates the unit's install, or falls in a previous year, returns an explicit no-data response instead of a misleading zero.
Results
The result is a heat pump display that gives installers and owners field-accurate numbers instead of spec-sheet estimates - efficiency, power draw, and energy use calibrated against a reference meter rather than assumed - with a full day/month/year history that survives power loss and never accidentally shows one unit's data on a neighboring installation's display. The framed, CRC-checked protocol keeps sensor data and control commands cleanly separated and versioned between two independently developed firmwares, and the per-key flash storage design keeps the statistics feature light on flash wear even as the history grows across a unit's entire service life.
Kick-start your project
Get in touch with our team to discuss your business needs and see how we can help with a project like this one.