I've a MQ 4 (smoke etc) sensor module, as listed here.
It has these inputs/outputs:
- VCC = +5V
- DOUT = digital out
- AOUT = analogue out
When I connect it to a voltmeter it outputs (DOUT) 3.1V when it's not detecting anything and 0.17V when it detects something (e.g. lighter gas).
What's bugging me is why Raspberry Pi does not detect the digital 1? but it only reads the GPIO pin value as 0, regardless of sensor detecting anything or not.
My first idea was that the digital 1 voltage is too low for the pin logic to detect it as such, but this specification says differently (if I understood correctly that the input high voltage should be at least 2V to register as digital 1).
FYI. the pin (header pin 13 = BCM GPIO 27 = GPIO/wiringPi 2) is setup as input & the wiring is triple-checked.