Electronic – MQ-135 Gas Sensor Interface

gassensor

I want to interface MQ-135 air quality gas sensor. Sensor have 5V output interface. However my mcu work at 3.3V. I can basically put a voltage divider. But sensor itself is a voltage divider with a specific resistor range at output.

So in this case I need opamp or something like that. But what would be the easiest way interface this 5V to 3.3V.

Best Answer

From the MQ-135 Datasheet you can see that the sensing resistance is 2 kΩ to 20 kΩ and the test circuit shown is really just forming a voltage divider from the 5 V supply with the lower end being RL. If you select RL as 3.3 kΩ when the sensor resistance is 2 kΩ the output will be 3.113 V and when it is 20 kΩ it will be 708 mV which you can directly connect to your ADC.

Sometimes when selecting divider resistors I find it convenient to use an on-line potential divider calculator to play around with the values. If your microcontroller has an internal bandgap reference for the ADC you may also want to consider using that and adjusting the resistor value so the maximum output voltage is around that value.

MQ-135 circuit diagram