Carbon Monoxide Gas Sensor returning nan

Hi,

I have just purchased and a gas sensor for carbon monoxide meter by i2c:

I´m using an ESP32 Feather and the i2c Feather.

I was able to read other i2c sensor wihtou problem for example another gas sensor (MQ5)

But when I try to read the MQ7 I always get nan (not a number).
I´m using the following library to read from this sensor:

When I remove the sensor I can see a message that the sensor has been disconnected but never returns a value.

What can I do?

Thanks!!

Is there any other i2c device connected to the ESP32 while you are testing MQ7?

Hi,

I have tried in both ways, with more devices and also alone. But the results are the same.

does the i2c devices scans?
try this code

Hi,

I have just tried your code, only with MQ5 sensor connected to the chain and the results are:

Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = 270.63
Sensor Voltage = 0.00V
Concentration = 270.63
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V
Concentration = inf
Sensor Voltage = 0.00V

Looks like somethin is broken becouse the sensor is returning 0V…

earlier you mentioned that MQ5 is working. are you testing MQ7 or MQ5 in the above test case.
run the i2c scan and see if the devices shows up with an i2c address.

Thanks

Hi,

I was testing only the MQ-7 in this test and the I2C scanner find the device correctly in the desired I2C address.

I will test one over here. Meanwhile can you post a picture of the board.

Thanks