Iduino SE035 User guide

IDUINO for maker’s life
User Manual
for
DIY GP2Y1010AU0F SHARP Dust Sensor
Compatible with Arduino(SE035)
www.openplatform.cc
IDUINO for maker’s life
Pin order
Pin Name
Pin description
1
V-LED
IRED Power positive input
2
LED-GND
IRED Power negative input
3
LED
IRED switch control pin
4
S-GND
Power Ground
5
Vo
Analog voltage output
6
Vcc
Power postive
Description:
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. To interface with the sensor you need to connect to its 6-pin, 1.5mm pitch connector.
Specification
Compact, thin package (46.0 × 30.0 × 17.6 mm) Low consumption current (Icc: MAX. 20 mA) The presence of dust can be detected by the photometry of only one pulse Enable to distinguish smoke from house dust Lead-free and RoHS directive compliant
Include:
• 1 x Dust Sensor
• 6 x Dupont Line
1 x Resistor
• 1× Capacitor
Pinout
www.openplatform.cc
IDUINO for maker’s life
Tutorial
In this exercise with the use of our Arduino Yún, we learn to build our detector air quality. To do this we will use the capabilities of the GP2Y1010AU0F. It's a dust sensor by optical sensing system with an infrared emitting diode (IRED) and a phototransistor that 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. The output of the sensor is an analog voltage proportional to the measured dust density, with a sensitivity of 0.5V/0.1mg/m3.
What do we need
an Arduino Yún board a Sharp Optical Dust Sensor (GP2Y1010AU0F) a breadboard a 220 uF capacitor a 150 Ohm resistor a bunch of wires
The circuit
www.openplatform.cc
IDUINO for maker’s life
Be sure to follow the connections shown in the fritzing circuit and in the next table :
Sharp pin 1 (V-LED) => 5V (connected to 150ohm resistor,220 uF capacitor) Sharp pin 2 (LED-GND) => Arduino GND pin Sharp pin 3 (LED) => Arduino pin 2 Sharp pin 4 (S-GND) => Arduino GND pin Sharp pin 5 (Vo) => Arduino A0 pin Sharp pin 6 (Vcc) => 5V
*****Code begin*****
/* Detector air quality with Arduino Yun and **
** Optical Dust Sensor (GP2Y1010AU0F) */
int dustPin = 0; // dust sensor - Arduino A0 pin
int ledP = 2;
www.openplatform.cc
IDUINO for maker’s life
float voMeasured = 0;
float calcVoltage = 0;
float dustDensity = 0;
void setup(){
Serial1.begin(230400);
pinMode(ledP,OUTPUT);
}
void loop(){
digitalWrite(ledP,LOW); // power on the LED
delayMicroseconds(280);
voMeasured = analogRead(dustPin); // read the dust value
delayMicroseconds(40);
digitalWrite(ledP,HIGH); // turn the LED off
delayMicroseconds(9680);
// 0 - 5V mapped to 0 - 1023 integer values
// recover voltage
calcVoltage = voMeasured * (5.0 / 1024.0);
dustDensity = 0.17 * calcVoltage - 0.1;
Serial1.print("Raw Signal Value(0-1023) : ");
Serial1.print(voMeasured);
Serial1.print(" - Voltage: ");
www.openplatform.cc
IDUINO for maker’s life
Serial1.print(calcVoltage);
Serial1.print(" - Dust Density: ");
Serial1.println(dustDensity); // mg/m3
delay(1000);
}
*****Code End*****
Reference:
https://www.sparkfun.com/products/9689
https://www.sparkfun.com/datasheets/Sensors/gp2y1010au_e.pdf
www.openplatform.cc
Loading...