打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Sharp Dust Sensor and Arduino
Sharp’s GP2Y1010AU0F is an optical air quality sensor, designed to sense dust particles. An infrared emitting diode and a phototransistor are diagonally arranged into this device, to allow it to detect the reflected light of dust in air. It is especially effective in detecting very fine particles like cigarette smoke, and is commonly used in air purifier systems.
The sensor has a very low current consumption (20mA max, 11mA typical), and can be powered with up to 7VDC. The output of the sensor is an analog voltage proportional to the measured dust density, with a sensitivity of 0.5V/0.1mg/m3.This is how the optical dust sensor works:
According to theGP2Y1010AU0F data sheet, all 6 pins on sensor need to be connected to Arduino:
Do not miss the 150ohm resistor and a 220uF capacitor:
Sensor Pin
Arduino 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.
Ok, you should now have every thing connected:
The Arduino source code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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);
}
Reference:
http://www.staceyk.org/airSensors/sensorsetup.php
http://itp.nyu.edu/physcomp/sensors/uploads/arduino.txt
http://itp.nyu.edu/physcomp/sensors/Reports/GP2Y1010AU
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
自制PM25灰尘检测装置
Arduino下LCD1602综合探究(中)——如何减少1602的连线,LiquidCrystal库...
使用Atmega 16/16A的Arduino复制板串口通信
想学嵌入式?要不一起玩 Arduino 吧
用ARDUINO开发板自制温湿度计(含WEMOS D1开发板环境安装)
秒懂舵机角度控制原理
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服