Technical write-up
What it is
A multi-node sensor and actuator system built on custom hardware. A Raspberry Pi CM4 runs the touchscreen HMI, an STM32F407 bridges it to the nodes over four different transports, and two node boards handle sensing and actuation.
Architecture
| Path | Transport | Format |
|---|---|---|
| CM4 to bridge | SPI slave, 1 MHz | 71-byte passthrough frames |
| Bridge to Node 1 | CAN 2.0B, 500 kbps | Sensor and actuator-command frames |
| Bridge to Node 1 | Wi-Fi TCP | Same payload format as CAN |
| Node 1 to bridge | RS485, 115200 baud | Broadcast frames with CRC-16 |
| Bridge to Node 2 | nRF24L01+, 2416 MHz | Sensor and buzzer-command structs |
| ESP-12E to RP2040 | UART, 115200 baud | 10-byte load-cell frames |
The bridge is a transparent router: messages from the CM4 name a transport and are forwarded to it, and messages from any transport are wrapped and passed back to the CM4. Shared protocol headers define every frame, so the Zephyr, ESP-IDF and ESP8266 firmware and the Qt application agree on one format.
Hardware
- CM4 main module: Raspberry Pi CM4 carrier with the STM32F407 bridge, Ethernet, HDMI, USB, storage, an LTE modem section and power.
- Node 1: ESP32 with temperature, moisture and flow inputs, and outputs for AC and DC pumps and a conditioner, on CAN, Wi-Fi and RS485.
- Node 2: RP2040 and ESP-12E with an RTD (MAX31865), current, voltage and EMF inputs, two HX711 load cells, a 4×4 keypad, a buzzer and an SPI LCD.
Software
- Bridge firmware (Zephyr, STM32F407) with SPI slave, CAN, nRF24, Wi-Fi and RS485 transports.
- Node firmware in Zephyr (RP2040) and ESP-IDF and the ESP8266 RTOS SDK (ESP32 and ESP-12E).
- An nRF24L01 Zephyr driver and a custom RP2040 board definition.
- Qt 6 HMI with an industrial dark theme, node panels, sensor strips, a control bar, a bridge log and a simulation mode.
Embedded Linux image
The CM4 runs a custom Yocto image rather than a stock distribution, so the board boots straight into the HMI with only what it needs.
- Yocto Scarthgap with poky, meta-raspberrypi, meta-openembedded and meta-qt6 (Qt 6.10.2), plus a custom layer for this product.
- The HMI as a BitBake recipe (qt6-cmake and systemd classes), with the shared protocol headers vendored in so the image and the firmware agree on every frame.
- A kernel config fragment enabling the CM4’s PCIe-attached USB controller and HID multitouch for the touchscreen, with SPI and I²C enabled for the bridge.
- Weston on Wayland with screen blanking and locking turned off, a custom boot splash, and the HMI started and restarted by systemd.
- A reproducible build in a Docker container with shared download and sstate caches, so the same setup also builds a BeagleBone Black image. Images are flashed with bmaptool, and app changes are rebuilt as a single recipe and copied over SSH without re-flashing.





