Ks0196 keyestudio PM2.5 Shield: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
==KS0196 keyestudio PM2.5 Shield==
[[image:ks0196.png|thumb|600px|right|Keyestudio GP2Y1014AU PM2.5 Dust Sensor Module]]
<br>[[File:ks0196.png|500px|frameless|thumb]]<br>


<br>
==Introduction==
==Introduction==
Dust Sensor based on Sharp optics works well in detecting very delicate particle, like cigarette smoke, is a commonly used system of air purifier.<br>
Keyestudio Dust sensor with Sharp GP2Y1014AU onboard works well in detecting very fine particle larger than 0.8μm in diameter, even like the cigarette smoke.<br>
This device contains IR LED and photoeletric transistor. Arranging them with across corners can detect the reflected light of dust in the air. It has a ultra-low power consumption(Max at 20mA, Typical at 11mA ), and can be equipped with sensors up to 7VDC. Analog voltage is proportional to measured concentration of dust , and sensitivity is 0.5V/0.1mg/m3.  <br>
It also has an IR LED and photoeletric transistor. Arranging them with across corners can detect the reflected light of dust in the air. <br>
<br>[[File:KS0196 (1).jpg|500px|frameless|thumb]]<br>
Ultra-low power consumption(max at 20mA, typical at 11mA), analog voltage output is liner with dust density. It can be equipped with sensors up to 7V DC. The sensitivity is 0.5V/(0.1mg/m3).


<br>
==Specification==
==Specification==
* Power Voltage: 5-7V
* Power Voltage: 5-7V
* Working Temperature: -10-65 ℃
* Working Temperature: -10℃ to 65 ℃
* Current Consumption:Max 20mA
* Operating Current: 20mA (max)
* Detecting Value of Minimum Particle: 0.
* Detecting Value of Minimum Particle: 0.8μm
* Sensitivity:0.5V/(0.1mg/m3)
* Sensitivity: 0.5V/(0.1mg/m3)
* Voltage of Cleaning Air: 0.9V(Typical)
* Voltage of Cleaning Air: 0.9V(typical)
* Storage Temperature:-20~80℃
* Storage Temperature: -20℃~80℃
* Service Life:5 Years
* Life time: 5 Years
* Size:62mm×32mm×20mm
* Dimension: 62mm×36mm×20mm
<br>[[File:图片1-ks0196.png|600px|frameless|thumb]]<br>


<br>
==Applications==
* Air Purifier
* Air Conditioner
* Air Monitor
* PM2.5 Detector
<br>
==Shipping List==
* Dust Sensor x 1
* ZH1.5MM 6-pin wire x 1
<br>[[File:Ks0196(3).png|500px|frameless|thumb]]<br>
<br>
==How to Use==
In case of working with a MCU:<br>
* VCC --------- 3V-5V
* GND --------- GND
* LED --------- MCU IO (module driving pin)
* OUT --------- MCU IO (analog output)
<br>
==Connection Diagram==
==Connection Diagram==
Project 1:<br>
*'''Project 1:'''<br>
<br>[[File:ks0196-1.png|500px|frameless|thumb]]<br>
<br>[[File:图片2- ks0196.png|700px|frameless|thumb]]<br>
 
<br>
*'''Project 2:'''<br>
<br>[[File:图片3- ks0196.png|700px|frameless|thumb]]<br>


Project 2:<br>
<br>
<br>[[File:ks0196-2.png|500px|frameless|thumb]]<br>


