Summary of DIY WiFi gas detector with text alerts
This article details a DIY WiFi gas detector project designed to enhance home safety by detecting methane and natural gas leaks near a stove. The author uses a Particle Photon for connectivity and an MQ-4 sensor for detection, incorporating both local audio alerts and remote SMS notifications to multiple recipients, including neighbors.
Parts used in the DIY WiFi gas detector:
- Particle (Spark) Photon
- MQ-4 gas sensor
- Beeper
Hey guys, back with another little project that I’ve been fiddling with for the past week. With kids around, every parent is thinking how to make their home safer for the little ones and for everybody in general. One of the most dangerous thing in the house can be the stove and since we have a gas-powered one, I always wondered why there are no simple gas detectors that can be used around the stove, just to alert instantly that gas may be leaking.
Well, that was the moment when I decided to build one of my own. Having a Particle (Spark) Photon lying around, I decided to use that as a foundation for the project. I like the fact that they are very small and cheap, and also can be flashed over the Wi-Fi. Having that settled, I needed the gas sensor and some kind of alerting system.
For the gas sensor I went for an
MQ-4 gas sensor because it can detect methane (CH4) as well as natural gas (CNG).
I found out later that it’s quite sensitive to CO2 as well, which turned out to be very useful while testing the setup. If you’re planning to use one in your projects and never used one before, remember that the gas sensors have a burn-in time when they are powered. That is to say that the sensor needs time to warm up (anywhere between 2 and 10 minutes). This is because the actual sensor has a heating element that helps detect these gases and while that is cold, it will give erroneous readings.
Now on to the alerts. Half of the alerting system was simple, add a beeper next to the sensor which would work perfectly when somebody is around. However I still had to sort out the second half, for the cases when somebody was not in the immediate vicinity. For that I wanted to have text/SMS alerts to my phone and possibly to a secondary phone, for example my wife’s phone. Now I realized that I should probably get one of our neighborhood FD guys phone number in there too.
For more detail: DIY WiFi gas detector with text alerts
- Why did the author decide to build a gas detector?
The author wanted to address the lack of simple detectors that can instantly alert users to gas leaks around a gas-powered stove. - What microcontroller was used as the foundation for this project?
A Particle (Spark) Photon was chosen because it is small, cheap, and can be flashed over Wi-Fi. - Which specific gases does the MQ-4 sensor detect?
The MQ-4 sensor detects methane and natural gas, but is also sensitive to CO2. - How long does the gas sensor need to warm up before use?
The sensor requires a burn-in time between 2 and 10 minutes to heat its internal element and provide accurate readings. - What components make up the alerting system described in the article?
The system includes a beeper for local alerts and text/SMS alerts sent to mobile phones. - Who are the intended recipients of the text alerts?
Alerts are sent to the user's phone, a secondary phone like a spouse's, and potentially a neighborhood fire department contact.

