This document deals with the study of a carbon dioxide detector, which is used in survivors searching in earthquake ruins. In order to find the carbon dioxide of exhaled gases of earthquake survivors in the narrow space, we compared the different types of carbon dioxide sensors. At last, we selected the infrared sensors, which direct access to digital signals through the microcontroller, and has a temperature compensation function. The result of measuring was displayed in a vacuum fluorescent displayer. When it achieves the preset value, the sound and light alarm will be triggered. The test results show that the detector is fit for narrow space survivors search.