Joy-it SEN-MQ4 Manual 

Specifications

Brand: Joy-it
Category: Gas Detectors
Model: SEN-MQ4
File Type: PDF
File Size: —
Pages: 5

Read Online

Read the Joy-it SEN-MQ4 Manual  online using the built-in PDF viewer.

Text of the manual

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.

Pascalstr. 8 47506 Neukirchen-Vluyn

2. COMMISSIONING WITH THE RASPBERRY PI Raspberry Pi ADC MQ4 V. 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.

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

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); }

Pascalstr. 8 47506 Neukirchen-Vluyn

PR Veröffentlicht: 12.02.2020 www.joy-it.net SIMAC Electronics GmbH Pascalstr. 8, 47506 Neukirchen-Vluyn 4. ADDITIONAL INFORMATION Our information and take-back obligations 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 collection point. Before handing over waste batteries and accumulators that are not en- closed by waste equipment must be separated from it. Return options: As an end user, you can return your old device (which essentially fulfils the same function 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 quantities independently of the purchase of a new appliance. Possibility of return at our company location 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 [email protected] or by telephone. Information 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 after your purcha- se, we will support you by e-mail, telephone and with our ticket support system. E-Mail: [email protected] 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