Arduino 各种模块篇 粉尘传感器 dust sensor 空气质量检测
2013-10-24 18:02
866 查看
Testing a sensor from here.
http://www.seeedstudio.com/wiki/Grove_-_Dust_Sensor
It's a dust sensor. Everyone can buy it anywhere also. It's a cheep one actually.
We can find its document here: http://www.seeedstudio.com/wiki/images/4/4c/Grove_-_Dust_sensor.pdf
It looks good.
It's more cheaper if you buy it from taobao.com or other whole sellers.
Now cut the crap, just send me those codes here:
Here's what you can get
via serial promte, you can see:
For more information , you can check this out the link above.
Now please let me explain it from the bottom of it:
Let's see what the spec sheet carve of it:
The curve indicates that the bigger of the Concentration value is, the higher of the Low Pluse Occupancy will be.
So what's the Low Pulse Occupancy Time perentage for?
Let's check out this:
we count the time from the starting moment of the low pulse begins until the moment of next high pulse stops.
The time we can get is the cycle period. We can caculate the ratio of the LowPluseOccupancyTime/TheTimeWeSetToMeasure
# radio = LowPluseOccupancyTime/TheTimeWeSetToMeasure
With help of the chart which indicates the relationship of between the LowPulseOccupancyTimePercentage and the concentration, we can get the air quality value.
the unit of the concentration is : PCS/Liter.
PCS/liter is short for Particals / Liter
####################3
P.S. : There is another good air quality measuring module which looks like this :https://www.sparkfun.com/products/9689
I haven't tested it. But it looks neat and somehow better I guess.
So my next project will have something to do with a LIVE BROADCASTING AIR QUALITY STATION!
Let's see :)
http://www.seeedstudio.com/wiki/Grove_-_Dust_Sensor
It's a dust sensor. Everyone can buy it anywhere also. It's a cheep one actually.
We can find its document here: http://www.seeedstudio.com/wiki/images/4/4c/Grove_-_Dust_sensor.pdf
It looks good.
It's more cheaper if you buy it from taobao.com or other whole sellers.
Now cut the crap, just send me those codes here:
/* Grove - Dust Sensor Demo v1.0 Interface to Shinyei Model PPD42NS Particle Sensor Program by Christopher Nafis Written April 2012 http://www.seeedstudio.com/depot/grove-dust-sensor-p-1050.html http://www.sca-shinyei.com/pdf/PPD42NS.pdf JST Pin 1 (Black Wire) => Arduino GND JST Pin 3 (Red wire) => Arduino 5VDC JST Pin 4 (Yellow wire) => Arduino Digital Pin 8 */ int pin = 8; unsigned long duration; unsigned long starttime; unsigned long sampletime_ms = 30000;//sampe 30s ; unsigned long lowpulseoccupancy = 0; float ratio = 0; float concentration = 0; void setup() { Serial.begin(9600); pinMode(8,INPUT); starttime = millis();//get the current time; } void loop() { duration = pulseIn(pin, LOW); lowpulseoccupancy = lowpulseoccupancy+duration; if ((millis()-starttime) > sampletime_ms)//if the sampel time == 30s { ratio = lowpulseoccupancy/(sampletime_ms*10.0); // Integer percentage 0=>100 concentration = 1.1*pow(ratio,3)-3.8*pow(ratio,2)+520*ratio+0.62; // using spec sheet curve Serial.print(lowpulseoccupancy); Serial.print(","); Serial.print(ratio); Serial.print(","); Serial.println(concentration); lowpulseoccupancy = 0; starttime = millis(); } }
Here's what you can get
via serial promte, you can see:
For more information , you can check this out the link above.
Now please let me explain it from the bottom of it:
Let's see what the spec sheet carve of it:
The curve indicates that the bigger of the Concentration value is, the higher of the Low Pluse Occupancy will be.
So what's the Low Pulse Occupancy Time perentage for?
Let's check out this:
we count the time from the starting moment of the low pulse begins until the moment of next high pulse stops.
The time we can get is the cycle period. We can caculate the ratio of the LowPluseOccupancyTime/TheTimeWeSetToMeasure
# radio = LowPluseOccupancyTime/TheTimeWeSetToMeasure
With help of the chart which indicates the relationship of between the LowPulseOccupancyTimePercentage and the concentration, we can get the air quality value.
the unit of the concentration is : PCS/Liter.
PCS/liter is short for Particals / Liter
####################3
P.S. : There is another good air quality measuring module which looks like this :https://www.sparkfun.com/products/9689
I haven't tested it. But it looks neat and somehow better I guess.
So my next project will have something to do with a LIVE BROADCASTING AIR QUALITY STATION!
Let's see :)
相关文章推荐
- Linkit 7688 DUO(四): 接上各种Arduino传感器和模块——基础篇
- Arduino 各种模块篇 可燃气体检测模块 inflammable air sensor
- Arduino 各种模块篇 声控传感器 声音检测模块 口哨模块 vocie sensor
- Linkit 7688 DUO(五) 接上各种Arduino传感器和模块—扩展篇
- Arduino 各种模块篇 火焰传感器
- Arduino 各种模块篇 震动模块 常开 震动传感器模块
- Arduino 各种模块篇 motor shield 电机扩展板 介绍 及 步进电机使用(stepper!)
- 用arduino直接检测电容值:一个不用外围电路的简易触摸传感器
- Arduino 各种模块篇 GPRS module 手机模块 短信 电话 上网 for texting, calling, internet
- Arduino Uno PM2.5粉尘传感器(GP2Y1010AU0F) 看看家里的空气质量
- Arduino 各种模块篇-继电器
- Arduino 各种模块篇 震动模块 vibrator module
- Arduino 各种模块篇 人体红外感应模块 proximity sensor
- Arduino 各种模块篇 RGB LED灯
- Arduino 各种模块篇 步进电机 step motor( 不用库,不用shield, 纯)
- Arduino 各种模块篇 蓝牙模块 手机蓝牙控制Arduino LED灯
- Arduino简单实例之五_红外避障传感器模块
- Arduino 各种模块篇 摇杆模块
- Arduino 各种模块篇 触摸模块 touch sensor
- Arduino 各种模块篇-继电器-利用串口命令-控制继电器