miguel5612 / MQSensorsLib

We present a unified library for MQ sensors, this library allows to read MQ signals easily from Arduino, Genuino, ESP8266, ESP-32 boards whose references are MQ2, MQ3, MQ4, MQ5, MQ6, MQ7, MQ8, MQ9, MQ131, MQ135, MQ136, MQ303A, MQ309A.
MIT License
169 stars 64 forks source link

MQ9 needs a low/high temperature cycle like MQ7 #44

Closed nfj25 closed 2 years ago

nfj25 commented 3 years ago

Describe the bug MQ9, as per datasheet, needs a low/high temperature cycle like MQ7 but in the documentation and examples there is no reference to that.

Expected behavior The examples and documentation should exemplify the PWM usage and the High/Low heat cycle.

Additional context This datasheet is more explicit about the required cycle: https://www.elecrow.com/wiki/images/f/f2/MQ-9.pdf

miguel5612 commented 2 years ago

Observing page 2 of the datasheet indicated the preheating time and the cycles to obtain a proper reading, following this the MQ9 example has been modified to contain from now on this cycle. It is important that you have both voltage sources and an electrical circuit that makes the change, the arduino will send by pins 3 and 4 the electrical signals to activate the corresponding voltage source. In the MQ9-ALL it is not modified since it is assumed that the sensor is being powered by a source that has the voltage characteristics indicated in the datasheet (1.4 Volts - 5 volts for 60 and 90 seconds).