夏普GP2Y1010AU0F_粉尘传感器参考程序

合集下载

微雪Dust Sensor 用户手册说明书

微雪Dust Sensor 用户手册说明书

Dust Sensor灰尘传感器用户手册1.特性和原理本模块是以夏普GP2Y1010AU0F为核心的灰尘传感器。

传感器内部的红外二极管,可以输出一个跟灰尘浓度成线性关系的电压值。

通过该电压值即可计算出空气中的灰尘和烟尘含量。

测量对象:直径大于0.8μm灰尘颗粒有效量程:500μg/m3输出类型:电压模拟量工作电压: 2.5V~5.5V产品尺寸:63.2mm×41.3mm固定孔尺寸: 2.0mm通气孔尺寸:9.0mm1.1.传感器输出特性传感器输出电压与灰尘浓度关系在0到0.5mg/m3范围内成线性关系,如下图所示:图1: 传感器输出特性曲线1.2.传感器控制原理1)通过设置模块I LED引脚为高电平,从而打开传感器内部红外二极管。

2)等待0.28ms,外部控制器采样模块A OUT引脚的电压值。

这是因为传感器内部红外二极管在开启之后0.28ms,输出波形才达到稳定。

如下图所示:图2: I LED与红外二极管输出波形关系3)采样持续0.04ms之后,再设置I LED引脚为低电平,从而关闭内部红外二极管。

4)根据电压与浓度关系即可计算出当前空气中的灰尘浓度,具体实现细节请参考Demo程序。

注:输出的电压经过了分压处理(查看原理图),要将测得的电源放大11倍才是实际传感器输出的电压。

1.3.主要用途检测空气中灰尘浓度,用于空气净化器、空气质量监测仪、PM2.5检测仪等。

2.操作和现象2.1.传感器接口说明表1: 传感器接口说明2.2.连接开发板使用下面章节以四款不同类型的开发板为例,描述具体操作步骤及实验现象。

2.2.1.Open103R(主控芯片STM32F103R)1)编译下载Demo程序。

2)3)表2: 传感器和Open103R引脚对应关系4)开发板上电,可看到串口助手不断显示当前灰尘浓度值,当有大量灰尘颗粒进入通气孔时,数据发生明显变化,实验现象见附录。

2.2.2.Open407Z-C(主控芯片STM32F407Z)1)编译下载Demo程序。

基于单片机的智能空气净化系统

基于单片机的智能空气净化系统

2019年9月第19卷第3期廊坊师范学院学报(自然科学版)Journal of Langfang Normal University (Natural Science Edition)Sep.2019Vol.19 No.3基于单片机的智能空气净化系统郑安豫,杨胜春,李红祥,房雁平(安徽电气工程职业技术学院,安徽合肥230051)【摘要】设计了一种基于单片机的智能空气净化系统。

通过传感器实时采集空气中PM2.5、甲醛等有害健康物质的浓度,将各项数据显示到液晶显示屏,当浓度超过设置的警戒值时,控制蜂鸣器发出警报。

根据浓度大小控制空气净化 器电机转速,实现空气净化器的智能控制,空气质量差时,实现快速空气净化;空气质量好时,能省电降低噪音。

实验表 明,该系统对清除室内空气污染物质、提高室内空气质量有良好的效果。

