Fluorescence Spectrophotometer Control
Real-time firmware for IVD (In-Vitro Diagnostics) diagnostic platform

Project Details
- Task : Design and implementation
- Completion : December 2016
Client
Swiss company specializing in MedTech industry device manufacturing.
Challenges
Creating firmware software for a dedicated microcontroller (STM32) in a medical sample analysis platform. The system required absolute precision and repeatability in mechanical and optical operations. The main challenge was perfect synchronization of the motion subsystem (stepper motors) with the data acquisition subsystem (laser and sensor), while offloading the main application processor (Sitara) from real-time tasks.
Solution
I developed software modules based on SafeRTOS (FreeRTOS) for the STM32 microcontroller, which managed the entire measurement process.
Precise Motion Controller:
I implemented drivers for stepper motors responsible for transporting the cartridge with the sample.
I developed acceleration profile algorithms (S-curve) to ensure smooth, fast, and vibration-free movement, which was critical for sample integrity.
Optical Data Acquisition Subsystem:
I created low-level drivers for DAC (D/A converter), which precisely controlled the laser power illuminating the sample.
I managed a fast ADC (A/D converter), which read the emitted light value (fluorescence), constituting the raw measurement result.
Data Bridge to Application Processor:
I designed and implemented a high-performance, transactional communication protocol based on the SPI bus.
This protocol ensured streaming transmission of collected data (from ADC) and receiving commands (e.g., “start scan”) from the main Sitara processor, guaranteeing data integrity.
Result
The delivered firmware transformed the STM32 microcontroller into a reliable, precise “control plane” for the device. It guaranteed mechanical and measurement repeatability at the level required by IVD standards. The clean SPI interface allowed for rapid integration with the main application and accelerated the validation process of the entire system.
Technologies Used:
MCU: STM32 Family (e.g., F4/L4) Language: C System: SafeRTOS (FreeRTOS) Concepts: Motion Control (Stepper Motors), Acceleration Profiles, DAC/ADC Drivers, Real-Time Data Acquisition, DMA, Interrupts Buses: SPI, I2C, DAC, UART Industry: MedTech / IVD