Joy-it SEN-MQ4 User manual

www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
ANALOG NATURAL GAS AND METHANE
SENSOR
SEN-MQ4
1. GENERAL INFORMATION
Dear costumer,
thank you very much for choosing our product.
In following, we will introduce you to what to observe while starting up
and using this product.
Should you encounter any unexpected problems during use, please do
not hesitate to contact us.
Please note that the sensor requires a warm-up phase to pro-
vide accurate readings.

www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
2. COMMISSIONING WITH THE RASPBERRY PI
Raspberry Pi ADC MQ4V. Translator
GND (Pin 6, 14, 9...) GND GND (Pin 1)GND
5V (Pin 2, 4) VDD VCC (Pin2)VCCb
3V (Pin 1, 17) VCCa - -
BCM17 (Pin 11) - -A3
- B3 - D0 (Pin 3)
- A0 Signal (Pin 4)
SCL (Pin 5) - -A2
SDA (Pin 3) - -A1
- B2 SCL -
- B1 SDA -
Wiring:
This natural gas and me-
thane sensor is an analog
sensor.
Since the Raspberry Pi has
no analog inputs, you
have to use an analog-to-
digital converter. You will
also need a 3V to 5V volt-
age translator.
In this example the ADC
COM-KY053 and the Com-
KY051 voltage translator
from Joy-it is used.

www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
2. COMMISSIONING WITH THE RASPBERRY PI
Code example:
The higher the analog input voltage, the higher the measured natural gas or methane va-
lue.
The value range is from 0 to 5.
The D0 pin of the sensor is automatically set to LOW when the limit value is reached.
With the blue potentiometer on the board, you can set the limit value.
In the following code example, the analog value of the sensor is read out every 5 seconds
and displayed in the console.
from time import sleep
import board
import busio
import adafruit_ads1x15.ads1115 as ADS
from adafruit_ads1x15.analog_in import AnalogIn
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN)
# Create the I2C bus
i2c = busio.I2C(board.SCL, board.SDA)
# Create the ADC object using the I2C bus
ads = ADS.ADS1115(i2c)
ads.gain = 2/3
# Create single-ended input on channels
chan0 = AnalogIn(ads, ADS.P0)
chan1 = AnalogIn(ads, ADS.P1)
chan2 = AnalogIn(ads, ADS.P2)
chan3 = AnalogIn(ads, ADS.P3)
try:
while True:
if GPIO.input(17) == GPIO.LOW:
print("Warning: Limit exceeded!!!")
print("{:>5.3f}".format(chan0.voltage))
sleep(2.5)
except KeyboardInterrupt:
GPIO.cleanup()
Installation:
To be able to use the ADC, you must first enable I2C.
Enter the following command:
Navigate to Interfacing Options -> I2C and enable the I2C interface.
You must also install the Python library of the ADC.
Enter the following commands:
sudo raspi-config
sudo apt-get update
sudo apt-get install python3-pip
sudo pip3 install adafruit-circuitpython-ads1x15

www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
3. COMMISSIONING WITH THE ARDUINO
Arduino MQ4
GND GND (Pin1)
5V VCC (Pin2)
Digital Pin 8 D0 (Pin3)
Analog Pin A0 A0 (Pin4)
Wiring:
Code example:
The higher the analog input signal, the higher the measured natural gas or methane value.
The value range is from 0 to 1023.
The D0 pin of the sensor is automatically set to LOW when the limit value is reached.
With the blue potentiometer on the board, you can set the limit value.
In the following code example, the analog value of the sensor is read out every 5 seconds
and displayed on the serial monitor.
Before uploading, make sure that you have set the correct board and port in your Arduino
IDE.
void setup() {
Serial.begin(9600);
pinMode(A0, INPUT);
pinMode(8, INPUT);
}
void loop() {
if (digitalRead(8)==LOW){
Serial.println("Warning: Limit exceeded!!!");
}
Serial.println(analogRead(A0));
delay(5000);
}

www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
PR
Veröentlicht: 12.02.2020
www.joy-it.net
SIMAC Electronics GmbH
Pascalstr. 8, 47506 Neukirchen-Vluyn
4. ADDITIONAL INFORMATION
Our informaon and take-back obligaons according to the
Electrical and Electronic Equipment Act (ElektroG)
Symbol on electrical and electronic equipment:
This crossed-out dustbin means that electrical and electronic appliances do
not belong in the household waste. You must return the old appliances to a
collecon point.
Before handing over waste baeries and accumulators that are not en-
closed by waste equipment must be separated from it.
Return opons:
As an end user, you can return your old device (which essenally fulls the
same funcon as the new device purchased from us) free of charge for dis-
posal when you purchase a new device.
Small appliances with no external dimensions greater than 25 cm can be
disposed of in normal household quanes independently of the purchase
of a new appliance.
Possibility of return at our company locaon during opening hours:
Simac GmbH, Pascalstr. 8, D-47506 Neukirchen-Vluyn, Germany
Possibility of return in your area:
We will send you a parcel stamp with which you can return the device to
us free of charge. Please contact us by e-mail at Service@joy-it.net or by
telephone.
Informaon on packaging:
If you do not have suitable packaging material or do not wish to use your
own, please contact us and we will send you suitable packaging.
5. SUPPORT
If there are still any issues pending or problems arising aer your purcha-
se, we will support you by e-mail, telephone and with our ticket support
system.
E-Mail: service@joy-it.net
Ticket system: http://support.joy-it.net
Telephone: +49 (0)2845 98469-66 (10-17 o‘clock)
For further information please visit our website:
www.joy-it.net
Table of contents
Popular Gas Detector manuals by other brands

Xtralis
Xtralis VESDA ECO-EX Product Guide Addendum

Riken Keiki
Riken Keiki GD-K88Ai operating manual

ION
ION shawcity ARA DOCK4 quick start guide

CCI Controls
CCI Controls 7719 instructions

Elektrotechnik Schabus
Elektrotechnik Schabus GX-A1 operating instructions

RKI Instruments
RKI Instruments RIKEN RX-516 Operation manual