Summary of An optical dust meter that uses the GP2Y1010AU0F sensor library made with AVR Atmega
This project is an optical dust detector using the GP2Y1010AU0F sensor and an AVR Atmega microcontroller. It reads the sensor's pulse-driven output with the ADC and converts it to dust measurements. Proper timing is critical: sample at 280 µs after the IR pulse, subtract ADC conversion time (13 ADC cycles) from that delay. Example: at 8 MHz CPU with ADC prescaler 64, ADC time is 104 µs, so delay 176 µs before reading. A GP2Y1010AU0F AVR library is provided.
Parts used in the Dust Detector:
- GP2Y1010AU0F dust sensor (optical dust sensor with IRED and phototransistor)
- AVR Atmega microcontroller
- ADC input connection (microcontroller ADC pin)
- Current-limiting resistor for the IR LED (implied by sensor usage)
- Wiring/connectors for sensor to microcontroller
- Power supply for sensor and microcontroller
This project is a dust detector that use the GP2Y1010AU0F sensor.
Attached you can also find the GP2Y1010AU0F sensor library for AVR Atmega.
Unfortunately the datasheet does not tell anything about the particle size detected, it just tell us that this sensor is for fine particle like cigarette smoke, that is to say about 0.5micron.
This sensor output a pulse-driven wave form that we can read using the ADC of our microcontroller to convert it to usefull data.
Looking at the figure 2 of the GP2Y1010AU0F datasheet we can derive the method to convert the output data.
Note that the sample time should be 280us to perform the correct reading, and this delay should consider that ADC conversion takes 13 ADC clock cycles, so ADCtime(s) = (1/ADCclock)*13 = (1/FCPU/ADCprescaler)*13.
So to perform reading at correct time we have to subtract the time taken by ADC convertion to the suggested time.
As example lets consider a micro running at 8Mhz, with ADC prescaler set to 64
(1/(8000000/64))*13 = 0.000104s = 104us
280us – 104us = 176us
we have to delay 176us and then we can read the sensor output voltage.
For more detail: An optical dust meter that uses the GP2Y1010AU0F sensor library made with AVR Atmega
- What sensor is used in the project?
The GP2Y1010AU0F optical dust sensor is used. - How does the GP2Y1010AU0F detect dust?
It uses an infrared emitting diode and a phototransistor arranged diagonally to detect reflected light from dust particles. - What particle size is the sensor effective for?
The datasheet does not specify exact sizes but states it is effective for fine particles like cigarette smoke, about 0.5 micron. - How is the sensor output read?
The sensor outputs a pulse-driven waveform that is read by the microcontroller ADC and converted to useful data. - When should the ADC sample the sensor output?
The sample time should be 280 microseconds after the IR pulse, minus the ADC conversion time. - How do you calculate the ADC conversion time?
ADC time equals 13 ADC clock cycles: ADCtime = (1/ADCclock) * 13 = (1/(FCPU/ADCprescaler)) * 13. - What is the example timing for an 8 MHz CPU with prescaler 64?
ADC time = 104 microseconds, so delay 176 microseconds (280 - 104) before reading. - Is there a library provided for this project?
Yes, a GP2Y1010AU0F sensor library for AVR Atmega is provided.

