Category :KOOKYE Kit


Arduino lesson – MQ-2 Smoke Sensor


In this project, we will go over how to build a smoke sensor circuit with an arduino board.

The smoke sensor we will use is the MQ-2. This is a sensor that is not only sensitive to smoke, but also to flammable gas.

The MQ-2 smoke sensor reports smoke by the voltage level that it outputs. The more smoke there is, the greater the voltage that it outputs. Conversely, the less smoke that it is exposed to, the less voltage it outputs.



  • Osoyoo UNO Board (Fully compatible with Arduino UNO rev.3) x 1
  • I2C LCD 1602 Display x 1
  • F/M jumpers
  • USB Cable x 1
  • PC x 1


  • Arduino IDE (version 1.6.4+)

About MQ2 Smoke Sensor

The MQ-2 smoke sensor is sensitive to smoke and to the following flammable gases:

  • LPG
  • Butane
  • Propane
  • Methane
  • Alcohol
  • Hydrogen

The resistance of the sensor is different depending on the type of the gas.

The smoke sensor has a built-in potentiometer that allows you to adjust the sensor sensitivity according to how accurate you want to detect gas.


1. Wide detecting scope
2. High sensitivity and fast response
3. Long life and stable
4. Simple drive circuit

Due to its fast response time and high sensitivity, measurements can be taken as soon as possible. The sensor sensitivity can be adjusted by using the potentiometer.

Standard Working Condition

Symbol Parameter Name Technical Condition Remarks
VC Circuit voltage 5V±0.1 AC or DC
VH Heating voltage 5V±0.1 AC or DC
RL Load resistance adjustable
RH Heater resistance 33Kohm±5% Room temperature
PH Heating consumption Less than 800mW

Environment Condition

Symbol Parameter Name Technical Condition Remarks
TO Operating Temp. -20°C-50°C
TS Storage Temp. -20°C-70°C
RH Relative Humidity <95%
O2 Oxygen Concentration 21%(standard condition) Oxygen concentration can affect sensitivity Minimum value is 2%

Sensitivity Characteristics

Symbol Parameter Name Technical Condition Remarks
RS Sensor Resistance 3Kohm-30Kohm (1000ppm iso-butane) Detecting concentration scope:
200ppm-5000ppm LPG and propane
300ppm-5000ppm butane
5000ppm-20000ppm methane
300ppm-5000ppm H2
100ppm-2000ppm Alcohol
α (3000ppm/1000ppm iso-butane) Concentration slope rate ≤0.6
Standard detecting Condition Temp.: 20°C±2°C VC: 5V±0.1
Humidity:65%±5% VH:5V±0.1
Preheating Time Over 24 hours

How does it Work?

The MQ2 has an electrochemical sensor, which changes its resistance for different concentrations of varied gasses. The sensor is connected in series with a variable resistor to form a voltage divider circuit , and the variable resistor is used to change sensitivity. When one of the above gaseous elements comes in contact with the sensor after heating, the sensor’s resistance change. The change in the resistance changes the voltage across the sensor, and this voltage can be read by a microcontroller. The voltage value can be used to find the resistance of the sensor by knowing the reference voltage and the other resistor’s resistance. The sensor has different sensitivity for different types of gasses. The sensitivity characteristic curve is shown below for the different type of gasses.

The voltage that the sensor outputs changes accordingly to the smoke/gas level that exists in the atmosphere. The sensor outputs a voltage that is proportional to the concentration of smoke/gas.

In other words, the relationship between voltage and gas concentration is the following:

  • The greaterthe gas concentration,the greaterthe output voltage
  • The lowerthe gas concentration,the lowerthe output voltage

Working Mechanism

The output can be an analog signal (A0) that can be read with an analog input of the Arduino or a digital output (D0) that can be read with a digital input of the Arduino.


