I realized a prototype-board with an old ATmega8 and a particle dust sensor. Both supplied with the 5V. The sensor output voltage is normally high (>4V), and falls below 0.7V if the sensor detect the presence of the dust. The percentage of dust depends on the time in which the output of the sensor is low in a 30sec interval.
Here the datasheet: http://www.seeedstudio.com/wiki/images/4/4c/Grove_-_Dust_sensor.pdf
Now I have to switch to the more modern ATXMega256A3BU, which can't receive a 4V level in input because is supplied with a 3V3.
What is the best way to interface these two devices? With an high-speed op-amp as comparator? With an <1 gain op-amp?


