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 the GP2Y1010AU0F 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|
|1||Vled||–>||5V (150ohm resistor)|
|3||LED||–>||Digital pin 2|
|5||Vo||–>||Analog pin 0|
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:
// ledPower is any digital pin on the arduino connected to Pin 3 on the sensor
// power on the LED
// read the dust value via pin 5 on the sensor
// turn the LED off