I’m trying to build some natural gas detectors for my home using ESP32s and the MQ5 sensors. Has anyone used any of these sensors with ESPHome and HA?
I’m going to try one - I’ve watched videos showing how the sensor has a digital output and an analog output, and both can be used with an ESP’s inputs.
I’m using a MQ-2, with an ESP8266, in a smoke detector, which works nicely. I see no reason why a MQ-5 wouldn’t work.
As @Karosm mentions, the MQ-5 has an analog output for measuring the gas and a digital output that will trigger above a certain level, which can be adjusted using the pot-meter.
Thanks for the info. One question I have is the platform setting - would you mind sharing a snippet of your sensor code section?
I am not sure what the platform options are - for example I have used Dallas and DHT for temp sensors but I am not sure what the MQx sensors would use.
It’s a while back, but I had to do some experimentation to get it working, especially since you have to mess with the pot-meter to get the sensor to trigger (by the way, in my case it’s an MQ-7 instead of an MQ-5, but that should be similar). I was testing with a burning match (creates smoke and CO), not sure how you can safely test the MQ-5.
Cool, I was going to use the analog sensor and log the readings I get when I hold it near my gas stove when lighting a burner. I always smell a little bit of gas right at the start when it lights so maybe that would register on the sensor.
I’m eventually going to use it in places where I already have existing Kidde NG sensors, but it turns out those have a 7 year life and one stopped working this morning and just sat there and beeped at me. Those things are a bit expensive, so if the MQ sensors have some sort of lifetime then at least they are cheap to replace.
Thanks, mine are on order and I’ll post any feedback or results I get from my testing since info on this setup seems to be a bit scarce.