Grove-Dust Sensor
该灰尘传感器通过测量灰尘浓度可以很好地显示周围环境中的空气质量。 通过计算给定时间单位中的低脉冲占用时间(LPO时间)来测量空气中的颗粒物质水平(PM水平)。 LPO时间与PM浓度成正比。 该传感器可为空气净化器系统提供可靠的数据; 它能够响应的pM范围可以达到直径1μm。
Note
该传感器采用计数方式测量粉尘浓度,而不是通过称重方式,其单位为pcs / L或pcs / 0.01cf。
产品特性
- 该传感器能够稳定和灵敏的检测烟草烟雾的浓度和室内的尘埃。
- 使用内置的空气加热装置达到自我吸气的功能。
- 方便维护,长时间保持高灵敏度。
- 双通道输出,分别用于输出>1um和>2.5um两个粒子的浓度。
- 更紧凑轻巧,安装方便。
Note
在最新版本中,输出高电压从4.0V变为4.5V。
规格参数
创意应用
- 空气净化器
- 空气质量监测
- 冷气机
- 呼吸机
入门指导
注意事项
- 请保持直立。
- 第一次使用时需要3分钟的预热时间。
- 任意操作可能会导致意外的损坏。
- 以下小部件(标有红色矩形的)仅用于出厂设置。 请 不要 更改默认配置。
硬件连接
这是一个演示,演示如何从这个Grove - Dust传感器获取PM浓度数据。
将Dust传感器插入Grove-BaseShield 数字端口 D8 并且它只能是通过D8接口,因为这个传感器的操作涉及采样。 此功能只能通过Arduino / Seeeduino上ATmega328P的输入引脚D8来实现。
Grove连接线包含在Grove Dust Sensor封装中。 我们也可以使用杜邦线去连接Base Shield,如下图所示。
此外,您可以将Grove - Dust传感器连接到Arduino UNO,而不需要Base Shield。
软件程序
将下面的演示代码复制并粘贴到Arduino IDE上。
/*
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 = 2000;//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("concentration = ");
Serial.print(concentration);
Serial.println(" pcs/0.01cf");
Serial.println("\n");
lowpulseoccupancy = 0;
starttime = millis();
}
}
在这个程序中,Seeeduino在30秒内对“逻辑低”的总持续时间进行了采样,这个时间表示了环境的灰尘浓度。 打开串行监视器,我们可以从PC的串行端口中获取传感器检测到的空气质量值。
"lowpulseoccupancy" 表示在30秒内检测到的低脉冲占用时间(LPO时间)。 单位是微秒。
"ratio" 反映了哪个级别的LPO时间占用了整个的采样时间。
"concentration" 是一个有物理意义的数字。 可以通过使用以下特征图来得出LPO时间。
以下是办公室测量的粉尘浓度图:
我们可以看到晚上的尘埃浓度很低,但是下午较高。 当浓度高于某个数值时,可以在这里设置阈值。 此外,如果要设置传感器更敏感,可以在传感器上添加风扇,并在Pin5和Ground之间添加一个10kΩ的电阻。 更多信息请访问 blog of A.J.