Embedded real-time CO₂ monitoring system for respiratory waveform analysis using AVR128DB48 MCU and AK9723AJ NDIR sensor.
Figure 1: System block diagram of the AVR128DB48 and AK9723AJ embedded CO₂ monitor, showing sensor acquisition, MCU processing, and output visualization paths.
Embedded real-time CO₂ monitoring system for respiratory waveform (capnography-style) generation. The system uses an AK9723AJ NDIR CO₂ sensor with AVR128DB48 firmware to implement a deterministic acquisition and processing pipeline. Sensor data is read via I²C (TWI), converted to digitalized CO₂ voltage measurement, and distributed to multiple outputs.
The system provides DAC-based analog waveform output, SerLCD visualization via SPI, and USART (115200 baud) terminal control using an interrupt-driven FSM for configuration and calibration. It supports runtime system management and displays CO₂ values in both digital (LCD/UART) and analog (waveform) forms.
AK9723AJ NDIR CO₂ Sensor Layer
- I²C (TWI) communication interface with AVR128DB48
- Register-level configuration and calibration control
- Continuous NDIR CO₂ data acquisition (voltage-based output)
AVR128DB48 Processing Core
- Deterministic real-time firmware execution
- CO₂ signal processing and ppm conversion pipeline
- Interrupt-driven USART interface with FSM-based command parsing
- System state control and fault handling logic
DAC + SerLCD Output Layer
- DAC-based analog reconstruction of respiratory CO₂ waveform
- SPI-driven SerLCD multi-page visualization system
- USART telemetry output for runtime diagnostics and system feedback
- Real-time CO₂ concentration computation from NDIR sensor input
- Dual-domain output: digital display + analog waveform generation
Figure 2: Command parse FSM for USART terminal input, showing the state transitions used to decode and dispatch configuration commands.
- FSM-based UART terminal interface (115200 baud, interrupt-driven)
- Multi-protocol embedded integration (I²C, SPI, UART, DAC)
- Runtime calibration and sensor configuration via terminal commands
- GPIO-based status indication (boot state and fault signaling)
| Interface | Role |
|---|---|
| I²C (TWI) | Sensor acquisition + calibration control |
| SPI0 | SerLCD display updates |
| USART (115200) | Command-line interface |
| DAC | Analog CO₂ waveform output |
Figure 3: TWI (I2C) bidirectional character transfer used for AK9723AJ communication and runtime configuration.
- Respiratory monitoring (capnography-style waveform analysis)
- ICU / anesthesia / ventilator feedback systems
- Embedded mixed-signal medical sensing platforms
- Real-time embedded processing pipeline
- Mixed-signal architecture (digital + analog outputs)
- Interrupt-driven firmware design
- Multi-protocol peripheral integration (I²C, SPI, UART, DAC)
Figure 3: Voltage measurement and hexadecimal (IR1) representation of high CO₂ concentration read from the AK9723AJ and displayed on the SerLCD.



