Arduino-MQ131-driver icon indicating copy to clipboard operation
Arduino-MQ131-driver copied to clipboard

MQ131 and ESP32

Open dimitris1965 opened this issue 2 years ago • 4 comments

Dear friend. Can I use this library with esp32?

dimitris1965 avatar Apr 18 '22 21:04 dimitris1965

Hi @dimitris1965 It should work. However, some adjustment maybe needed to inform the watchdog that the process is still running. Some sleep() functions could not be appreciated by the watchdog (typically during calibration, warm-up or waiting time for the sample). As I don't have ESP32 here, I cannot test it. Let me know if you have issue and we can look at it. KR

ostaquet avatar May 01 '22 04:05 ostaquet

My ESP32 is the "fire beetle" ESP32 WROOM 32E. I don't use any sleep() function. The number MQ131_DEFAULT_STABLE_CYCLE (15) is too big. It takes over an hour to reach 5, I don't know why. Another issue is the MOSFET. I must use a MOSFET that can be controlled by 3.3v (so far I use a relay). I already order an IRLZ44N. I apply to sensor and heater 5V and read it via voltage divider. I have change to library the 1023 to 4095. The problem for now is the number MQ131_DEFAULT_STABLE_CYCLE.

dimitris1965 avatar May 01 '22 06:05 dimitris1965

hey just wanted to tag on this issue, I'm using the ESP8266 that also has a 3.3v ADC that I'm also using a voltage divider, what do I set the load resistance to?

lackdaz avatar Aug 02 '22 05:08 lackdaz

@lackdaz Load resistance with 3.3V is answered in #54

ostaquet avatar Aug 07 '22 16:08 ostaquet