物聯網開發硬體應用
Would you like to react to this message? Create an account in a few clicks or log in to continue.
物聯網開發硬體應用

提升國內高職學生物聯網開發硬體應用入門技術 待進入科技大學再升級為物聯網開發硬體設計人員


您沒有登錄。 請登錄註冊

鋒利的光學粉塵感應器 (GP2Y1010AU0F)

向下  內容 [第1頁(共1頁)]

1鋒利的光學粉塵感應器 (GP2Y1010AU0F) Empty 鋒利的光學粉塵感應器 (GP2Y1010AU0F) 周日 11月 08, 2015 2:26 pm

Admin


Admin

鋒利的光學粉塵感應器 (GP2Y1010AU0F) Sharp_12
介紹

鋒利的光學粉塵感應器 (GP2Y1010AU0F) 是在檢測極細的粒子像香煙的煙霧特別有效和常用的空氣淨化系統。

紅外發射二極體和光敏三極管對角地被安排到這個設備,使其能夠檢測空氣中的灰塵反射的光。

感應器具有非常低的電流消耗 (20mA 最大,11mA 典型),可以與通電 7VDC。感應器的輸出是類比電壓成正比測量的粉塵濃度,靈敏度為 0.5V/0.1mg/m3。

規格
##電源電壓: 5-7V
##工作溫度:-10-65 攝氏度度
##消耗電流: 20mA 最大


int measurePin = 0; //Connect dust sensor to Arduino A0 pin
int ledPower = 2; //Connect 3 led driver pins of dust sensor to Arduino D2

int samplingTime = 280;
int deltaTime = 40;
int sleepTime = 9680;

float voMeasured = 0;
float calcVoltage = 0;
float dustDensity = 0;

void setup(){
Serial.begin(9600);
pinMode(ledPower,OUTPUT);
}

void loop(){
digitalWrite(ledPower,LOW); // power on the LED
delayMicroseconds(samplingTime);

voMeasured = analogRead(measurePin); // read the dust value

delayMicroseconds(deltaTime);
digitalWrite(ledPower,HIGH); // turn the LED off
delayMicroseconds(sleepTime);

// 0 - 5V mapped to 0 - 1023 integer values
// recover voltage
calcVoltage = voMeasured * (5.0 / 1024.0);

// linear eqaution taken from http://www.howmuchsnow.com/arduino/airquality/
// Chris Nafis (c) 2012
dustDensity = 0.17 * calcVoltage - 0.1;

Serial.print("Raw Signal Value (0-1023): ");
Serial.print(voMeasured);

Serial.print(" - Voltage: ");
Serial.print(calcVoltage);

Serial.print(" - Dust Density: ");
Serial.println(dustDensity); // unit: mg/m3

delay(1000);
}

https://iotboard.666forum.com

回頂端  內容 [第1頁(共1頁)]

這個論壇的權限:
無法 在這個版面回復文章