The sensor value only reflects the approximated trend of gas concentration in a permissible error range, it DOES NOT represent the exact gas concentration. The detection of certain components in the air usually requires a more precise and costly instrument, which cannot be done with a single gas sensor. If your project is aimed at obtaining the gas concentration at a very precise level, then we don’t recommend this gas sensor.

Gas Detection : Basic Example

In this example, the sensor is connected to A0 pin. The voltage read from the sensor is displayed. This value can be used as a threshold to detect any increase/decrease in gas concentration.

void setup() {

void loop() {
    float sensor_volt;
    float sensorValue;

    sensorValue = analogRead(A0);
    sensor_volt = sensorValue/1024*5.0;

    Serial.print("sensor_volt = ");

Measurement : Approximation

These examples demonstrate ways to know the approximate concentration of Gas. As per the data-sheet of the MQx sensors, these equations are tested for standard conditions and are not calibrated. It may vary based on change in temperature or humidity.

  • Keep the Gas Sensor in clean air environment. Upload the program below.
void setup() {

void loop() {
    float sensor_volt;
    float RS_air; //  Get the value of RS via in a clear air
    float R0;  // Get the value of R0 via in H2
    float sensorValue;

    /*--- Get a average data by testing 100 times ---*/
    for(int x = 0 ; x < 100 ; x++)
        sensorValue = sensorValue + analogRead(A0);
    sensorValue = sensorValue/100.0;

    sensor_volt = sensorValue/1024*5.0;
    RS_air = (5.0-sensor_volt)/sensor_volt; // omit *RL
    R0 = RS_air/9.8; // The ratio of RS/R0 is 9.8 in a clear air from Graph (Found using WebPlotDigitizer)

    Serial.print("sensor_volt = ");

    Serial.print("R0 = ");

  • Then, open the serial monitor of Arduino IDE. Write down the value of R0 and this will be used in the next program. Please write down the R0 after the reading stabilizes.Replace the R0 below with value of R0 tested above . Expose the sensor to any one of the gas listed above.
void setup() {

void loop() {

    float sensor_volt;
    float RS_gas; // Get value of RS in a GAS
    float ratio; // Get ratio RS_GAS/RS_air
    int sensorValue = analogRead(A0);
    RS_gas = (5.0-sensor_volt)/sensor_volt; // omit *RL

          /*-Replace the name "R0" with the value of R0 in the demo of First Test -*/
    ratio = RS_gas/R0;  // ratio = RS/R0

    Serial.print("sensor_volt = ");
    Serial.print("RS_ratio = ");
    Serial.print("Rs/R0 = ");




Arduino MQ-2 Smoke Alarm

The circuit we will build is shown below.

Arduino MQ-2 smoke sensor circuit

So to power the smoke sensor, we connect pin 2 of the smoke sensor to the 5V terminal of the arduino and terminal 3 to the GND terminal of the arduino. This gives the smoke sensor the 5 volts it needs to be powered.

The output of the sensor goes into analog pin A0 of the arduino. Through this connection, the arduino can read the analog voltage output from the sensor. The arduino board has a built-in analog-to-digital converter, so it is able to read analog values without any external ADC chip.

Depending on the value that the arduino reads determines the action that will occur with the circuit. We will make it in our code that if the sensor outputs a voltage above a certain threshold, the buzzer will go off, alerting a user that smoke has been detected.

These are all the physical connections in order for our circuit to work.

Code for the Arduino MQ-2 Smoke Sensor Circuit

Being that we’ve just gone over the circuit schematic for the smoke sensor circuit, all we need know is the code necessary to upload to the arduino for this smoke alarm cicrcuit to work.

The code that we need to upload is shown below.

/*Code for MQ-2 Smoke Sensor Circuit Built with an Arduino Board*/

const int sensorPin= 0;
const int buzzerPin= 13;
int smoke_level;

void setup() {
Serial.begin(115200); //sets the baud rate for data transfer in bits/second
pinMode(sensorPin, INPUT);//the smoke sensor will be an input to the arduino
pinMode(buzzerPin, OUTPUT);//the buzzer serves an output in the circuit

void loop() {
smoke_level= analogRead(sensorPin); //arduino reads the value from the smoke sensor
Serial.println(smoke_level);//prints just for debugging purposes, to see what values the sensor is picking up
if(smoke_level > 200){ //if smoke level is greater than 200, the buzzer will go off
digitalWrite(buzzerPin, HIGH);
digitalWrite(buzzerPin, LOW);

The first block of code declares and initializes 3 variables. The sensorPin represents the smoke sensor. It is initialized to 0, because it will be connected to analog pin A0 of the arduino board. The next variable, buzzerPin, represents the pin that the anode of the buzzer will be connected to; it is initialized to 12 because it will be connected to digital pin D12 of the arduino board. And the variable, smoke_level, represents the amount of smoke that the smoke sensor picks up.

The next block of code defines the baud rate and the input and output of the circuit. The sensorPin, which is the smoke sensor pin, serves as the input of the circuit. This sensor is input into the arduino so that the arduino can read and process the value. The buzzerPin serves as the output. If the smoke level is above a certain threshold, the output of the circuit, the buzzer, will go off.

The next block of code uses the analogRead() function to read the value from the sensorPin (the smoke sensor). This will be a numerical value from 0 to 1023. 0 represents no smoke, while 1023 represents smoke at the absolute maximum highest level. So the variable, smoke_level, represents the smoke level that can range from 0 to 1023. We put a line to print this value just for debugging purposes, so that you can see what values are being returned from this function. In our code, we make it so that if the smoke level rises above 200, we will trigger the buzzer to sound by sending the digital pin D12 high. So 200 is our threshold level. If the smoke level is below this value, then the buzzer does not go off.

This last block of code was the loop() function. This is the part of code that repeats over and over in an infinite loop. This means that our code is always checking to see what the smoke_level is, so that it can know whether to trigger the buzzer or not.

And this is how a smoke sensor works with


KOOKYE Universal Starter Kits V2 for Arduino Beginner


The  basic Kit for Arduino is designed to achieve the goal, a quick start for beginners and to do experiments with advance embedded system for experience professionals. Much like the Osoyoo Basic Kit before it — but better! Bridging the gap between the “real life” and your computer, the Osoyoo Advanced Kit for Arduino takes you further into the world of physical computing. The Advanced Kit has more components and sensors you need to play compared with the Basic Kit. You’ll experience what the tens of thousands of engineers, designers, artists and hobbyists already know about this awesome and educational prototyping platform.

With this kit ,we will take you from knowing to utilizing ,you are able to do more experiment , get your more idea into real action without the restriction of hardware and software.

KOOKYE Universal Starter Kits for NodeMCU IoT and Arduino Beginner

This Arduino Starter Kit is a very good do-and-learn package for starter to study MCU(microcontroller unit) programming. With this Starter Kit, you are able to do and learn many Arduino lab project such as imitating pedestrian traffic light with button and LEDs, displaying text string with Liquid Crystal Display(LCD) and using Potentiometer to control servo motor, etc.

Also you can learn the basic concepts of buttons, resistors, sensors,IR remote control and receivers, how to use sensors to detect environment(i.e light, temperature), and how to use 74HC595 Shifting Register IC to extend Arduino Digital Ports.

Every project in this starter kit has detailed circuit graph, step-by-step tutorial and fully-tested Arduino sample codes which can save lots of your research time and speed up your learning progress.

After you finishes all the projects in this kit, you are no more a beginner! You become an intermediate Arduino player!

Buy From Amazon

Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

Simple Tutorials:

P1: Flashing LEDs TUTORIAL
P2: Using photoresistor to detect light TUTORIAL
P3: Use potentiometer to control a servo TUTORIAL
P4: Decode IR Controller with IR Receiver TUTORIAL
P5: TMP36 temperature sensor project TUTORIAL
P6: Control traffic lights with a push button TUTORIAL
P7: Tilt Sensor Test Project TUTORIAL
P8: 16×2 I2C LiquidCrystal Display(LCD) TUTORIAL
P9: Serial to Parallel Shifting-Out with a 74HC595 TUTORIAL
P10:Display 4-digit numbers on a 5643 Dixie LED tube TUTORIAL
P11:Display 1-digit 0 to 9 in 7-seg Nixie LED Tube TUTORIAL
P12:Project to Test BYJ48 Stepper Motor TUTORIAL
P13:Use potentiometer to control a servo TUTORIAL
P14:Test Piezo Buzzer TUTORIAL
P15:How to read resistor color code TUTORIAL
P16:Use DHT11 detect the temperature and humidity TUTORIAL
P17:Ultrasonic distance sensor project TUTORIAL
P18:Dot matrix LED display project TUTORIAL
P19:Infrared obstacle avoidance test TUTORIAL

Package Included:

  • Pictures Content
  • UNO R3 1* UNO R3 Board and cable(fully compatible with Arduino UNO R3)
  • led light 24* LED(6*white, 6*Red, 6*Yellow, 6*Green)
  • DKST100100-4-Digit led 1* 4-Digit 7 segment LED display
  • DKST100100-1-Digit led 1* 1-Digit 7 segment LED display
  • Photoressitor 3* Photoressitor (Light sensor)
  • Potentionmeter 1* Potentionmeter(10k adjustable resistor)
  • 74HC595 Shifting register 1* 74HC595 Shifting register
  • I2c display 1* I2c display(16*2)
  • Stepper Motor+Bridge 1* Stepper Motor+Bridge
  • Piezo Buzzer 1* Piezo Buzzer
  • SG90 1* SG90 servo motor
  • Tilt Sensor(SW-520D) 1* Tilt Sensor(SW-520D)
  • DHT11 Humidity sensor 1* DHT11 Humidity sensor
  • DKST100100-TMP36 1* Temperature sensor TMP36
  • HC-SR04 1* Ultrasonic module HC-SR04
  • Obstacle avoidance 1* Obstacle avoidance sensor
  • Infrared remote 1* Infrared remote controller and receiver
  • Push buttons 5* Push buttons
  • Acrylic base 1* Acrylic base plate
  • breadboard 1* Solderless prototype breadboard
  • Resistors Resistors:
    15* Resistors(200 ohm)
    15* Resistors(470 ohm)
    15* Resistors(10K ohm)
  • jump wire Jumper Wires:
    40* 12cm male-male jumper
    15* 15cm male-male jumper
    5* 20cm & 25cm male-male jumper
    8* 20cm female-female jumper

Arduino is the largest open-source hardware platform in the world and offers infinite possibilities on what you can achieve using simple microcontroller-based products. Learning how to program using the Arduino platform is a never-ending process. New hardware is designed and unveiled to the market every day, but the good thing is that the basics remain the same.

The Arduino has the best features over any other microcontroller. See a few below:

  • Programming is straightforward.
  • USB cable is used directly.
  • Whether your electronics or robotics project is easy or complex, you can make it quick and efficient with Arduino
  • It can be run from a 5v battery.
  • The Arduino IDE software is easy to understand.
  • The code will be uploaded easily with a basic understanding of C programming language.

This kit includes a selection of the most common and useful electronic components as below list. The Main board included in the Kit is the UNO board, which is totally compatible with Arduino UNO R3. It uses the best quality of material but sells in a much lower price. The Osoyoo UNO board you received is fully tested with preloaded firmware.With the help of this kit combo you can design 13 different projects as per the below mention list.

In addition to a complete set of hardware components the kit has a DVD provide detailed tutorials that you can follow. Starting with some simple LED projects and then moving on to more complicated projects using different modules and sensors, this kit aims to teach users about basic electronics theory, physical computing and how to use Arduino.They come with detailed explanations of the components involved in the projects, fritzing diagrams of the hardware connections and sample codes. The projects progress from the easiest beginner-level tutorials to more complex tutorials for advanced users. These tutorials as well as online tutorials available on the Osoyoo website and blogs will provide you with enough material for your learning needs. After you are done with the tutorials, you should be able to make your own projects using the different components the kit has.

Arduino Lessons Content List:

Arduino Lesson 1
What is Arduino?

Arduino Lesson 2
Osoyoo UNO Board

Arduino Lesson 3
Download and Install Arduino IDE
Arduino Lesson 4
What is a Sketch and how does it work?
Arduino Lesson 5
How to Install Additional Arduino Libraries
Arduino Lesson 6
Hello World
Arduino Lesson 7
Arduino Lesson 8
Arduino Lesson 9
Eight of Flowing Water Light
Arduino Lesson 10
PWM Control LED Brightness(Breathing Light)

Arduino Lesson 11

Arduino Lesson 12
Arduino Lesson 13

Arduino Lesson 14

Arduino Lesson 15
The Serial Monitor

Arduino Lesson 16
I2C LCD1602 Display

Arduino Lesson 17

Arduino Lesson 18
One Digit 7-Segment LED Display

Arduino Lesson 19
4 Digit 7 Segment LED Display

Arduino Lesson 20

Arduino Lesson 21
SW-520D Tilt Sensor

Arduino Lesson 22

Arduino Lesson 23
74HC595 with one digit 7-segment led display

Arduino Lesson 24
Digital Dice

Arduino Lesson 25
Traffic Light Controller

Arduino Lesson 26
IR RemoteControl

Arduino Lesson 27
Stepper Motor

Arduino Lesson 28
Stepper Speed Control

Arduino Lesson 29

Arduino Lesson 30
8×8 LED Matrix

Arduino Lesson 31
DHT11 Sensor

Arduino Lesson 32
555 Timer IC

Arduino Lesson 33
2-Channel Relay Module

Arduino Lesson 34
Sound Detection Sensor

Arduino Lesson 35
Ultrasonic Sensor HC-SR04

Arduino Lesson 36
PIR Motion Sensor

We provide the above lessons for now. More lessons will be added in the future.
Last but not the least, work out what you will be doing with your kit and what things you already have. Make a list of the things you will need and how you will design your project. This is one of the most important considerations while choosing the best Osoyoo starter kit.


KOOKYE HDMI Extender LKV373A V3.0 Receiver + Sender ( RX+TX)

KOOKYE HDMI Extender LKV373A V3.0 RX Receiver TX Sender Over Single Cat5/5e/6 Ethernet Cable Up To 390 Feet Supports 1080P, HD Audio, Deep Color For HD DVD PS3

Transmit HDMI signal over network cable–LKV373 converts the HDMI signal to standard network signal and transfered by existing CAT5/5e/ cable to long distance,it saves your cost of rewiring greatly.
LKV373 takes the advantages of the latest transmission technology to xetend your HDMI video with the resolution up to 1080P@60Hz up to 120m/394ft over single network cable.

Buy from America Buy from Europe Buy from Japan
amzus amzuk AMAZON-jp
  • SUPER LONG DISTANCE TRANSMISSION–It enables you to extend HDMI signal over a single CAT6 up to 120m/390ft, and if connected with LAN router or switch, you can extend your HDMI signal to anywhere you want.
  • STRONGER COMPATIBLITY–It has better compatibility with HDMI source devices, display devices and net work cables. It supports DVD, PS3,STB,PC with HDMI output interface,SDTV, projector with HDMI input port, and UTP/STP CAT5/5e/ network cables.
  • UP TO 1920*1080 RESOLUTIONS–The latest V3.0 technology has improved & optimized picture quality, to bring a clearer transmission effect up to 1080 without trailing and ghosting.
  • 7*24 HOURS OF CONTINUOUS WORK–It adopt more professional industrial and ESD electrostatic protection circuit design for better heat dissipation for your industrial application.
  • FUNCTIONAL AS EXTENDER &SPLITTER–By connecting your LAN router or switch, 1 SENDER (TX) can connect with multiple receivers(RX), to be used as HDMI splitter, to meet your different installation requirements.

01 02 03 04 05 06 07 08 09

HDMI Signal:HDMI1.3, Compatible with HDCP1.2
Transport Protocol:HDbitT
Network Cable:UTP/STP CAT5/5e/6
Supports Resolutions:480i@60Hz,480p@60Hz,576i@50Hz,576p@50Hz,720p@50/60Hz,1080i@50/60Hz,1080p@50/60Hz
Transmission Distance:Up to 120m transmission distance for 1080P full HD over single CAT6.
CAT 80m/CAT5e 100m/CAT5 120m
Working Temperature:0℃-60℃
Power Supply: DC5V/3A

Package Contents:
1x HDMI Extender Transmitter
1x HDMI Extender Receiver
2x Adapter
1x User Manual

The Related Article: The Frequently Asked Questions about LKV373 HDMI extender



KOOKYE HDMI Extender LKV373 V2.0 Receiver + Sender (RX+TX)

KOOKYE LKV373 V2.0 HDMI Sender + Receiver 1080P 120m/390ft Extender TX + RX Over Ethernet 100M LAN CAT5 CAT6 For HD DVD PS3

  • CONNECTION–LKV373 can connect the HDMI output devices (such as HD camera, Blu ray) to the HDMI display by using cat 5e/6 cable for long distances instead of expensive HDMI cable, you can also use existing remote control to control the devices from long distances.
  • HDMI NETWORK EXTENDER–LKV373 converts the HDMI signal to standard TCP/IP and transfer by CAT5e/6 cable to make the transmission distance as long as 120 meter. With router or repeater to cascade connection.It can extend your HDMI signal unlimitedly.
  • NETWORK SPLITTER TECHNOLOGY–Applied to unique HMDI extension technology,1PCS sender can connect with N pcs receivers.In theroy,the max.can be 253 pcs. LKV373 can be used as the HDMI splitter according to the customer’s demand.
  • STANDARD NETWORK TRANSMISSION PROTOCOL–LKV373 transmits HDMI single RJ45 cable and this product supports all HDMI features including full HD 1080p,deep color,lip sync and CEC.And the product also supports all high resolution multichannel audio formats including Dolby Digital Plus, 7.1 LPCM, Dolby TrueHD and DTS Master Audio.
  • WIDE APPLICATION–LKV373 can be used in the LCD and plasma flat panel multimedia advertising project,Big screen LED curtain wall display project,The large projection equipment display system,The industrial automation and control system,Audio/Video meeting system,Medical monitoring system and so on.

Buy it on amazon US:

LKV373 kookye-01

LCD and plasma flat panel multimedia advertising project
Big screen LED curtain wall display project
The large projection equipment display system
The industrial automation and control system
Audio/Video meeting system
Medical monitoring system
Security monitoring system
Multimedia network education system
Long-distance network server monitoring
Central control system
Military exercises command system
ertising transmission

Weight:0.126 Kg
Material:Alumina based material

Support HDCP version:HDCP1.2
Input HDMI resolution:480i@60Hz、480p@60Hz、576i@50Hz、576p@50Hz、720p@50/60Hz、1080i@50/60Hz、1080p@50/60Hz;
Output HDMI resolution:480p@60Hz、576p@50Hz、720p@50/60Hz、1080p@50/60Hz
Support video color format:24bit/Deep color 30bit/Deep color 36bit
Support audio format:PCM
Max transmission rate:80Mbps
Audio signal transmission format:L/R stereo audio
TMDS signal:0.5-1.5Vp-p (TMDS)
DDC signal:5Vp-p(TTL)
Connector Type:RJ45
Interface:single cat5
Power supply
Voltage range:DC5V

Package Includes:
1x HDMI Sender
1x HDMI Receiver
2x Adapters and 1x User Manual