CostasVav
Posts: 28
Joined: Fri Jan 30, 2015 10:49 pm

Multiple MQ-X sensors (TTL) possible?

Tue Feb 25, 2020 4:10 am

I am working on a project and I wish to have multiple MQ-X type sensors working on a Raspberry Pi 4. I have an order of 10 different gas sensors arriving, all with both analog and digital (TTL) output. Most important are the Methane, CO and H2S sensors.

It seems that the RPi has only 1 serial connection exposed through GPIO. I also have ordered a single USB-to-TTL adapter. Will I need to have 10x USB adapters? I thought I read that only 1 adapter works at a time, but correct me if I am wrong.

What would be the best approach to reading the TTL signal from all 10? Would I need a special microprocessor or an Arduino?

Thanks for any help!
Current Project: PiMac

markkuk
Posts: 234
Joined: Thu Mar 22, 2018 1:02 pm
Location: Finland

Re: Multiple MQ-X sensors (TTL) possible?

Tue Feb 25, 2020 11:48 am

The digital output from typical MQ-X sensor boards is a simple on/off signal that indicates if the sensor output is over a treshold set with a potentiometer on the board. "TTL" refers to voltage levels used on the connection. The USB to TTL serial converter you ordered is useless with the MQ-X sensors. If you want actual numerical gas concentration results from the sensors you need a 10-channel A/D converter, for example three ADS1015 boards.

CostasVav
Posts: 28
Joined: Fri Jan 30, 2015 10:49 pm

Re: Multiple MQ-X sensors (TTL) possible?

Tue Feb 25, 2020 8:38 pm

Thanks for the information, markkuk! I was suspicious that this was the case.

As the voltage from the MQ-X is 5V, I will need a 5V-3.3V shifter circuit between the sensor and A2D circuit, correct?

For a MQ-X sensor, would you think an MCP3008 would be enough, or go up to an ADS1015 or even 1115? Seems to be a tradeoff between accuracy and frequency.
Current Project: PiMac

Return to “Interfacing (DSI, CSI, I2C, etc.)”