Steam Doctor

Engineering safety in the middle of a pandemic

Published: July 27, 2025
Embedded Programming
Visit Project

Case Study: Steam Doctor
Company: Steam Doctor
Location: Beirut, Lebanon
Website: https://scalabledesings.co.uk

Case Study: Steam Doctor - Engineering Firmware for a Safety-Critical System

We were tasked with a critical role in the development of the "Steam Doctor," an innovative public disinfection chamber designed to provide automated, steam-powered sterilization. Our responsibility was to design and develop the complete firmware to operate the system's complex set of features, including user detection, temperature screening, and a precisely controlled steam cycle.


The Challenge: Ensuring Real-Time Safety and Reliability

The core challenge was developing highly reliable, non-blocking firmware for a safety-critical system. The device, controlled by a single-threaded ATMega256 microcontroller, had to manage numerous sensors and actuators simultaneously. from temperature and proximity sensors to pumps and valves.

Any delay or halt in the program's execution while controlling the high-pressure boiler could lead to a hazardous situation. The firmware needed to be architected for constant, real-time monitoring and responsiveness to guarantee user safety and system stability.


Our Process & Solution: A Focus on Robust, Non-Blocking Architecture

We engineered a solution centered on safety and reliability, tackling the most complex firmware challenges head-on.

  • Real-Time, Non-Blocking Control: To eliminate the risk of execution halts, we built the entire system using a non-blocking programming model. Instead of using simple delay() functions that would freeze the processor, we implemented a sophisticated event-driven approach using the microcontroller's internal clock (millis()). This ensured the system was always monitoring critical safety sensors, like the boiler thermostats, even while performing other tasks like displaying messages or activating pumps.

  • Proactive Risk Mitigation: During development, we identified a critical, long-standing bug in a core Arduino library (wire.h) that could cause the entire system to freeze during sensor communication. We proactively mitigated this risk by sourcing and implementing a more robust third-party library that included a fail-safe timeout feature. This demonstrated foresight and ensured the prototype's stability. When the official library was finally patched, we seamlessly transitioned back to it, ensuring long-term maintainability.

  • Implementing Failsafe Mechanisms: We added another layer of safety by implementing a watchdog timer. This hardware-level failsafe acts as a constant monitor for the software. If the main program were to ever become unresponsive, the watchdog timer would automatically reset the system, preventing any potential hazard.


The Outcome & Impact: A Successful and Safe MVP Delivery

We successfully delivered the fully functional and robust firmware for the Steam Doctor MVP. The system performed its complex workflow flawlessly, demonstrating our capability to engineer safety-conscious firmware for complex electromechanical systems. The completed prototype was successfully handed over to the client, meeting all project requirements and concluding our involvement in the project.

Technology Stack

  • Language/Platform: C++ (Arduino)
  • Microcontroller: ATMega256
  • Protocols: I2C
  • Specializations: Embedded Systems, Firmware Development, Real-Time Control, Safety-Critical Systems