PCR-Based System for Multi-Pathogen Detection

PCR-Based System for Multi-Pathogen Detection

Client – Who are they/what do they do


Multi-decade Silicon Fen based science and technology innovator.

Challenge – What did they need us to do


Embed was contracted to design, architect, implement and test the full firmware suite and off-device tools for a client’s intricate spectral analysis PCR-based system, which comprises three interconnected PCBs, each controlling its own peripherals via serial communication. The project’s primary objective was to deliver a robust, functional and demonstrable product, with Embed developing the embedded firmware to manage all PCB operations and creating the external tools necessary for control, data analysis and effective demonstration of the system’s advanced spectral capabilities. This comprehensive development effort was essential for showcasing the product’s value and potential to the client’s investors.

Solution – How did we solve it for them


Initial involvement focused on reviewing the preliminary hardware design schematics, providing suggestions for improvement and facilitating discussions to ensure these enhancements were incorporated into the final design.

Once the hardware design was finalised, initial firmware development commenced using off the shelve development boards to emulate the complete system, which included the assay controller, thermal controller and motor controller PCBs. This early system bring-up enabled the establishment of the software architecture and a secure communication protocol for both intra-board and external communications. A robust system was quickly developed, featuring sophisticated logging and debugging support through LEDs and local/remote diagnostics.

While awaiting the availability of the actual hardware, the software architecture was already in place, enabling the rapid development of the necessary low-level physical device drivers, controls and applications for all three controllers.

Several notable custom design patterns were developed and established during this project:

  1. FSM Generator – A flexible finite state machine (FSM) generator was created to transform validated JSON designs into optimised production-ready code. It supports hierarchical state machines, sub-FSMs, guards and assertions. The generator integrates seamlessly into the application’s build process and the complexity of the output scales directly with the input design.
  2. Assert and Logger Generator – This tool produces file specific diagnostic messages tagged with unique file IDs. To minimise serial traffic, it transmits only compact data packets (ID + payload), while the full message strings are stored on a host for decoding. This approach significantly reduces bandwidth usage, MCU load and memory footprint.
  3. Configuration Generator and Manager – This component transforms JSON-formatted inputs into compiler-ready source code, providing a robust and maintainable approach to managing system parameters and settings. Each input is rigorously validated against a predefined schema to ensure both structural correctness and semantic integrity prior to code generation. This validation process guarantees that only valid configurations are translated into code, minimising runtime errors and simplifying debugging. By regenerating the Manager whenever configurations are updated, developers can maintain build consistency with minimal manual effort, streamlining updates and reducing the risk of misalignment between configuration and implementation.
  4. Configurable Command Sequencer – Developed in response to biochemists’ requirements for fine-tuning the PCR algorithm, this sequencer enables precise control over individual or grouped components, including valves, motors, the welder, blister, solenoids, heaters and Peltier elements.
  5. Service-Oriented Extension with Routing – To enhance the command sequencer, the system was extended with both local and remote services. A routing mechanism was introduced to manage and direct command requests and responses to their appropriate destinations, ensuring modular and scalable communication.
  6. Fault-Tolerant Communication Protocol – A robust, addressable command-response protocol was implemented to handle all communications over serial UART and USB interfaces. The protocol is hardware-agnostic and easily adaptable to other physical media, ensuring flexibility and resilience.

A robust desktop GUI application was developed to configure each PCR system, allowing users to set parameters and define command sequences. This application captures all logging and assertion data from the controller boards and supports real-time monitoring of every component. Each system element – including valves, motors, welder, blister, solenoids, heaters and Peltier modules – can be individually controlled and tested, greatly facilitating unit, integration and system testing.

The architecture was purposefully designed for extensibility, allowing for straightforward future enhancements and integrations. Although formal verification was not performed, preliminary testing confirmed that multiple PCR systems could be interconnected, enabling seamless communication and coordination between them.

Despite exceptionally challenging time constraints, the team not only delivered the project on schedule and within budget, but also met every requirement defined at the outset of Embed’s involvement. Throughout the engagement, the team demonstrated remarkable agility – proactively adapting to evolving needs and unforeseen challenges without compromising on quality or scope. This achievement is a testament to the team’s unwavering commitment to excellence, collaborative spirit and disciplined execution at every stage of the project lifecycle. Their ability to maintain clear communication, foster strong stakeholder relationships and uphold rigorous standards ensured that all objectives were achieved, setting a high benchmark for future initiatives.