PM2.5激光粉尘传感器

            <img alt="PM-ALL.jpg" src="http://images.ncnynl.com/arduino/2016/300px-PM-ALL.jpg" width="300" height="225" class="thumbimage" />  <img src="http://images.ncnynl.com/arduino/2016/magnify-clip.png" width="15" height="11" alt="" />

目录

1 概述
2 工作原理
3 技术规格
4 连接方式
5 通信协议
6 外形尺寸
7 连接Arduino
8 应用样例
9 更多

概述
PM2.5激光粉尘传感器是一款数字式通用颗粒物浓度传感器,可以用于获得单位体积内空气中0.3~10微米悬浮颗粒物个数,即颗粒物浓度,并以数字接口形式输出,同时也可输出每种粒子的质量数据。本传感器可嵌入各种与空气中悬浮颗粒物浓度相关的仪器仪表或环境改善设备,为其提供及时准确的浓度数据。

工作原理
本传感器采用激光散射原理。即令激光照射在空气中的悬浮颗粒物上产生散射,同时在某一特定角度收集散射光,得到散射光强随时间变化的曲线。微处理器采集数据后,通过傅立叶变换得到时域与频域间的关系,随后经过一系列复杂算法得出颗粒物的等效粒径及单位体积内不同粒径的颗粒物数量。传感器各功能部分框图如图所示:

传感器结构框图
技术规格
工作电压  :4.95 ~ 5.05V
最大工作电流 : 120mA
测量范围  : 0.3~1.0、1.0~2.5、2.5~10微米(um)
量程  :0~500 ug/m3
待机电流  : ≤200 微安(uA)
响应时间  : ≤10 s
工作温度范围 : -20 ~ 50摄氏度
工作湿度范围 : 0~99% RH
最大尺寸  : 65×42×23(mm)
平均无故障时间 : >=5年

主要特性:

响应迅速
标准串口输字输出
二阶曲线多点校准
最小分辨粒径0.3微米

供电电源质量要求:
1、 纹波小于100mV。
2、 电源电压稳定度:4.95~5.05V。
3、 电源功率:大于1W (电流大于200mA)。
4、 上下电电压冲击小于系统电源电压的50%。

连接方式

接口说明图

传感器引脚
Arduino引脚
功能描述

Pin 1
VCC
电源正

Pin 2
GND
电源负

Pin 3
SET
模式设置

Pin 4
RXD
串口接收管脚(3.3V电平)

Pin 5
TXD
串口发送管脚(3.3V电平)

Pin 6
RESET
模块复位信号(低电平复位,不使用时拉高)

Pin 7、8
NC
悬空

注意:

SET引脚:
SET=1模块工作在连续采样方式下,模块在每一次采样结束后主动上传采样数据,采样响应时间为1S。
SET=0 模块进入低功耗待机模式。

RESET引脚用户可不必操作。

通信协议
串口波特率:9600; 校验位:无; 停止位:1位; 数据包长度固定为32字节。

通讯协议
外形尺寸
外形尺寸 单位(mm)
连接Arduino
如果你有IO扩展板就可以下载代码后将PM2.5传感器转接板直插上IO扩展板,就可以用串口监视PM2.5,PM1.0和PM10的数据了。由于激光PM2.5/10灰尘/颗粒物传感器模块通讯方式是用串口实现,而DFRobot UNO R3只有一个独立的串口,所以需要先下载arduino代码之后再插上传感器,否则程序下载会出现问题。

连接arduino
如果没有IO扩展板就可以按照下图接线下载代码就可以啦。

arduino连线图

//****************************** //Copyright (c) 2015, DFRobot
//
All rights reserved
//Abstract: Read value of PM1,PM2.5 and PM10 of air quality
//

//Version:V2.0
//
Author:Jason
//*Date:Feb.2016
//****************************** #include <Arduino.h>
#define LENG 32
char buf[LENG];

int PM01Value=0; //define PM1.0 value of the air detector module
int PM2_5Value=0; //define PM2.5 value of the air detector module
int PM10Value=0; //define PM10 value of the air detector module

void setup()
{
Serial.begin(115200);
}

void loop()
{
if(Serial.available())
{
Serial.readBytes(buf,LENG);
if(buf[

  Serial.print(&quot;PM1.0: &quot;);  //send PM1.0 data to bluetooth
  Serial.print(PM01Value);
  Serial.println(&quot;  ug/m3&quot;);            

  Serial.print(&quot;PM2.5: &quot;);  //send PM1.0 data to bluetooth
  Serial.print(PM2_5Value);
  Serial.println(&quot;  ug/m3&quot;);     
  
  Serial.print(&quot;PM10:  &quot;);  //send PM1.0 data to bluetooth
  Serial.print(PM10Value);
  Serial.println(&quot;  ug/m3&quot;);   
}

}
char checkValue(char *thebuf, char leng)
{
char receiveflag=0;
int receiveSum=0;
char i=0;

for(i=0;i<leng;i++)
{
receiveSum=receiveSum+thebuf[i];
}

if(receiveSum==((thebuf[leng-2]<<8)+thebuf[leng-1]+thebuf[leng-2]+thebuf[leng-1])) //check the serial data
{
receiveSum=0;
receiveflag=1;
}
return receiveflag;
}

int transmitPM01(char *thebuf)
{
int PM01Val;
PM01Val=((thebuf[4]<<8) + thebuf[5]); //count PM1.0 value of the air detector module
return PM01Val;
}

//transmit PM Value to PC
int transmitPM2_5(char *thebuf)
{
int PM2_5Val;
PM2_5Val=((thebuf[6]<<8) + thebuf[7]);//count PM2.5 value of the air detector module
return PM2_5Val;
}

//transmit PM Value to PC
int transmitPM10(char *thebuf)
{
int PM10Val;
PM10Val=((thebuf[8]<<8) + thebuf[9]); //count PM10 value of the air detector module
return PM10Val;
}

结果

应用样例
应用样例:穹顶之下的挣扎-DIY空气质量监测+净化器

更多

DFshopping car1.png 购买PM2.5激光粉尘传感器

标签: Arduino传感器