==Sample Code==
==Sample Code==
'''Download the Libraries of Wire and LiquidCrystal_I2C:''' [http://www.keyestudio.com/files/index/download/id/1506752792/]
*[https://drive.google.com/open?id=15LDlCdLMbjaDSuzerJaJwABrI45jPo8f Click here] to download the libraries;<br>
 
*[https://drive.google.com/open?id=1ae7LCOiy0D4WF9VGYmtczqRXhInRBRcm Click here] to download the code or directly copy the code below.<br>
'''Download the Code:''' [http://www.keyestudio.com/files/index/download/id/1506753178/] or you can directly copy the below code.
*Copy and paste the code below on [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE]. <br>


'''Project 1: The following are sample codes shown by official; when using it, just make a little change in the codes.<br>'''
*'''Code for Project 1:'''<br>
<pre>
<pre>
//pressing nothing to display value of analog revolving potentiometer
//pressing nothing to display value of analog revolving potentiometer
Line 80: Line 109:
</pre>
</pre>


'''Project 2: Now, use testing codes.<br>''''''
 
*'''Code for Project 2:'''<br>
<pre>
<pre>
int dustPin=0;
int dustPin=0;
Line 109: Line 139:
}
}
</pre>
</pre>
<br>


==Result==
==Result==
Result of Project 1 is shown as follows.<br>
* '''Result for Project 1:'''<br>
<br>[[File:ks0196-3.png|500px|frameless|thumb]]<br>
[[Image:图片4- ks0196.png|600px|frameless]]<br>
 
<br>
* '''Result of Project 2: open serial monitor to get the value shown below.'''<br>
[[File:图片5- ks0196.png|700px|frameless|thumb]]<br>
 
<br>
'''Data compared to air quality:'''<br>
* 3000 + = Very Bad <br>
* 1050-3000 = Bad <br>
* 300-1050 = Ordinary <br>
* 150-300 = Good <br>
* 75-150 = Very Good <br>
* 0-75 = Tiptop <br>


Result of Project 2: Open serial monitor, the value is displayed as follows.<br>
<br>
<br>[[File:ks0196-4.png|500px|frameless|thumb]]<br>


Data compared to air quality:<br>
3000 + = Very Bad <br>
1050-3000 = Bad <br>
300-1050 = Ordinary <br>
150-300 = Good <br>
75-150 = Very Good <br>
0-75 = Tiptop<br>


== Documents ==
== Documents ==
'''PDF:'''


http://www.keyestudio.com/files/index/download/id/1479180426/
*'''Download the Libraries and test code:''' <br>
 
https://fs.keyestudio.com/KS0196
 
 
<br>


'''Download the Libraries:'''
==Get One Now ==
*[https://www.keyestudio.com/new-keyestudio-gp2y1014au-pm25-detection-dust-sensor-module-for-arduino-for-air-condition-p0445-p0445.html  '''Official Website''' ]


http://www.keyestudio.com/files/index/download/id/1506752792/
*[https://www.amazon.com/dp/B07B2PFPB5  Shop on Amazon ]


'''Get the Code:'''
*[https://www.aliexpress.com/store/product/NEW-keyestudio-PM2-5-Shield-for-Arduino/1452162_32713460144.html?spm=2114.12010612.8148356.1.c088276fHz2QXi  Shop on Aliexpress]


http://www.keyestudio.com/files/index/download/id/1506753178/
*[https://www.ebay.com/itm/132584995344  Shop on eBay]


==Get One Now ==


http://www.keyestudio.com/ks0196-keyestudio-pm2-5-shield.html


[[Category: Shield]]
[[Category: Module]]

Latest revision as of 13:54, 6 January 2021

Keyestudio GP2Y1014AU PM2.5 Dust Sensor Module


Introduction

Keyestudio Dust sensor with Sharp GP2Y1014AU onboard works well in detecting very fine particle larger than 0.8μm in diameter, even like the cigarette smoke.
It also has an IR LED and photoeletric transistor. Arranging them with across corners can detect the reflected light of dust in the air.
Ultra-low power consumption(max at 20mA, typical at 11mA), analog voltage output is liner with dust density. It can be equipped with sensors up to 7V DC. The sensitivity is 0.5V/(0.1mg/m3).


Specification

  • Power Voltage: 5-7V
  • Working Temperature: -10℃ to 65 ℃
  • Operating Current: 20mA (max)
  • Detecting Value of Minimum Particle: 0.8μm
  • Sensitivity: 0.5V/(0.1mg/m3)
  • Voltage of Cleaning Air: 0.9V(typical)
  • Storage Temperature: -20℃~80℃
  • Life time: 5 Years
  • Dimension: 62mm×36mm×20mm


thumb


Applications

  • Air Purifier
  • Air Conditioner
  • Air Monitor
  • PM2.5 Detector


Shipping List

  • Dust Sensor x 1
  • ZH1.5MM 6-pin wire x 1


thumb


How to Use

In case of working with a MCU:

  • VCC --------- 3V-5V
  • GND --------- GND
  • LED --------- MCU IO (module driving pin)
  • OUT --------- MCU IO (analog output)


Connection Diagram

  • Project 1:


thumb


  • Project 2:


thumb


Sample Code

  • Code for Project 1:
//pressing nothing to display value of analog revolving potentiometer
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x27 for a 16 chars and 2 line display
int measurePin = 0; //Connect dust sensor to Arduino A0 pin
int ledPower = 2;   //Connect 3 led driver pins of dust sensor to Arduino D2
int samplingTime = 280;
int deltaTime = 40;
int sleepTime = 9680;
float voMeasured = 0;
float calcVoltage = 0;
float dustDensity = 0;
void setup(){
  lcd.init();                      // initialize the lcd 
  lcd.init();
  // Print a message to the LCD.
  lcd.backlight();
  lcd.setCursor(0,0);
  lcd.print("Raw Signal Value: ");
  lcd.setCursor(0,2);
  lcd.print("Voltage:");
  lcd.setCursor(0,3);
  lcd.print("Dust Density:");
  pinMode(ledPower,OUTPUT);
}
void loop(){
  digitalWrite(ledPower,LOW); // power on the LED
  delayMicroseconds(samplingTime);
  voMeasured = analogRead(measurePin); // read the dust value
  delayMicroseconds(deltaTime);
  digitalWrite(ledPower,HIGH); // turn the LED off
  delayMicroseconds(sleepTime);
  // 0 - 5V mapped to 0 - 1023 integer values
  // recover voltage
  calcVoltage = voMeasured * (5.0 / 1024.0);
  // linear eqaution taken from http://www.howmuchsnow.com/arduino/airquality/
  // Chris Nafis (c) 2012
  dustDensity = 0.17 * calcVoltage - 0.1;
  lcd.setCursor(1,1);
  lcd.print(voMeasured);
  lcd.setCursor(9,2);
  lcd.print(calcVoltage);
  lcd.setCursor(14,3);
  lcd.print(dustDensity);
  delay(1000);
}


  • Code for Project 2:
int dustPin=0;
float dustVal=0; 
int ledPower=2;
int delayTime=280;
int delayTime2=40;
float offTime=9680;

void setup(){
Serial.begin(9600);
pinMode(ledPower,OUTPUT);
pinMode(dustPin, INPUT);
}
 
void loop(){
// ledPower is any digital pin on the arduino connected to Pin 2 on the sensor
digitalWrite(ledPower,LOW); 
delayMicroseconds(delayTime);
dustVal=analogRead(dustPin); 
delayMicroseconds(delayTime2);
digitalWrite(ledPower,HIGH); 
delayMicroseconds(offTime);
 
delay(1000);
if (dustVal>36.455)
Serial.println((float(dustVal/1024)-0.0356)*120000*0.035);
}


Result

  • Result for Project 1:

图片4- ks0196.png


  • Result of Project 2: open serial monitor to get the value shown below.

thumb


Data compared to air quality:

  • 3000 + = Very Bad
  • 1050-3000 = Bad
  • 300-1050 = Ordinary
  • 150-300 = Good
  • 75-150 = Very Good
  • 0-75 = Tiptop



Documents

  • Download the Libraries and test code:

https://fs.keyestudio.com/KS0196



Get One Now