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 https://tutorials-raspberrypi.com/confi ... 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 https://www.circuito.io/app?components= ... 000,398790
Thank you.
-
- Posts: 28
- Joined: Thu Sep 27, 2018 9:52 am
MQ Gas sensor wire connection
- Attachments
-
- Capture.PNG (109.15 KiB) Viewed 969 times
Re: MQ Gas sensor wire connection
I don't know much about gas sensors. But I think Circuits.io is correct/safe. It's a risk to take
. And don't blame me if anything goes wrong.

- Joel_Mckay
- Posts: 295
- Joined: Mon Nov 12, 2012 10:22 pm
- Contact: Website
Re: MQ Gas sensor wire connection
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.
https://en.wikipedia.org/wiki/Voltage_divider

https://en.wikipedia.org/wiki/Voltage_divider

Re: MQ Gas sensor wire connection
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.
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 information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported