GP2Y1010AU0F Dust Module Features
The 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.
You can download the datasheet of this module here.
GP2Y1010AU0F Dust Module Datasheet
GP2Y1010AU0F Dust Module Pinout
This sensor has 6 pins:
- 5V: Module power supply – 5 V
- GND: Ground
- LED: Input LED
- V-LED: LED power supply
- OUT: Analog output
You can see pinout of this module in the image below.
Required Materials
Hardware Components
Software Apps
Interfacing GP2Y1010AU0F Sensor with Arduino
Step 1: Circuit
The following circuit shows how you should connect Arduino to GP2Y1010AU0F module. Connect wires accordingly.
Step 2: Code
Upload the following code to your Arduino.
/*
Refrains : https://create.arduino.cc/projecthub/mircemk/diy-air-quality-monitor-with-sharp-gp2y1010au0f-sensor-7b0262
Standalone Sketch to use with a Arduino UNO and a
Sharp Optical Dust Sensor GP2Y1010AU0F
*/
int measurePin = A0; //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 = 170 * calcVoltage - 0.1;
Serial.println(dustDensity); // unit: ug/m3
delay(1000);
}
After uploading the code, you can see the output in the serial monitor.
You can see the graphical output with processing3 software. Click here to download the sample code in processing3.
Comment (1)
Hi,
You didn’t describe the capacitor and resistor you have used.
NM