Gas Leak Detector

I realized my apartment doesn’t have a smoke or carbon monoxide detector. So, I decided to make a DIY simple carbon monoxide detector.

The circuit is pretty simple. I connected a cheap gas (and alcohol) sensor to analog in. The LED lights up when the value of the analog in is higher than 400.

It wasn’t working first, but it turned out that the resistor had bad connection or broken. After I replaced the resistor, it started working.

The code looks like this.

 

 

Leave a Reply