arrow_back All case studies
Building Systems / Analytics

Lift Monitoring System

CircuitPython → Zephyr, with an algorithm simulation framework

Took an elevator-monitoring product from CircuitPython prototype to production Zephyr firmware on STM32L0 with NB-IoT, and built a simulation harness that replays real trip data through the shipping C algorithm — cutting months off device testing.

Months
Cut from test cycles
Real C code
Not a Python reimplementation
Hundreds
Recorded trips replayed in seconds
Client
A US lift/elevator analytics company (name withheld — NDA)
Delivery
Delivered by our founder at Croxel Inc (US)
Role
Embedded developer — productionisation, algorithm and test framework
Timeline
2023 – 2024

Stack

STM32L0 Zephyr RTOS Accelerometer + barometer SD card NB-IoT (Blues Notecard) C Python FFI

help The problem

The client had a working floor/trip-detection algorithm for monitoring elevators, but it lived in CircuitPython — a prototyping environment, not production firmware. Two things had to happen: move it onto a real low-power battery-powered platform, and — the harder part — validate the detection algorithm without burning months physically riding elevators to test every change.

build What we built

  • Migrated the algorithm from CircuitPython to production Zephyr firmware on an STM32L0, folding in production lessons — coredump diagnostics, robust data handling, release discipline — from earlier projects.
  • Low-power engineering throughout, since the device runs on battery: firmware and duty-cycling optimised for long life.
  • Sensing and connectivity: accelerometer and barometer for motion and altitude, SD-card logging locally, and an NB-IoT cellular data card for backhaul.
  • The Algorithm Simulation Framework — it compiles the real production C algorithm (not a reimplementation), drives it from Python via FFI, and feeds it datasets recorded from many real sample trips. Engineers could replay hundreds of real elevator trips through the actual detection code in seconds on a desktop, iterating until detection was satisfactory.

check_circle The result

  • done Device-testing cycles cut by months — algorithm changes validated against recorded reality instantly instead of via slow physical field testing.
  • done Shipped with an optimised floor/trip-detection algorithm.
  • done Above all this demonstrates algorithm-development infrastructure: the harness that turns "tune it on the device and hope" into "optimised against hundreds of real trips before it ever ships".