Most of the current respiratory devices for monitoring CO2 concentration use the side-stream structure. In this work, we engage to design a new double-end mainstream device for monitoring CO2 concentration of gas breathed out of the human body. The device can accurately monitor the cardiopulmonary status during anesthesia and mechanical ventilation in real time. Meanwhile, to decrease the negative influence of device noise and the low sample precision caused by temperature drift, wavelet packet denoising and temperature drift compensation are used. The new capnograph is proven by clinical trials to be helpful in improving the accuracy of capnography.