【关键词】单片机;空气净化;传感器A Design of Intelligent Air Purifier System Based on MCUZHENG An-yu, YANG Sheng-chun, LI Hong-xiang, FANG Yan-ping(Anhui Electrical Engineering Professional Technique College, Hefei 230051, China)[Abstract] An smart air purification system based on 51 single chip computer is designed. The concentration of PM2.5,fbimaldehyde and other harmful health substances in the air is collected by sensors in real time, and the data are displayedon the LCD screen. When the concentration exceeds the standard, the buzzer is controlled to give an alarm. According to theconcentration, the motor speed of air purifier is controlled. When the air quality is poor, the rapid air purification is achieved.When the air quality is good, the power saving and noise reduction are achieved.[Key words] MCU; air purification; sensor冲图分类号〕TP212.9〔文献标识码〕A 〔文章编号〕1674 - 3229(20⑼03- 0039 - 030 引言随着生活水平的提高,人们对生活环境舒适度的要求也随之提高,室内装修也越来越精致。

空气粉尘浓度检测器电路设计与软件编程论文

空气粉尘浓度检测器电路设计与软件编程论文

空气粉尘浓度检测器电路设计与软件编程论文空气粉尘浓度检测器电路设计与软件编程论文本设计以ATmega382p单片机为控制中心,由GP2Y1010AU0F 光学空气质量传感器测量空气粉尘浓度,通过单片机内置的10位A/D 转换将模拟的电压信号转换成数字信号,得到粉尘浓度值,并由LCD1602显示屏显示出来。

同时,设置浓度预警值并同测量值一起显示在显示屏上。

当测量浓度超过预警值时,仪器就会报警。

0 引言随着人类工业和经济的快速发展,我们的环境污染越来越严重。

除废气、废水外,颗粒状粉尘、烟尘向大气排放所造成的污染已成为一个十分突出的问题。

PM2.5,PM10,PM0.1及其吸附的重金属粒子是雾霾的重要组成部分[1]。

2012年2月,《环境空气质量标准》新增了对PM2.5的检测指标,PM2.5成为空气质量标准之一。

数据表明,我国空气质量超标的城市中68%都存在可吸入颗粒物的问题[2]。

由此可以看出粉尘对人类健康和生产的危害十分严重。

所以,粉尘浓度的检测和控制具有重要的意义。

1 系统工作原理单片机选用ATmega328p,粉尘浓度传感器选用夏普GP2Y1010AU0F灰尘传感器,按键部分通过电阻与按键串联将信号输入模拟口,通过读取模拟值的不同判断按键值,显示部分采用LCD1602并用采取I2C总线的8位远程I/O扩展口芯片PCF8574进行引脚简化。

将粉尘检测器电源开关打开,当传感器得到一个由粉尘浓度转换得来的0~5V的`电压信号时,进入单片机,经过处理后转变为十进制数通过I/O口在显示屏上显示出精确数值。

数值量随输入电压的扰动而变化。

同时键盘设定预警值送入单片机,与测量值一同显示出来。

当采集的当前粉尘浓度大于预警值时,单片机驱动蜂鸣器报警。

2 系统电路设计2.1 电路总体设计以ATmega328p单片机为核心,主要包括单片机处理模块,信号采集模块,独立按键模块,显示模块和蜂鸣器报警模块。

系统通过信号采集模块采集空气中的粉尘,得到0~5V的电压信号后,由单片机内部自带的10位ADC进行模数转换得到粉尘浓度,与此同时,通过独立按键模块设定浓度预警值,通过液晶显示模块将粉尘浓度和预警值同时显示在显示屏上。

使用夏普GP2Y1010AU0F灰尘传感器检测空气质量..

使用夏普GP2Y1010AU0F灰尘传感器检测空气质量..

使用夏普GP2Y1010AU0F灰尘传感器检测空气质量夏普灰尘传感器价格较便宜,能检测出室内空气中的灰尘和烟尘含量.检测原理其原理如下图,传感器中心有个洞可以让空气自由流过,定向发射LED光,通过检测经过空气中灰尘折射过后的光线来判断灰尘的含量。

电路图因为数据是通过pin 5的电压模拟信号输出的,而树莓派的引脚不支持模拟信号直接读取(需要增加数模转换芯片),所以先用Arduino来实验。

Arduino 代码根据电路图,把Arduino和传感器连接起来:1.Sharp pin 1 (V-LED) => 5V 串联1个150欧姆的电阻(最好在电阻一侧和GND之间再串联一个220uf的电容)2.Sharp pin 2 (LED-GND) => GND3.Sharp pin 3 (LED) => Arduino PIN 2 (开关LED)4.Sharp pin 4 (S-GND) => GND5.Sharp pin 5 (Vo) => Arduino A0 pin (空气质量数据通过电压模拟信号输出)6.Sharp pin 6 (Vcc) => 5V1./*2.Interface to Sharp GP2Y1010AU0F Particle Sensor3.Program by Christopher Nafis4.Written April 20125.6.7.8.9.Sharp pin 1 (V-LED) => 5V (connected to 150ohm resister)10.Sharp pin 2 (LED-GND) => Arduino GND pin11.Sharp pin 3 (LED) => Arduino pin 212.Sharp pin 4 (S-GND) => Arduino GND pin13.Sharp pin 5 (Vo) => Arduino A0 pin14.Sharp pin 6 (Vcc) => 5V15.*/16.#include<SPI.h>17.#include<stdlib.h>18.19.int dustPin=0;20.int ledPower=2;21.int delayTime=280;22.int delayTime2=40;23.float offTime=9680;24.25.int dustVal=0;26.int i=0;27.float ppm=0;28.char s[32];29.float voltage=0;30.float dustdensity=0;31.float ppmpercf=0;32.33.void setup(){34.Serial.begin(9600);35. pinMode(ledPower,OUTPUT);36.37.// give the ethernet module time to boot up:38. delay(1000);39.40. i=0;41. ppm=0;42.}43.44.void loop(){45. i=i+1;46. digitalWrite(ledPower,LOW);// power on the LED47. delayMicroseconds(delayTime);48. dustVal=analogRead(dustPin);// read the dust value49. ppm=ppm+dustVal;50. delayMicroseconds(delayTime2);51. digitalWrite(ledPower,HIGH);// turn the LED off52. delayMicroseconds(offTime);53.54. voltage=ppm/i*0.0049;55. dustdensity=0.17*voltage-0.1;56. ppmpercf=(voltage-0.0256)*120000;57.if(ppmpercf<0)58. ppmpercf=0;59.if(dustdensity<0)60. dustdensity=0;61.if(dustdensity>0.5)62. dustdensity=0.5;63.String dataString="";64. dataString+=dtostrf(voltage,9,4,s);65. dataString+=",";66. dataString+=dtostrf(dustdensity,5,2,s);67. dataString+=",";68. dataString+=dtostrf(ppmpercf,8,0,s);69. i=0;70. ppm=0;71.Serial.println(dataString);72. delay(1000);73.}把传感器和Ardiuno连接好后,可以连续打印出传感器的输出电压值。

一种基于某51单片机地粉尘监测系统地设计—定稿子

一种基于某51单片机地粉尘监测系统地设计—定稿子

届.别.2016届学号毕业设计基于51单片机的PM2.5检测系统的设计与实现姓名系别、专业电子信息与电气工程学院电子信息科学与技术专业导师姓名、职称完成时间 2016年5月10日目录摘要 (I)Abstract (I)1 绪论 (1)1.1 课题背景 (1)1.2 国内外研究现状 (1)2 系统仿真软件与总体设计方案 (1)2.1 Keil4软件开发坏境 (1)2.2 软件烧录工具 (2)2.3程序结构分析 (4)2.4 整体的设计方案 (4)2.5电源模块 (4)3 主要元器件简介43.1 GP2Y1010AU0F传感器简介 (5)3.2 ADC0832模数转换器简介 (7)3.3 LCD1602液晶显示屏 (10)3.4 STC89C52单片机的简介 (12)4 系统单元电路模块设计 (15)4.1主控制模块 (15)4.2显示模块电路 (16)4.3关于报警模块的设计 (16)4.4按键模块的设计 (17)4.5粉尘模块电路设计 (17)4.6电源局部的设计 (17)5 系统测试与实现 (18)5.1系统程序流图 (18)5.2 仿真电路 (20)5.3 软件跟硬件结合 (21)5.4 测试结果分析 (23)5.5 系统实现 (23)6、总结 (24)致谢 (24)参考文献 (25)附录1:系统整体电路原理图 (26)附录2:系统设计局部源程序 (27)摘要现在社会开展的越来越快,随着工业的开展,虽然给人们的生活带来很多便利。

但是,在生产过程产生很多对人体有害的因素工业生产过程中会,例如煤炭灰开采、水泥生产等行业中的粉尘污染。

我的设计采用由LCD1602液晶模块、STC89C52单片机最小系统、ADC0832模数转换器模块、GP2Y1010AU粉尘传感器、电源模块、蜂鸣器报警模块和按键模块模块组成。

单片机是通过ADC0832转换芯片采集GP2Y1010AU粉尘传感器的粉尘的浓度,通过单片机的数据转换处理后在液晶屏上显示空气中的质量,测量空间中的粉尘浓度如果大于当时设置粉尘浓度时,蜂鸣器就会产生报警的声音和发光二极管发出声光报警。

夏普原版灰尘传感器gp2y1010au规格书

夏普原版灰尘传感器gp2y1010au规格书

GP2Y1010AU0FGP2Y1010AU0FCompact Optical Dust Sensor■Description■Features■Compliance■Applications1. Detecting of dust in the air.2. Example: Air purifier, Air conditioner, Air monitor1. Compliant with RoHS directive (2002/95/EC)1. Compact, thin package (46.0 × 30.0 × 17.6 mm)2. Low consumption current (Icc: MAX. 20 mA)3. The presence of dust can be detected by the photometry of only one pulse4. Enable to distinguish smoke from house dust5. Lead-free and RoHS directive compliantNotice The content of data sheet is subject to change without prior notice.In the absence of confirmation by device specification sheets, SHARP takes no responsibility for any defects that may occur in equipment using any SHARP devices shown in catalogs, data books, etc. Contact SHARP in order to obtain the latest device specification sheets before using any SHARP device.GP2Y1010AU0F is a dust sensor by optical sensing system.An infrared emitting diode (IRED) and an phototran-sistor are diagonally arranged into this device.It detects the reflected light of dust in air.Especially, it is effective to detect very fine particle like the cigarette smoke.In addition it can distinguish smoke from house dust by pulse pattern of output voltage.■Internal schematic■Outline Dimensions(Unit : mm)V-LEDLED-GND LED S-GND V O V CC123456132654Marking informationDate code (2 digit)1st digit2nd digitYear of production Month of productionA.D.Mark Month Mark2000011200112220022332003344200445520055662006677200778820088992009910X2010011Y::12Z repeats in a 10 year cycleCountry of originPhilippines■■ Absolute Maximum Ratings*1 Open drain drive inputParameter Symbol Rating Unit Supply voltageCC V Operating temperature T T opr −10 to +65°C −0.3 to V CC V −0.3 to +7Input terminal voltage V V LED *1Soldering temperaturesol−20 to +80°CElectro-optical Characteristics■ Recommended input condition for LED input terminalParameter ConditionsSymbol K V OC I LED *1 *2 *3*2 *3*2 *3R L =4.7k Ω*2LED terminal voltage = 0*2R L =∞MIN.0.3503.4−−TYP.0.50.9−1110MAX.1.50.65−2020Unit V/(0.1mg/m 3)V V mA mASensitivityOutput voltage at no dust V OH Output voltage range LED terminal current I CCConsumption current*1 Sensitivity is specified by the amount of output voltage change when dust density changes by 0.1 mg/m 3.And the dust density for detection is a value of the density of cigarette (MILD SEVEN®) smoke measured by the digital dust monitor (P-5L2: manufactured by SHIBATA SCIENTIFIC TECHNOLOGY LTD.).*2 Input condition is shown in Fig. 1*3 Output sampling timing is shown in Fig. 2(T a =25°C)(T a =25°C, V CC =5V)ParameterPulse Cycle Pulse WidthOperating Supply voltageSymbol T P W V CCValue 10 ± 10.32 ± 0.025 ± 0.5Unit ms ms VFig. 1 Input Condition for LED Input TerminalFig. 2 Sampling Timing of Output PulseI LEDRemarks : Please be aware that all data in the graph are just for reference and are not for guarantee.432100.20.40.60.8O u t p u t v o l t a g e (V )Dust density (mg/m 3)Fig. 3 Output Voltage vs. Dust Density●Notes1 Connection of case and GNDCase material use conductive resin as cover case {printed model No.} and metal {test terminal side}as bottom cover. The metal case connects with GND in sensor.2 CleaningPlease don’t do cleaning, because there is a case that this device is not satisfied with its characteristics by cleaning.3 Pulse input rangePlease subject to recommendation as regard input condition for LED in order to keep reliability.4 Dust adhesionThere is a case that this product does not detect the dust density correctly, since the dust adhered to the inside of the dust through hole may project into the detecting space which consist of emitter anddetector light axis. Please take the structure and mechanism of the equipment into consideration toavoid the influence of adhered dust. And when the dust is adhered, please consider the maintenance such as vacuuming or blowing off the dust by air.In addition, please pay attention to structure and placing location of the application to avoid anyadhesive particle like oil, etc. to gets into the device. If it sticks to optical part, malfunction may occur.5 Light outputIn circuit designing, make allowance for the degradation of the light emitting diode output that resultsfrom long continuous operation. (50% degradation/5 years)6 Sensitivity adjustment VRVR for sensitivity adjustment is set up at shipping from sharp. Please do not touch the VR orElectro-optical characteristics specified on the specification will be invalid.7 ResolutionPlease do not disassemble the device such as removing tapping screw and so on. Even if the device is reassembled, it may not satisfy the specification.8 Application to fire alarmPlease do not use this device for a fire alarm application. When using this device to application other than air purifying and equipment with air purifying function, please inform us before usage.9 Noise influenceIf the sensor is located close to noise generator (ex. Electric dust collector, etc. ), the sensor outputmay be affected by leaded noise. On top of that noise from power supply line also may affect thesensor output. When desinging the system, please consider the effect from noise.10 Vibration influenceThe sensor may change its value under mechanical oscillation. Before usage, please make surethat the device works normally in the application.11 Incident light influenceThere is a case that the sensor output may be affected when outer-light comes through dust through hole on printed side. In order to avoid any influence from outer-light, please locate the printed sideof sensor facing to inside of the application.12 When inside of the sensor is moisturized, this product does not keep its proper function. Pleasedesign the application so that moisturization of the sensor does not happen.Sheet No.: E4-A01501EN●Presence of ODC etc.This product shall not contain the following materials.And they are not used in the production process for this product.Regulation substances : CFCs, Halon, Carbon tetrachloride, 1.1.1-Trichloroethane (Methylchloroform) Specific brominated flame retardants such as the PBB and PBDE are not used in this product at all.This product shall not contain the following materials banned in the RoHS Directive (2002/95/EC).• Lead, Mercury, Cadmium, Hexavalent chromium, Polybrominated biphenyls (PBB),Polybrominated diphenyl ethers (PBDE).Packing SpecificationPACKING METHOD1. Each tray holds 50 pieces. Packing methods are shown in (A).2. Each box holds 5 trays. Pads are added to top (B).3. The box is sealed with packing tape. (C) shows the location of the Model number, Quantity, and Inspection date.4. Weight is approximately5.6 kg■Important Notices· The circuit application examples in this publication are provided to explain representative applications of SHARP devices and are not intended to guarantee any circuit design or license any intellectual property rights. SHARP takes no responsibility for any problems related to any intellectual property right of a third party resulting from the use of SHARP's devices.· Contact SHARP in order to obtain the latest device specification sheets before using any SHARP device. SHARP reserves the right to make changes in the spec- ifications, characteristics, data, materials, structure, and other contents described herein at any time without no-tice in order to improve design or reliability. Manufactur-ing locations are also subject to change without notice.· Observe the following points when using any devices in this publication. SHARP takes no responsibility for damage caused by improper use of the devices which does not meet the conditions and absolute maximum ratings to be used specified in the relevant specification sheet nor meet the following conditions:(i) The devices in this publication are designed for use in general electronic equipment designs such as:--- Personal computers--- Office automation equipment--- Telecommunication equipment [terminal]--- Test and measurement equipment--- Industrial control--- Audio visual equipment--- Consumer electronics(ii) Measures such as fail-safe function and redundant design should be taken to ensure reliability and safety when SHARP devices are used for or in connection with equipment that requires higher reliability such as:--- Transportation control and safety equipment (i.e., aircraft, trains, automobiles, etc. )--- Traffic signals--- Gas leakage sensor breakers--- Alarm equipment--- Various safety devices, etc.(iii) SHARP devices shall not be used for or in connec-tion with equipment that requires an extremely high level of reliability and safety such as:--- Space applications--- Telecommunication equipment [trunk lines]--- Nuclear power control equipment--- Medical and other life support equipment (e.g., scuba).· If the SHARP devices listed in this publication fall within the scope of strategic products described in the Foreign Exchange and Foreign Trade Law of Japan, it is necessary to obtain approval to export such SHARP devices.· This publication is the proprietary product of SHARP and is copyrighted, with all rights reserved. Under the copyright laws, no part of this publication may be re-produced or transmitted in any form or by any means, electronic or mechanical, for any purpose, in whole or in part, without the express written permission of SHARP. Express written permission is also required before any use of this publication may be made by a third party.· Contact and consult with a SHARP representative if there are any questions about the contents of this publi-cation.Sheet No.: E4-A01501EN。

灰尘传感器 GP2Y1010AU

灰尘传感器 GP2Y1010AU

灰尘传感器GP2Y1010AU
型号:GP2Y1010AU
主要特点:
日本夏普公司灰尘传感器GP2Y1010AU,体积小巧,灵敏度高,可以用来测量0.8微米以上的微小粒子,可用于室内环境中烟气、粉尘、花粉等浓度的检测。

此款产品不但可以检测出单位体积粒子的绝对个数,而且内置气流发生器,可以自行吸入外部空气。

灰尘传感器GP2Y1010AU安装保养方便,使用寿命长,精度高,稳定性好。

应用领域:
1、空气净化器和空气清新机;
2、空调;
3、空气质量监控仪;
4、空调等相关产品。

主要参数:
灵敏度:0.5V/(0.1mg/m3)
输出电压:0.9V(TYP)
消耗电流:11mA
工作温度:-10~65℃
存储温度:-20~80℃。

GP2Y1010AU0FC0L模块使用说明书

GP2Y1010AU0FC0L模块使用说明书

开发控制板组成,
GP2Y1010AU0FC01模块使用说明书
一, 简介
1,该模块由夏普粉尘传感器GP2Y1010AU0F 和模块型号是:GP2Y1010AU0FC01,模块经过精确标定后,检测空气中的粉尘浓度,精度高,一致性强。

2,传感器智能校准:当灰尘附着于传感器或传感器老化时,系统会自动进行浓度参数校准,确保测量的准确性。

3,提供多种浓度值输出接口:模拟电压输出:灰尘浓度越高,输出模拟电压越高。

数字串口输出;供其它平台MCU 直接读取。

二,接线图
第一脚:5V 工作电压输入端
第二脚:串口数据输出
第三脚:串口数据输入
第四脚:灰尘浓度模拟电压输出
第五脚:不用连接
第六脚:工作电压地
三,技术参数
四,通信协议命令格式
1,模块读取除尘机工作状态:
传感器发送命令格式:05FEF603
除尘机收到上述命令后返回工作状态
①除尘机处于开机状态:返回数据格式06FEF103
②除尘机处于关机状态:返回数据格式06FEF003
2,除尘机读取灰尘浓度值:
除尘机发送命令格式:05FEF503
模块收到上述指令后返回浓度值。

返回数据格式:06ABCD03
浓度计数方法:浓度值(十六进制)=0XABCD(ug/m3)。

例如AB=01,CD=0X23:则
浓度(十六进制)=0X0123(ug/m3)
浓度(十进制)=291(ug/m3)。

自制pm2.5检测仪资料

自制pm2.5检测仪资料

由项目实例从零开始学arduino系列(一)项目:利用arduino自制pm2.5检测仪目的:通过自制pm2.5检测仪过程掌握arduino 控制板接口电路,1602液晶显示屏连接arduino 控制板显示技术,相关arduino编程语言,灰尘传感器连接arduino控制板方法。

知识点:1602液晶显示,灰尘传感器接法,基础的arduino编程语言。

白话文式讲解一、硬件连接(图在详细讲解处)(一)粉尘传感器连接nano板SHARP GP2Y1010AU0F型灰尘/粉尘传感器的红色线为6号线,向左依次为5,4,3,2,1号线。

粉尘传感器6号线接Arduinonano板的5V端。

粉尘传感器5号线接Arduinonano板的A0端。

粉尘传感器4号线接Arduinonano板的GND端。

粉尘传感器3号线接Arduinonano板的D2端。

粉尘传感器2号线接Arduinonano板的GND端。

粉尘传感器1号线接150欧姆电阻和220uF的电解电容正极,150欧姆电阻的另一端接Arduinonano板的5V端。

220uF的电解电容负极接Arduinonano板的GND端。

(二)1602液晶屏连接nano板1602液晶屏上标有数字针脚,一般是16针。

我们用到了12个针脚。

液晶屏第16针连接Arduinonano板的GND端。

液晶屏第15针连接Arduinonano板的5V端。

液晶屏第14针连接Arduinonano板的D6端。

液晶屏第13针连接Arduinonano板的D7端。

液晶屏第12针连接Arduinonano板的D8端。

液晶屏第11针连接Arduinonano板的D9端。

液晶屏第1针连接Arduinonano板的GND端。

液晶屏第2针连接Arduinonano板的5V端。

液晶屏第3针先接1k电阻,电阻另一端连接Arduinonano板的D6端。

液晶屏第4针连接Arduinonano板的D12端。

液晶屏第5针连接Arduinonano板的D11端。

基于单片机的空气质量检测仪的设计与实现

基于单片机的空气质量检测仪的设计与实现

基于单片机的空气质量检测仪的设计与实现摘要本文主要介绍了基于arduino单片机和夏普GP2Y1010AUOF粉尘传感器的空气质量PM2.5测量设计系统。

该系统通过传感器多次采集空气粉尘浓度数据,把相应的模拟量传回单片机,系统通过模数转换、滤波算法,最后把检测到PM2.5浓度数值显示到OLED显示屏上,如果检测值超过了污染指标,就发出警报提醒使用者,除此之外,还加入了温湿度和时间,增加了设备的实用性。

该设计对检测空气质量,提高人们的生活质量以及环境意识,促使人们改善环境,具有重要的意义,因此应用前景非常广泛。

关键词单片机;传感器技术;滤波算法;PM2.5引言由种种环境空气污染带来的危害是人所皆知的,人们也越来越渴望有个空气干净的居住环境,每天都看不到雾霾天气,呼吸新鲜空气。

对PM2.5进行更深入细致地研究,可以有助于我们了解身边的空气质量。

天气预告往往只能给出某一个地区的近期空气质量大体情况,带有不少的时间、地域局限性。

因此设计出一款轻便、小巧的PM2.5、温湿度检测仪对我们实时了解身边空气质量具有重要的意义和市场价值。

2 总体设计本设计将单片机与传感器相结合,开发和研究时采用模块化设计的方案,系统架构图如图1所示,实现集成温湿度、空气PM2.5监测为一体的环境质量检测系统。

3 硬件设计3.1 MCU(微控制单元)本设计采用Arduino uno R3核心板作为开发单片机,是Arduino USB接口系列的最新版,集成了USB接口贴片芯片ATmega16U2和ICSP在线串行编程接口。

其MCU是使用ATMEGA328P-PU芯片,是一款高性能、低功耗的8位A VR 微处理器。

另外最重要的是它分别集成了6个独立的ADC模拟输入口和6个PWM数字输出口,这极大地方便了传感器等设备在其身上的应用。

3.2 PM2.5粉尘传感器本设计采用的是一款GP2Yl010AUOF光学空气质量传感器,其内部结构为对角安放着红外线發光二极管和光电晶体管,使其能够探测到空气中尘埃反射光[1]。

灰尘传感器GP2Y1010AU0F使用说明1

灰尘传感器GP2Y1010AU0F使用说明1

1.4 代码说明: 由于参考代码过多,在此对于常见的代码不予讲解,下面对于核心代码进行说明。 430 单片机特点:16 位处理器,低功耗,8M 的主系统时钟决定单指令周期为 0.125us,内 部集成众多外设,包括 12 位 ADC,定时器 A,定时器 B。强调一点是,由于此传感器要求 采样时序较为精确,因此像 430 这种中端的微处理器或者更高端的处理器比较适合开发此传 感器,也就是说指令的处理速度越快越好。 430 单片机带动传感器工作一次的时间大概为 1.5s,工作期间不间断提供输入脉冲,大概到 1s 左右,此时传感器的工作已经稳定,因此可以开始采样了,连续采样 4 次,然后将数据 取平均值,这就是一次工作的整个流程。这样的设计思路既可以保证传感器的读值稳定性, 又可以做到低功耗。 输入信号由定时器 A 产生,P1.2(TA1)输出,ADC 采样时序的控制由定时器 B 控制,使用 片内 12 位的 ADC 进行采样,采样的参考电压是系统电压 3.2V(做法比较粗糙),采样后直 接转成模拟信号的表达形式,最后输出的是电压值,对于电压转换到 PM2.5 的值,在 1.5 节 有简单说明。
5
官方直营淘宝店铺:/item.htm?spm=a1z09.5.0.0.4mLru6&id=25584528001
Curr_Volt=caltmp>>12; ptr[0]=Curr_Volt/100;//Hex->DEC 变换,百位 t1=Curr_Volt-(ptr[0]*100); ptr[1]=t1/10;//十位 ptr[2]=t1-(ptr[1]*10);//各位 }
430 的 P1.2 作为脉冲的输入脚,为传感器提供输入信号 传感器的引脚按照 datasheet 中典型电路来接,R1、C1 分别为 150Ω和 220uF 的电解电

夏普SHARP灰尘颗粒传感器GP2Y1010AU0F

夏普SHARP灰尘颗粒传感器GP2Y1010AU0F

GP2Y1010AU0F11807-0430-980© SHARP CorporationGP2Y1010AU0FCompact Optical Dust Sensor■Description■Features■Compliance■Applications1. Detecting of dust in the air.2. Example: Air purifier, Air conditioner, Air monitor1. Compliant with RoHS directive (2002/95/EC)1. Compact, thin package (46.0 × 30.0 × 17.6 mm)2. Low consumption current (Icc: MAX. 20 mA)3. The presence of dust can be detected by the photometry of only one pulse4. Enable to distinguish smoke from house dust5. Lead-free and RoHS directive compliantNotice The content of data sheet is subject to change without prior notice.In the absence of confirmation by device specification sheets, SHARP takes no responsibility for any defects that may occur in equipment using any SHARP devices shown in catalogs, data books, etc. Contact SHARP in order to obtain the latest device specification sheets before using any SHARP device.GP2Y1010AU0F is a dust sensor by optical sensing system.An infrared emitting diode (IRED) and an phototran-sistor are diagonally arranged into this device.It detects the reflected light of dust in air.Especially, it is effective to detect very fine particle like the cigarette smoke.In addition it can distinguish smoke from house dustby pulse pattern of output voltage.■Internal schematic■Outline Dimensions(Unit : mm)V-LEDLED-GND LED S-GND V O V CC123456132654Marking informationDate code (2 digit)1st digit2nd digitYear of production Month of productionA.D.Mark Month Mark2000011200112220022332003344200445520055662006677200778820088992009910X2010011Y::12Z repeats in a 10 year cycleCountry of originPhilippines■■ Absolute Maximum Ratings*1 Open drain drive inputParameter Symbol Rating Unit Supply voltageCC V Operating temperature T T opr −10 to +65°C −0.3 to V CC V −0.3 to +7Input terminal voltage V V LED *1Soldering temperaturesol−20 to +80°CElectro-optical Characteristics■ Recommended input condition for LED input terminalParameter ConditionsSymbol K V OC I LED *1 *2 *3*2 *3*2 *3R L =4.7k Ω*2LED terminal voltage = 0*2R L =∞MIN.0.3503.4−−TYP.0.50.9−1110MAX.1.50.65−2020Unit V/(0.1mg/m 3)V V mA mASensitivityOutput voltage at no dust V OH Output voltage range LED terminal current I CCConsumption current*1 Sensitivity is specified by the amount of output voltage change when dust density changes by 0.1 mg/m 3.And the dust density for detection is a value of the density of cigarette (MILD SEVEN®) smoke measured by the digital dust monitor (P-5L2: manufactured by SHIBATA SCIENTIFIC TECHNOLOGY LTD.).*2 Input condition is shown in Fig. 1*3 Output sampling timing is shown in Fig. 2(T a =25°C)(T a =25°C, V CC =5V)ParameterPulse Cycle Pulse WidthOperating Supply voltageSymbol T P W V CCValue 10 ± 10.32 ± 0.025 ± 0.5Unit ms ms VFig. 1 Input Condition for LED Input TerminalFig. 2 Sampling Timing of Output PulseI LEDRemarks : Please be aware that all data in the graph are just for reference and are not for guarantee.432100.20.40.60.8O u t p u t v o l t a g e (V )Dust density (mg/m 3)Fig. 3 Output Voltage vs. Dust Density●Notes1 Connection of case and GNDCase material use conductive resin as cover case {printed model No.} and metal {test terminal side}as bottom cover. The metal case connects with GND in sensor.2 CleaningPlease don’t do cleaning, because there is a case that this device is not satisfied with its characteristics by cleaning.3 Pulse input rangePlease subject to recommendation as regard input condition for LED in order to keep reliability.4 Dust adhesionThere is a case that this product does not detect the dust density correctly, since the dust adhered to the inside of the dust through hole may project into the detecting space which consist of emitter anddetector light axis. Please take the structure and mechanism of the equipment into consideration toavoid the influence of adhered dust. And when the dust is adhered, please consider the maintenance such as vacuuming or blowing off the dust by air.In addition, please pay attention to structure and placing location of the application to avoid anyadhesive particle like oil, etc. to gets into the device. If it sticks to optical part, malfunction may occur.5 Light outputIn circuit designing, make allowance for the degradation of the light emitting diode output that resultsfrom long continuous operation. (50% degradation/5 years)6 Sensitivity adjustment VRVR for sensitivity adjustment is set up at shipping from sharp. Please do not touch the VR orElectro-optical characteristics specified on the specification will be invalid.7 ResolutionPlease do not disassemble the device such as removing tapping screw and so on. Even if the device is reassembled, it may not satisfy the specification.8 Application to fire alarmPlease do not use this device for a fire alarm application. When using this device to application other than air purifying and equipment with air purifying function, please inform us before usage.9 Noise influenceIf the sensor is located close to noise generator (ex. Electric dust collector, etc. ), the sensor outputmay be affected by leaded noise. On top of that noise from power supply line also may affect thesensor output. When desinging the system, please consider the effect from noise.10 Vibration influenceThe sensor may change its value under mechanical oscillation. Before usage, please make surethat the device works normally in the application.11 Incident light influenceThere is a case that the sensor output may be affected when outer-light comes through dust through hole on printed side. In order to avoid any influence from outer-light, please locate the printed sideof sensor facing to inside of the application.12 When inside of the sensor is moisturized, this product does not keep its proper function. Pleasedesign the application so that moisturization of the sensor does not happen.Sheet No.: E4-A01501EN●Presence of ODC etc.This product shall not contain the following materials.And they are not used in the production process for this product.Regulation substances : CFCs, Halon, Carbon tetrachloride, 1.1.1-Trichloroethane (Methylchloroform) Specific brominated flame retardants such as the PBB and PBDE are not used in this product at all.This product shall not contain the following materials banned in the RoHS Directive (2002/95/EC).• Lead, Mercury, Cadmium, Hexavalent chromium, Polybrominated biphenyls (PBB),Polybrominated diphenyl ethers (PBDE).Packing SpecificationPACKING METHOD1. Each tray holds 50 pieces. Packing methods are shown in (A).2. Each box holds 5 trays. Pads are added to top (B).3. The box is sealed with packing tape. (C) shows the location of the Model number, Quantity, and Inspection date.4. Weight is approximately5.6 kg■Important Notices· The circuit application examples in this publication are provided to explain representative applications of SHARP devices and are not intended to guarantee any circuit design or license any intellectual property rights. SHARP takes no responsibility for any problems related to any intellectual property right of a third party resulting from the use of SHARP's devices.· Contact SHARP in order to obtain the latest device specification sheets before using any SHARP device. SHARP reserves the right to make changes in the spec- ifications, characteristics, data, materials, structure, and other contents described herein at any time without no-tice in order to improve design or reliability. Manufactur-ing locations are also subject to change without notice.· Observe the following points when using any devices in this publication. SHARP takes no responsibility for damage caused by improper use of the devices which does not meet the conditions and absolute maximum ratings to be used specified in the relevant specification sheet nor meet the following conditions:(i) The devices in this publication are designed for use in general electronic equipment designs such as:--- Personal computers--- Office automation equipment--- Telecommunication equipment [terminal]--- Test and measurement equipment--- Industrial control--- Audio visual equipment--- Consumer electronics(ii) Measures such as fail-safe function and redundant design should be taken to ensure reliability and safety when SHARP devices are used for or in connection with equipment that requires higher reliability such as:--- Transportation control and safety equipment (i.e., aircraft, trains, automobiles, etc. )--- Traffic signals--- Gas leakage sensor breakers--- Alarm equipment--- Various safety devices, etc.(iii) SHARP devices shall not be used for or in connec-tion with equipment that requires an extremely high level of reliability and safety such as:--- Space applications--- Telecommunication equipment [trunk lines]--- Nuclear power control equipment--- Medical and other life support equipment (e.g., scuba).· If the SHARP devices listed in this publication fall within the scope of strategic products described in the Foreign Exchange and Foreign Trade Law of Japan, it is necessary to obtain approval to export such SHARP devices.· This publication is the proprietary product of SHARP and is copyrighted, with all rights reserved. Under the copyright laws, no part of this publication may be re-produced or transmitted in any form or by any means, electronic or mechanical, for any purpose, in whole or in part, without the express written permission of SHARP. Express written permission is also required before any use of this publication may be made by a third party.· Contact and consult with a SHARP representative if there are any questions about the contents of this publi-cation.。

GP2Y1050AU0F

GP2Y1050AU0F

备注
批准
确认&批准 核对 核对
制定
2013.12.04

夏普电子(上海)有限公司 营销支持中心
规格书编号
SES13Z04
3/15
○ 本规格书包含涉及我司版权的内容,请充分严肃对待,未经许可请勿擅自复制。 ○ 在使用本产品时,请遵守规格书上写的绝对最大额定和使用时的注意事项以及以下注意点。 同时,使用本产品时超出本规格书上的绝对最大额定或未遵守使用时的注意事项, 或是由于使用本产品时未遵守以下注意点所造成的的损害,我司概不负责。
<注意点> ① 当客户根据本规格书,来制作客户的商品目录、使用说明书时,须在本产品组装于客户的 商品中的状态下,来检验是否有合理的依据。 ② 本产品原则上是以以下用途为目的而制造的。 ・家电产品 同时,即使用于上述用途,在用于③或④中所写的机器时,请务必遵守各自所对应的注意点。 ③ 在将本产品使用于下列对功能、精准度等有较高的信赖性、安全性要求的用途时,为了维持 这些机器的信赖性和安全性请考量故障安全防护装置或冗长设计的措施,在顾及系统、机器 整体的安全设计的基础上使用本产品。 ·涉及运输机器(飞机、火车、汽车等)的控制和各种安全性的组件 ·交通信号机 ·气体泄漏检测截路机 ·防灾防盗装置 ·各类安全装置 等 ④ 请勿将本产品使用于对功能、精度有极高的信赖性、安全性要求的下列用途。 ·宇宙器械 ·通信器械(干线) ·核能控制器械 ·医疗器械 等 ⑤ 由于本产品的不良造成的,2次性的机器的损失、利益损失等我司概不负责。 ⑥ 对于应该对应上述①、②、③、④、⑤中的哪一条有疑问的情况,请至我司销售窗口确认。
夏普电子(上海)有限公司
营销支持中心
规格书编号
SES13Z04

7/15

多功能 PM2.5检测系统

多功能 PM2.5检测系统

多功能 PM2.5检测系统王路;曲伟;胡家骏【摘要】A multifunctional PM2.5 detection system is designed , in order to overcome the problems of high cost and single function of the PM2.5 detectors on markets .PM2.5 concentrations and ambient air temperature are detected by core controller implementation of STC 90C51 micro-controller, dust sensor GP2Y1050AUOF and temperature sensor DS18B20 respectively, and data acquisition, calculation and processing are implemented after A/D conversion .It is achieved to the real-time displayof PM2.5 concentration , temperature and time , and functions of PM2.5 limit alarm, time adjustment and interactive .Test results show:PM2.5 data error tested by the PM2.5 detector in normal outdoor ambient air is ±3μg/m3 , the temperature error is ±1 ℃ th at compared with data announced by the local environmental monitoring department , and walking time accurately .%针对市场上PM2.5检测仪的功能单一和价格昂贵的问题,设计了一款多功能PM2.5检测系统。

粉尘传感器参数

粉尘传感器参数

产品名称:GP2Y1010AU0F粉尘检测传感器模块
技术参数:
∙电源电压:DC5±2V
∙工作电流:20mA(峰值)
∙灵敏度:0.5V/(0.1mg/m3)
∙最小粒子检出值:0.8微米
∙清洁空气中电压:0.9V 典型值
∙工作温度:-10~65℃
∙存储温度:-20~80℃
∙使用寿命:5年
∙尺寸大小:46mm×30mm×17.6mm
∙重量大小:15g

夏普光学灰尘传感器(GP2Y1010AU0F)在检测非常细的颗粒,如香烟烟雾,是特别有效的,
并且是常用的空气净化器系统。

该装置中,一个红外发光二极管和光电晶体管,对角布置成允许其检测到在空气中的灰尘反射光。

该传感器具有极低的电流消耗(最大20mA,11毫安典型的),可以搭载高达7VDC的传感器。

输出的是一个模拟电压正比于所测得的粉尘浓度,敏感性为0.5V/0.1mg/m3。

检测原理
其原理如下图,传感器中心有个洞可以让空气自由流过,定向发射LED光,通过检测经过空气中灰尘折射过后的光线来判断灰尘的含量。

PM2.5检测系统毕业设计论文

PM2.5检测系统毕业设计论文

大气颗粒物污染对人类健康和生态环境造成了很大的影响,这让人们逐渐重视起对细颗粒物PM2.5检测技术的研究。

本文阐述了PM2.5浓度检测的五种方法,在对上述各方法分析总结的基础上针对日常生活中PM2.5污染检测的实际需求,设计了一种PM2.5浓度检测的方案。

本设计通过GP2Y1010AU0F粉尘传感器采集周围环境空气中PM2.5的浓度值,由ADC0832模数转换芯片将传感器输出的模拟电压转信号转换成数字信号,并将数据传送给单片机STC89C52。

单片机分析处理数据得到最终的检测结果,将其显示在LCD1602液晶屏上。

当检测到的PM2.5浓度值大于预先设置的PM2.5浓度值时,蜂鸣器和发光二极管发出声光报警。

本论文对这些功能模块进行了设计,并制作电路实现了相应的功能。

通过进一步的调试与集成,实现整个系统的功能,达到检测目的。

关键词:PM2.5;粉尘传感器;检测系统The pollution of ambient fine particulate matter has a great negative effect on human health and the ecological environment. It makes people gradually pay attention to the detection of PM2.5. In this paper, described five kinds of test methods of PM2.5. In terms of the actual demand of PM2.5 pollution detection in daily life,this paper puts forward a design of PM2.5 test system. This design uses the GP2Y1010AU0F dust sensor collected of PM2.5 concentrations. In addition, sensor analog quantity turn into digital quantity by ADC0832 and data is transmitted to the MCU. Single-chip microcomputer process data to get last detect result on the LCD screen. When the PM2.5 test concentration is detected is greater than the preset concentration, the buzzer and the light-emitting diode emit will sound and light alarm. In this paper, designed the function modules and realized the corresponding function by production circuit. Through further debugging and integration to achieve the function of the whole system,so as to achieve the purpose of detection.Key words:PM2.5;Dust Sensor;Detection System目录摘要 (Ⅰ)Abstract (Ⅱ)一绪论....................................................................... 11.1研究背景及意义 ..................................................... 11.2国内外研究现状 ..................................................... 21.3研究的主要内容 ..................................................... 31.4本章小结............................................................. 3二系统总体方案设计 ..................................................... 42.1总体方案设计........................................................ 42.2系统硬件选型........................................................ 62.3本章小结............................................................. 7三硬件电路设计........................................................... 83.1主控制器模块........................................................ 83.2粉尘传感器模块 ..................................................... 93.3模数转换模块 (10)3.4液晶显示模块 (10)3.5电源模块 (11)3.6按键模块. (12)3.7报警模块. (12)3.8本章小结 (12)四系统软件设计 (13)4.1程序功能分析 (13)4.2系统程序设计 (13)4.3本章小结 (16)五安装与调试 (17)5.1硬件安装 (17)5.2程序调试 (18)5.本章小结 (18)六结论与展望 (19)6.1结论 (19)6.1展望 (19)致谢 (20)参考文献 (21)附录一元器件清单附录二源程序一绪论1.1 研究背景及意义随着工业的发展,各种新产品不断被制造出来,人们的生活水平得到了很大的提高。

GP2Y1010AU0F 粉尘传感器

GP2Y1010AU0F 粉尘传感器

GP2Y1010AU0FGP2Y1010AU0FCompact Optical Dust Sensor■Description■Features■Compliance■Applications1. Detecting of dust in the air.2. Example: Air purifier, Air conditioner, Air monitor1. Compliant with RoHS directive (2002/95/EC)1. Compact, thin package (46.0 × 30.0 × 17.6 mm)2. Low consumption current (Icc: MAX. 20 mA)3. The presence of dust can be detected by the photometry of only one pulse4. Enable to distinguish smoke from house dust5. Lead-free and RoHS directive compliantNotice The content of data sheet is subject to change without prior notice.In the absence of confirmation by device specification sheets, SHARP takes no responsibility for any defects that may occur in equipment using any SHARP devices shown in catalogs, data books, etc. Contact SHARP in order to obtain the latest device specification sheets before using any SHARP device.GP2Y1010AU0F is a dust sensor by optical sensing system.An infrared emitting diode (IRED) and an phototran-sistor are diagonally arranged into this device.It detects the reflected light of dust in air.Especially, it is effective to detect very fine particle like the cigarette smoke.In addition it can distinguish smoke from house dust by pulse pattern of output voltage.■Internal schematic■Outline Dimensions(Unit : mm)V-LEDLED-GND LED S-GND V O V CC123456132654Marking informationDate code (2 digit)1st digit2nd digitYear of production Month of productionA.D.Mark Month Mark2000011200112220022332003344200445520055662006677200778820088992009910X2010011Y::12Z repeats in a 10 year cycleCountry of originPhilippines■■ Absolute Maximum Ratings*1 Open drain drive inputParameter Symbol Rating Unit Supply voltageCC V Operating temperature T T opr −10 to +65°C −0.3 to V CC V −0.3 to +7Input terminal voltage V V LED *1Soldering temperaturesol−20 to +80°CElectro-optical Characteristics■ Recommended input condition for LED input terminalParameter ConditionsSymbol K V OC I LED *1 *2 *3*2 *3*2 *3R L =4.7k Ω*2LED terminal voltage = 0*2R L =∞MIN.0.3503.4−−TYP.0.50.9−1110MAX.1.50.65−2020Unit V/(0.1mg/m 3)V V mA mASensitivityOutput voltage at no dust V OH Output voltage range LED terminal current I CCConsumption current*1 Sensitivity is specified by the amount of output voltage change when dust density changes by 0.1 mg/m 3.And the dust density for detection is a value of the density of cigarette (MILD SEVEN®) smoke measured by the digital dust monitor (P-5L2: manufactured by SHIBATA SCIENTIFIC TECHNOLOGY LTD.).*2 Input condition is shown in Fig. 1*3 Output sampling timing is shown in Fig. 2(T a =25°C)(T a =25°C, V CC =5V)ParameterPulse Cycle Pulse WidthOperating Supply voltageSymbol T P W V CCValue 10 ± 10.32 ± 0.025 ± 0.5Unit ms ms VFig. 1 Input Condition for LED Input TerminalFig. 2 Sampling Timing of Output PulseI LEDRemarks : Please be aware that all data in the graph are just for reference and are not for guarantee.432100.20.40.60.8O u t p u t v o l t a g e (V )Dust density (mg/m 3)Fig. 3 Output Voltage vs. Dust Density●Notes1 Connection of case and GNDCase material use conductive resin as cover case {printed model No.} and metal {test terminal side}as bottom cover. The metal case connects with GND in sensor.2 CleaningPlease don’t do cleaning, because there is a case that this device is not satisfied with its characteristics by cleaning.3 Pulse input rangePlease subject to recommendation as regard input condition for LED in order to keep reliability.4 Dust adhesionThere is a case that this product does not detect the dust density correctly, since the dust adhered to the inside of the dust through hole may project into the detecting space which consist of emitter anddetector light axis. Please take the structure and mechanism of the equipment into consideration toavoid the influence of adhered dust. And when the dust is adhered, please consider the maintenance such as vacuuming or blowing off the dust by air.In addition, please pay attention to structure and placing location of the application to avoid anyadhesive particle like oil, etc. to gets into the device. If it sticks to optical part, malfunction may occur.5 Light outputIn circuit designing, make allowance for the degradation of the light emitting diode output that resultsfrom long continuous operation. (50% degradation/5 years)6 Sensitivity adjustment VRVR for sensitivity adjustment is set up at shipping from sharp. Please do not touch the VR orElectro-optical characteristics specified on the specification will be invalid.7 ResolutionPlease do not disassemble the device such as removing tapping screw and so on. Even if the device is reassembled, it may not satisfy the specification.8 Application to fire alarmPlease do not use this device for a fire alarm application. When using this device to application other than air purifying and equipment with air purifying function, please inform us before usage.9 Noise influenceIf the sensor is located close to noise generator (ex. Electric dust collector, etc. ), the sensor outputmay be affected by leaded noise. On top of that noise from power supply line also may affect thesensor output. When desinging the system, please consider the effect from noise.10 Vibration influenceThe sensor may change its value under mechanical oscillation. Before usage, please make surethat the device works normally in the application.11 Incident light influenceThere is a case that the sensor output may be affected when outer-light comes through dust through hole on printed side. In order to avoid any influence from outer-light, please locate the printed sideof sensor facing to inside of the application.12 When inside of the sensor is moisturized, this product does not keep its proper function. Pleasedesign the application so that moisturization of the sensor does not happen.Sheet No.: E4-A01501EN●Presence of ODC etc.This product shall not contain the following materials.And they are not used in the production process for this product.Regulation substances : CFCs, Halon, Carbon tetrachloride, 1.1.1-Trichloroethane (Methylchloroform) Specific brominated flame retardants such as the PBB and PBDE are not used in this product at all.This product shall not contain the following materials banned in the RoHS Directive (2002/95/EC).• Lead, Mercury, Cadmium, Hexavalent chromium, Polybrominated biphenyls (PBB),Polybrominated diphenyl ethers (PBDE).Packing SpecificationPACKING METHOD1. Each tray holds 50 pieces. Packing methods are shown in (A).2. Each box holds 5 trays. Pads are added to top (B).3. The box is sealed with packing tape. (C) shows the location of the Model number, Quantity, and Inspection date.4. Weight is approximately5.6 kg■Important Notices· The circuit application examples in this publication are provided to explain representative applications of SHARP devices and are not intended to guarantee any circuit design or license any intellectual property rights. SHARP takes no responsibility for any problems related to any intellectual property right of a third party resulting from the use of SHARP's devices.· Contact SHARP in order to obtain the latest device specification sheets before using any SHARP device. SHARP reserves the right to make changes in the spec- ifications, characteristics, data, materials, structure, and other contents described herein at any time without no-tice in order to improve design or reliability. Manufactur-ing locations are also subject to change without notice.· Observe the following points when using any devices in this publication. SHARP takes no responsibility for damage caused by improper use of the devices which does not meet the conditions and absolute maximum ratings to be used specified in the relevant specification sheet nor meet the following conditions:(i) The devices in this publication are designed for use in general electronic equipment designs such as:--- Personal computers--- Office automation equipment--- Telecommunication equipment [terminal]--- Test and measurement equipment--- Industrial control--- Audio visual equipment--- Consumer electronics(ii) Measures such as fail-safe function and redundant design should be taken to ensure reliability and safety when SHARP devices are used for or in connection with equipment that requires higher reliability such as:--- Transportation control and safety equipment (i.e., aircraft, trains, automobiles, etc. )--- Traffic signals--- Gas leakage sensor breakers--- Alarm equipment--- Various safety devices, etc.(iii) SHARP devices shall not be used for or in connec-tion with equipment that requires an extremely high level of reliability and safety such as:--- Space applications--- Telecommunication equipment [trunk lines]--- Nuclear power control equipment--- Medical and other life support equipment (e.g., scuba).· If the SHARP devices listed in this publication fall within the scope of strategic products described in the Foreign Exchange and Foreign Trade Law of Japan, it is necessary to obtain approval to export such SHARP devices.· This publication is the proprietary product of SHARP and is copyrighted, with all rights reserved. Under the copyright laws, no part of this publication may be re-produced or transmitted in any form or by any means, electronic or mechanical, for any purpose, in whole or in part, without the express written permission of SHARP. Express written permission is also required before any use of this publication may be made by a third party.· Contact and consult with a SHARP representative if there are any questions about the contents of this publi-cation.Sheet No.: E4-A01501EN。

基于单片机控制的空气质量检测系统的设计

基于单片机控制的空气质量检测系统的设计

基于单片机控制的空气质量检测系统的设计摘要:随着社会经济的快速发展,大气污染日益严重,已成为影响人类健康的主要因素之一。

如果空气中二氧化碳浓度偏高,吸入过多会引起二氧化碳中毒、头晕、乏力等症状。

高浓度的PM2.5会增加呼吸道感染、哮喘和支气管炎等疾病的症状。

为了了解空气质量,改善生活环境,人们对空气质量检测仪的需求越来越大。

市场上虽然有PM2.5、有毒气体等多种国产空气质量检测仪,但其功能相对简单,性价比相对较低,在一定程度上降低了人们的购买欲望。

因此,设计一种多功能经济适用的空气质量检测仪具有良好的应用前景,对改善居住环境空气质量,提高健康水平具有重要意义。

关键词:单片机控制;空气质量;检测系统;设计;分析1系统总体设计1.1设计要求。

设计一个简单实用的空气质量检测报警系统,要求至少能对两种空气质量指标进行检测,并实时检测和显示,超限报警报警,成本低,性能稳定。

1.2系统框图。

系统采用模块化设计,主要分为六个模块。

PM2.5粉尘传感器和SGP30气体传感器可以实时检测空气中PM2.5、二氧化碳和挥发性有机化合物VOC的浓度。

测量数据可由ADC0832转换成数字量显示在液晶屏上。

如果检测值超过设定阈值,蜂鸣器报警,提醒人们注意室内通风,厨房炒菜时要注意开门开窗,尽量避免室内吸烟,有条件的可以打开空气净化器,当各种检测值低于阈值时可以关闭,避免不必要的浪费。

2系统硬件设计本文设计的空气质量检测系统硬件采用STC89C52单片机、GP2Y1014UPM2.5传感器、DHT11温湿度传感器、Ze08-ch2o甲醛传感器、LCD1602液晶显示器、ADC0832模数转换器等。

2.1 SCM最小系统。

STC89C52单片机是新一代单片机,具有速度快、功耗低、抗干扰能力强等优点。

Stc89c52单片机的指令系统与传统的8051单片机完全兼容,有两种时钟周期供用户选择,即12时钟机周期和6时钟机周期。

其工作电压范围为5.5v~3.3v或3.8v~2.0v,工作频率范围为0~40mhz,相当于普通80510~80mhz。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

夏普GP2Y1010AU0F_粉尘传感器参考程序简介:
Sharp's GP2Y1010AU0F 是一款光学空气质量传感器,设计用来感应空气中的尘埃粒子,其内部对角安放着红外线发光二极管和光电晶体管,使得其能够探测到空气中尘埃反射光,即使非常细小的如烟草烟雾颗粒也能够被检测到,通常在空气净化系统中应用。

该传感器具有非常低的电流消耗(最大20mA,典型值11mA),可使用高达7VDC。

该传感器输出为模拟电压,其值与粉尘浓度成正比。

可测量0.8微米以上的微笑粒子,感知烟草产生的咽气和花粉,房屋粉尘等.体积小,重量轻,便于安装,广泛应用于空气清新机,换气空调,换气扇等产品.
灵敏度:
0.5V/0.1mg/m3
尺寸:
46.0 × 30.0 × 17.6 mm)
Do not miss the 150ohm resistor and a 220uF capacitor
Arduino Pin
Sensor
Pin
1Vled–>5V (150ohm
resistor)
2LED-GND–>GND
3LED–>Digital pin 2
4S-GND–>GND
5Vo–>Analog pin 0
6Vcc–>5V
The LED pin has to be modulated with a cycle of 1ms as discussed in the datasheet. The LED seems to use a PNP transistor so to power on, the LED pin must actually recieve a lower voltage.
例程;
int dustPin=0;
int dustVal=0;
int ledPower=2;
int delayTime=280;
int delayTime2=40;
float offTime=9680;
void setup(){
Serial.begin(9600);
pinMode(ledPower,OUTPUT);
pinMode(4, OUTPUT);
}
void loop(){
// ledPower is any digital pin on the arduino connected to Pin 3 on the sensor
digitalWrite(ledPower,LOW); // power on the LED delayMicroseconds(delayTime);
dustVal=analogRead(dustPin); // read the dust value via pin 5 on the sensor delayMicroseconds(delayTime2);
digitalWrite(ledPower,HIGH); // turn the LED off delayMicroseconds(offTime);
delay(3000);
Serial.println(dustVal);
}
如有侵权请联系告知删除,感谢你们的配合!。

相关文档
最新文档