A gas sensor , comprising: a sensor body having a first end and an opposing second end; a folded optical waveguide within the sensor body configured in a "U" shape having a first section , a third section , and a second section joining the first section and the third section , wherein the first section is connected to the second section by a first reflecting wall and the second section is connected to the third section by a second reflecting wall , wherein the first reflecting wall is configured to direct energy propagating through the first section to the second section , wherein the second reflecting wall is configured to direct energy propagating through the second section to the third section , wherein the waveguide is configured to convey infrared energy from a first end of the waveguide to a second end of the waveguide; an infrared source is disposed at the first end of the folded optical waveguide ; an infrared detector disposed at the second end of the folded optical waveguide ; a cavity in the sensor body disposed proximate to the first and second ends of the waveguide; a filter disposed on the outside surface over the cavity , wherein the filter is configured to block dust, moisture, or both from entering the waveguide, wherein ambient air travelling through the filter through the cavity and along the waveguide may move via a convection flow created by thermal differences at each end of the shaped waveguide for air flowing through the cavity; an infrared source inlet at the first end of the waveguide; an infrared detector inlet at the second end of the waveguide; and an optical cone disposed in the third section with a narrow part of the optical cone facing the infrared detector inlet , such that optical irradiance on an infrared detector disposed in the detector inlet is enhanced, wherein said optical cone is formed by a tapered portion of the waveguide extending from the second reflecting wall to the infrared detector inlet . a sensor body having a first end and an opposing second end; a folded optical waveguide within the sensor body configured in a "U" shape having a first section , a third section , and a second section joining the first section and the third section , wherein the first section is connected to the second section by a first reflecting wall and the second section is connected to the third section by a second reflecting wall , wherein the first reflecting wall is configured to direct energy propagating through the first section to the second section , wherein the second reflecting wall is configured to direct energy propagating through the second section to the third section , wherein the waveguide is configured to convey infrared energy from a first end of the waveguide to a second end of the waveguide; an infrared source is disposed at the first end of the folded optical waveguide ; an infrared detector disposed at the second end of the folded optical waveguide ; a cavity in the sensor body disposed proximate to the first and second ends of the waveguide; a filter disposed on the outside surface over the cavity , wherein the filter is configured to block dust, moisture, or both from entering the waveguide, wherein ambient air travelling through the filter through the cavity and along the waveguide may move via a convection flow created by thermal differences at each end of the shaped waveguide for air flowing through the cavity; an infrared source inlet at the first end of the waveguide; an infrared detector inlet at the second end of the waveguide; and an optical cone disposed in the third section with a narrow part of the optical cone facing the infrared detector inlet , such that optical irradiance on an infrared detector disposed in the detector inlet is enhanced, wherein said optical cone is formed by a tapered portion of the waveguide extending from the second reflecting wall to the infrared detector inlet . <EOS>