GP2Y1010AU0F sensor in the Keyestudio KS0196 PM2.5 Dust Sensor Module

I started my quest to get this working a year ago.
I ended up with something that compiled, but produced gibberish. I got so mad at it I left it tell me gibberish for over a year while I had steam coming out of my ears (That would not register on the sensor, BTW).

Yesterday while helping a Customer here on the Forums, I became aware that there is now an EspHome official sensor for GP2Y1010AU0F. Well, that should make it easier to install instead of interpreting Arduino code to pretend I knew how to lambda my way to a actual measurement…
I got some help from ssleb on the EspHome Discord, and this is what I have working now. It appears to be working, we’ll see for sure next time I burn grilled cheese on the griddle. If you want to see more about the journey check it out on the EspHome Discord Thread: Discord

Here is the YAML I am currently running:

sensor:
    # GP2Y1010AU0F sensor in the Keyestudio KS0196 PM2.5 Dust Sensor Module.
  - platform: gp2y1010au0f
    name: '${friendly_name} Indoor PM2.5'
    sensor: aq
    output: led
    update_interval: 58s

  - platform: adc
    internal: true
    name: "${friendly_name} Raw Dust"
    accuracy_decimals: 6
    unit_of_measurement: "volts"
    pin: 36
    id: aq

output:
    # GP2Y1010AU0F Sample LED in the Keyestudio KS0196 PM2.5 Dust Sensor Module.
  - platform: gpio
    pin:
      number: 16
      inverted: true
    id: led

If you have any comments or updates feel free to add them here as a resource to others. If you can’t get it to work, well, I’m hanging on to a thread here, so your best source of answers beyond what I did is ask in that thread on the EspHome Discord listed above.

Thanks for your time and I wish you well.

1 Like