Hypoxemia is a serious condition that requires oxygen transfusion. Indiscriminate oxygen administration is a poor strategy that can increase organ damage and even death. This paper describes a system for automatically controlling airflow of an oxygen tubes to a patient based on blood oxygen saturation and respiratory rate measurements. The MAX30102 sensor is used to measure oxygen saturation levels, and the MAX9814 module is used to determine respiratory rate. Both sensor outputs are processed by an STM32F411 microcontroller, and then sent wirelessly to an Arduino Uno microcontroller, which implements the fuzzy logic controller to control oxygen flow. The fuzzy output is used to activate a motor servo that controls the oxygen tube valve opening. The valve opening width (in degrees) is divided into 5 categories. Communication between the microcontroller and the valve actuator uses a 433MHz wireless RF module. The device test results revealed an MAE of 0.40% for oxygen saturation measurements compared to standard hospital measuring instruments and an MAE of 0.47% for respiratory rate measurements compared to manual measurements. Overall system testing produced a valve opening with an MAE of 0.56% compared to simulation results using MATLAB.
Copyrights © 2026