Ks0040 keyestudio Analog Gas Sensor: Difference between revisions
Jump to navigation
Jump to search
Keyestudio (talk | contribs) No edit summary |
Keyestudio (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 18: | Line 18: | ||
<br> | <br> | ||
==Connection Diagram == | ==Connection Diagram == | ||
<br>[[File: | <br>[[File:QQ图片20210715163303.png|700px|frameless|thumb]]<br> | ||
<br> | <br> | ||
==Sample Code == | ==Sample Code == | ||
Line 41: | Line 42: | ||
<br> | <br> | ||
== Result == | == Result == | ||
<br>[[File: | <br>[[File:QQ图片20210715163302.png|600px|frameless|thumb]]<br> | ||
Done wiring and powered up, upload well the code, then open the serial monitor and set the baud rate as 9600, you will see the analog value. When detecting the gas, the value will make a change. | Done wiring and powered up, upload well the code, then open the serial monitor and set the baud rate as 9600, you will see the analog value. When detecting the gas, the value will make a change. | ||
<br>[[File:KS0349 25-3.png|600px|frameless|thumb]]<br> | <br>[[File:KS0349 25-3.png|600px|frameless|thumb]]<br> | ||
<br> | <br> | ||
==Resources == | ==Resources == | ||
Line 51: | Line 53: | ||
http://video.keyestudio.com/ks0040/ | http://video.keyestudio.com/ks0040/ | ||
* '''PDF'''<br> | * '''PDF and Code'''<br> | ||
https:// | https://fs.keyestudio.com/KS0040 | ||
<br> | <br> | ||
==Buy from == | ==Buy from == | ||
Latest revision as of 16:42, 15 July 2021
Introduction
This analog gas sensor - MQ2 is used in gas leakage detecting equipment in consumer electronics and industrial markets.
This sensor is suitable for detecting LPG, I-butane, propane, methane, alcohol, Hydrogen and smoke. It has high sensitivity and quick response.
In addition, the sensitivity can be adjusted by rotating the potentiometer.
Specification
- Power Supply: 5V
- Interface Type: Analog
- Wide detecting scope
- Quick response and High sensitivity
- Simple drive circuit
- Stable and long lifespan
Connection Diagram
Sample Code
///Arduino Sample Code void setup() { Serial.begin(9600); //Set serial baud rate to 9600 bps } void loop() { int val; val=analogRead(0);//Read Gas value from analog 0 Serial.println(val,DEC);//Print the value to serial port delay(100); }
Result
Done wiring and powered up, upload well the code, then open the serial monitor and set the baud rate as 9600, you will see the analog value. When detecting the gas, the value will make a change.
Resources
- Video
http://video.keyestudio.com/ks0040/
- PDF and Code
https://fs.keyestudio.com/KS0040