Posts: 31
Joined: Thu Sep 27, 2018 9:52 am

MQ Gas sensor wire connection

Thu May 02, 2019 10:09 am

I've connected my circuit as shown in the diagram

I have one issue which I am concern about the Analog Output from the Gas sensor is 0-5V, is it fine to connect to the MCP3008 ADC A0 pin?
I've read online, some guides says it's Ok to straight connect, some says need to regulate the voltage to 3.3V

According to ... nsor-mq-x/ , he is using a logic level converter, but as I know these module doesn't take analog inputs?

Please clarify whether its safe to connect according to my schematic or I would need to put a voltage divider like ... 000,398790

Thank you.
Capture.PNG (109.15 KiB) Viewed 1264 times

Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: MQ Gas sensor wire connection

Thu May 02, 2019 3:40 pm

I don't know much about gas sensors. But I think is correct/safe. It's a risk to take :| . And don't blame me if anything goes wrong.

User avatar
Posts: 295
Joined: Mon Nov 12, 2012 10:22 pm
Contact: Website

Re: MQ Gas sensor wire connection

Thu May 02, 2019 5:33 pm

The MCP3008 may require Vref to be less than or equal to Vcc (3.3v)... I'd use a Voltage divider on the sensor output to scale into a safe input range under 2.7v until this property is known.


Posts: 11908
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: MQ Gas sensor wire connection

Thu May 02, 2019 7:23 pm

As you have to power the MCP3008 from 3.3V to make it compatable with the pi gpio you are limited to using 3.3V as Vref, which means you are limited to max input voltage on 3.3V on the analogue inputs.

So to use you sensor with a 5V output you must reduce the voltage to 3.3V before connecting it to the MCP3008 using a potential divider as has already been suggested.
We want information… information… information no help
The use of crystal balls & mind reading are not supported

Return to “Advanced users”