Ks0041 keyestudio Analog Alcohol Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:


<br>
<br>
==Specification==
==Specification==
*Power Supply: 5V
*Power Supply: 5V
Line 18: Line 17:
<br>
<br>
==Connection Diagram ==
==Connection Diagram ==
<br>[[File:Ks0040-2.png|700px|frameless|thumb]]<br>
<br>[[File:QQ图片20210715163304.png|700px|frameless|thumb]]<br>


<br>
<br>
==Sample Code ==
==Sample Code ==
<pre>
<pre>
///Arduino Sample Code
///Arduino Sample Code
Line 40: Line 39:
<br>
<br>
== Result ==
== Result ==
<br>[[File:KS0349 26-2.png|600px|frameless|thumb]]<br>
<br>[[File:QQ图片20210715163305.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 alcohol 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 alcohol gas, the value will make a change.  
<br>[[File:KS0349 26-3.png|600px|frameless|thumb]]<br>
<br>[[File:KS0349 26-3.png|600px|frameless|thumb]]<br>
Line 53: Line 52:


* '''PDF and Code'''<br>
* '''PDF and Code'''<br>
https://drive.google.com/open?id=1pj450X_-swexzKBbjfFT9Qg9lGpdsnMh
https://fs.keyestudio.com/KS0041





Latest revision as of 16:45, 15 July 2021


Introduction

This analog gas sensor - MQ3 is suitable for detecting alcohol. It can be used in a breath analyzer.
It has good selectivity because it has higher sensitivity to alcohol and lower sensitivity to Benzine.
The sensitivity can be adjusted by rotating the potentiometer.

thumb


Specification

  • Power Supply: 5V
  • Interface Type: Analog
  • Quick response and High sensitivity
  • Simple drive circuit
  • Stable and long service life


Connection Diagram


thumb


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


thumb
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 alcohol gas, the value will make a change.
thumb



Resources

  • Video

http://video.keyestudio.com/ks0041/

  • PDF and Code

https://fs.keyestudio.com/KS0041



Buy from