Ks0132 keyestudio EASY plug Analog Alcohol Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 2: Line 2:


==Introduction==
==Introduction==
This analog gas sensor - MQ3 is suitable for detecting alcohol. It can be used in a Breath analyzer. Also it has high sensitivity to alcohol and low sensitivity to Benzine.  
This analog gas sensor - MQ3 is suitable for detecting alcohol. It can be used in a Breath analyzer. Also it has high sensitivity to alcohol and low sensitivity to Benzine. <br>
The sensitivity can be adjusted by a blue potentiometer on the sensor.<br>
The sensitivity can be adjusted by a blue potentiometer on the sensor.<br>
<span style="color: red">'''Note: ''' this module should be used together with EASY plug control board.<br>
<span style="color: red">'''Note: ''' this module should be used together with EASY plug control board.<br>
Line 15: Line 15:
* Quick response and High sensitivity
* Quick response and High sensitivity


 
<br>
==Technical Details==
==Technical Details==
* Dimensions: 56mm*20mm*18mm
* Dimensions: 56mm*20mm*18mm
* Weight: 7.5g
* Weight: 7.5g
<br>
<br>
==Connect It Up ==
==Connect It Up ==
Connect the EASY Plug analog alcohol sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
Connect the EASY Plug analog alcohol sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
Line 27: Line 27:
<br>
<br>
==Upload the Code==
==Upload the Code==
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload.
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<pre>
<br>[[File:ks0397 17.1.png|500px|frameless|thumb]]<br>
int gas_din=2;
int gas_ain=A7;
int led=13;
int ad_value;
void setup()
{
  pinMode(led,OUTPUT);
  pinMode(gas_din,INPUT);
  pinMode(gas_ain,INPUT);
  Serial.begin(9600);
}
void loop()
{
  ad_value=analogRead(gas_ain);
  if(digitalRead(gas_din)==LOW)
  {
    digitalWrite(led,HIGH);
    Serial.println("Alcohol leakage ");
    Serial.println(ad_value);
  }
  else
  {
    digitalWrite(led,LOW);
Serial.println("Alcohol not leak");
Serial.println(ad_value);
  }
  delay(500);
}
</pre>


<br>
<br>
==What You Should See==
==What You Should See==
Done uploading the code, open the serial monitor and set the baud rate to 9600. If the sensor detects the alcohol in the air, you should see the value change and the character "Alcohol leakage".  
<br>[[File:ks0397 17-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0132 Result.gif|700px|frameless|thumb]]<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600. If the sensor detects the alcohol in the air, you should see the value change.
<br>[[File:ks0397 17-2.png|500px|frameless|thumb]]<br>
<br>
 
==Extension Experiment==
<br>
<span style=color:brown>'''Adding LCD Display'''</span><br>
<br>
<br>
'''Hookup Guide'''<br>
Connect the EASY Plug alcohol sensor and LCD module to control board using RJ11 cables. <br>
<br>[[File:气体LCD.jpg|500px|frameless|thumb]]<br>


<br>
'''Test Code'''<br>
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<br>[[File:ks0397 17.2.png|500px|frameless|thumb]]<br>
<br>
'''What You Should See'''<br>
<br>[[File:ks0397 17-3.png|500px|frameless|thumb]]<br>
<br>
Upload success, you should be able to see the alcohol value is showed on the LCD screen. 
<br>[[File:ks0397 17-4.png|500px|frameless|thumb]]<br>
If you can’t see the data clearly, you should rotate the potentiometer on the back of LCD display to adjust the backlight.
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
<br>
<br>
==Resources ==
==Resources ==
'''Download the PDF:'''<br>
'''Download the Arduino Code and Datasheet:'''<br>
https://drive.google.com/open?id=1gmQEiYVBBGhconDRPIVlk7cxvtV65L-S
https://drive.google.com/open?id=1JzAc9wdpczmyAp0Dk3pmnpELvIQsM1D_


'''Download the Code:'''<br>
'''Download the Mixly Code and Datasheet:'''<br>
https://drive.google.com/open?id=1wRox6Hxq1ZXvxQ9MBxbVaaDcShR1VU7h
https://drive.google.com/open?id=1lQAF_hxpkgcB0cZG6juYkmmj-1j5TYkF




<br>
<br>
==Buy from ==
==Buy from ==
*'''Official Website:''' http://www.keyestudio.com/ks0132.html
*[https://www.keyestudio.com/keyestudio-easy-plug-analog-alcohol-ethanol-sensor-mq-3-breath-gas-detection-for-arduino-steam-p0065-p0065.html '''Official Website''' ]


*[https://www.aliexpress.com/store/product/NEW-Keyestudio-EASY-plug-Analog-Alcohol-Sensor-MQ-3-for-arduino-starter/1452162_32647216522.html?spm=2114.12010612.8148356.68.24f04ba7fqaskB  Shop on aliexpress]
*[https://www.aliexpress.com/store/product/NEW-Keyestudio-EASY-plug-Analog-Alcohol-Sensor-MQ-3-for-arduino-starter/1452162_32647216522.html?spm=2114.12010612.8148356.68.24f04ba7fqaskB  Shop on aliexpress]

Revision as of 14:39, 7 May 2019

Keyestudio EASY plug Analog Alcohol Sensor

Introduction

This analog gas sensor - MQ3 is suitable for detecting alcohol. It can be used in a Breath analyzer. Also it has high sensitivity to alcohol and low sensitivity to Benzine.
The sensitivity can be adjusted by a blue potentiometer on the sensor.
Note: this module should be used together with EASY plug control board.


Specification

  • Connector: Easy plug
  • Power supply: 5V
  • Sensor type: Digital and Analog
  • Simple drive circuit
  • Stable and long service life
  • Quick response and High sensitivity


Technical Details

  • Dimensions: 56mm*20mm*18mm
  • Weight: 7.5g


Connect It Up

Connect the EASY Plug analog alcohol sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See


thumb
Done uploading the code, open the serial monitor and set the baud rate to 9600. If the sensor detects the alcohol in the air, you should see the value change.
thumb

Extension Experiment


Adding LCD Display

Hookup Guide
Connect the EASY Plug alcohol sensor and LCD module to control board using RJ11 cables.

thumb


Test Code
Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See

thumb

Upload success, you should be able to see the alcohol value is showed on the LCD screen.
thumb
If you can’t see the data clearly, you should rotate the potentiometer on the back of LCD display to adjust the backlight.
thumb


Resources

Download the Arduino Code and Datasheet:
https://drive.google.com/open?id=1JzAc9wdpczmyAp0Dk3pmnpELvIQsM1D_

Download the Mixly Code and Datasheet:
https://drive.google.com/open?id=1lQAF_hxpkgcB0cZG6juYkmmj-1j5TYkF



Buy from