Introduction: How to Interface With Optical Dust Sensor

Picture of How to Interface With Optical Dust Sensor

This tutorial is going to teach you basics on using Optical Dust Sensor.

Step 1: Introduction


Sharp's GP2Y1010AU0F is an optical air quality sensor, or may also known as optical dust sensor, is 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.

To interface with this sensor, you need to connect to its 6-pin, 1.5mm pitch connector by using mating connector.


  • Low Current Consumption (MAX: 20mA)
  • Typical Operating Voltage: 4.5V to 5.5V (MAX: 7V)
  • The presence of dust can be detected by the photometry of only one pulse
  • Enable to distinguish smoke from house dust
  • Dimensions: 1.81 x 1.18 x 0.69'' (46.0 x 30.0 x 17.6mm)

Step 2: Pin Definition

Picture of Pin Definition

Step 3: Sample Hardware Installation

Picture of Sample Hardware Installation

Step 4: Sample Schematic

Picture of Sample Schematic

The above schematic is applicable to both Arduino Uno and Arduino Fio.

*For Arduino Uno, connect Pin Vo of GP2Y1010AU0F to Pin A5 of Arduino Uno. And also, Pin V-LED and Pin Vcc of GP2Y1010AU0F can be connected to either 5V or 3.3V of Arduino Uno.

Step 5: Sample Source Code

To get the result, please download the sample source code attached below and upload it into Arduino.

*Kindly download the datasheet of Optical Dust Sensor for your own reference and for understanding the coding written better.

Step 6: Ways to Open "Serial Monitor"

Picture of Ways to Open "Serial Monitor"

Step 7: Result (1)

Picture of Result (1)

The reading shown on Serial Monitor when the optical dust sensor is left in a room. The measurement of dust density obtained shows that the air only contains a low amount of dust.

Step 8: Result (2)

Picture of Result (2)

The reading shown on Serial Monitor when a pen is inserted into the dust detector area. The measurement of dust density obtained shows that there is a high amount of dust in the air.

Step 9: Video

This video shows how optical dust sensor works.


TizanaMenYo (author)2017-12-04

i don't know where did you get the equation to calculate the dust density ?
(0.17*Voltage)-0.1 ??

i tried the equation with linear part of the curve in the datasheet it didn't give me the correct dust density ? did you change the unit ?

AwG1 (author)2017-11-13

Why your code is in reverse mode ?

In your coude, you make reade with LED OFF ? Are you sure this is ok ??

ShaileshD9 (author)2017-07-09

Hi, senor is not workinG. Even we had inserted pen in the sensor but still its not working.!!!

IgorF2 made it! (author)2017-06-28

It seems to be working.

How do you test its output? I put an object inside de sensor, but the maximum output was around 3.64V.

sabiqmd (author)2017-04-30

how can i get PM2.5 value from dust density value please help

MaxL65 (author)2017-04-27

First of all thank you for sharing this instruction. It worked right the first time. However, I have an issue. When I place a pen or something in the hole, the Dust Density values plotted by the Monitor do not change much. They are varying between 0.08 and 0.15 as the following shows:

Raw Signal Value (0-1023):
Dust Density:

Does that indicate that the sensor is not working properly? I am using a WaveShare sensor shield and the wiring is double-checked as well. I appreciate any feedback :)

bonsaiclub made it! (author)2017-02-21

It is working like a charm. :)

Thank you.

123smile (author)2016-07-24

how did you get the equation for relating dust density and output voltage? it's not in the spec sheet.

mybotic (author)123smile2016-08-17

Hi, the equation is derived from the given graph which inside the datasheet.

Wrrr 10-G (author)2016-07-13

To the commenters: it can be very wise to know about dust-in-air ratio when working with combustible powders (sawdust, carbon, sugar, flour, etc). If you don't know what I'm talking about, try googling "dust explosion".

ThomasK19 (author)2016-07-11

Where would you need such a device? To warn you cleaning up your living room?

pityukecske (author)ThomasK192016-07-13

Place 10000 of these all around the world, and give stats about the place one should visit when searching for a breath of fresh air. A bit l'art pour l'art, but hey :)

mybotic (author)ThomasK192016-07-11

depend on the project, this sensor can put inside the machine or device and it able to use to detect the dust density inside the machine or device. Thus, the user know the time to clean the device.

About This Instructable



More by mybotic:How to use ESP32 to Control LED With Blynk Via WiFiTutorial for ESP8266 ESPDuino NodeMcu SPI Module Using Arduino UnoTutorial for L298 2Amp Motor Driver Shield for Arduino
Add instructable to: