The GP2Y1010AU0F it is a compact optical dust sensor that has an infrared emitting diode and a phototransistor that are diagonally arranged. It detects in fact the reflected light of the present dust in the air. It is effective to detect very fine particle like cigarette smoke and it can distinguish from the house smoke from the house dust.
GP2Y1010AU0F sensor. |
Internal schematic |
According to the specification in the datasheet also you will need an 150 ohm resistor and a 220uF capacitor, both came with the package.
Connect them according to the datasheet.
Resistor and capacitor |
The provided analog output is proportional with the number of the dust particle in the air. Powering the phototransistor part with 3V3 will not get exact the output graph from the datasheet unless you will not use the 5V Vcc. If you need to be 100% to the datasheet and you are using an wemos D1, add a resistor in series with the output VO (pin 5) so the maximum voltage on the A0 input will not exceed 1V. Probably an 180k resistor will be fine.
Output voltage vs dust density |
Based on the output voltage you can setup some steps for the air quality like excellent, very good, good, fair or dusty.
Here is a video clip on how is working with iotcentral.eu platform and Amazon Alexa.