This paper investigates the ability to use a finite one-dimensional phononic crystal composed of branched open resonators with a horizontal defect to detect the concentration of harmful gases such as CO2. This research investigates the impact of periodic open resonators, defect duct at the center of the structure, and geometrical parameters such as cross-sections and length of the primary waveguide and resonators on the model's performance. As far as we know, this research is unique in the sensing field. Furthermore, these simulations show that the investigated finite one-dimensional phononic crystal composed of branched open resonators with a horizontal defect is a promising sensor.