Long story short I’m in the process of building an outdoor air quality, temperature, humidity, pressure, and motion sensor setup for my front porch. One is the PM1006K which is a cheap (10.00 on Amazon) pm2.5 sensor. It’s supposedly used in some consumer air filter systems and a review said it worked with ESPHome… well it does after a ton of poking and prodding with a little flogging of the wires.

The link is to the github page where I have the final product posted. I know there are better sensors available but they tend to run more and the really good ones use a laser sensor and burn out over time so it becomes an ongoing (some only last 8000 hours) expense.

This one is a DC01 Infrared PM2.5 Air Quality Sensor. And I’m pairing it with a DHT22 for temperature and humidity, a BMP280 temperature and barometric pressure sensor, an MQ-2 + MQ-7 + MQ-135 for hazardous gasses and smoke, and a BH1750 light sensor, a AM-312 + a HC-SR04 for motion detection. All running on an ESP32-S3 which is also acting as a Bluetooth Low Energy proxy.

All the code will be able to be found at https://github.com/nightshade00013/MuttMutt-ESPHome when it’s 100% completed. But being the pm2.5 working correctly was a huge step in the right direction. And the main reason why I am posting this now so others who are interested in building a cheap sensor can get started.

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    6
    ·
    17 days ago

    From my experience, I wouldn’t buy DHT22 anymore. I’ve had multiple ones fail outside. After several months, they’d report random humidity values, or saturate and report 100% all the time. Whereas you could swap the BMP280 for a BME280 and get humidity on that chip. I haven’t had any issues with those.

    Though I’m not sure about calibration. I had DHT22 and BME280 run in parallel for a while and they’d report different values. Not sure which one is more accurate.

    • MuttMutt@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      17 days ago

      I’ve had a DHT-22 running for years. The sensor pack is 100% sheltered. DHT-22’s fail if they get any moisture beyond humidity on them.

      The BME/BMP-280’s produces a little bit of heat so it will potentially run a little high. But using a filter is simple enough to calibrate if you really need to have the correct value. Just adjust it based on a known trusted value.

      • hendrik@palaver.p3x.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        17 days ago

        Wonder if it’s possible not to get water on the sensor. I mean at some point there will be conditions outside when water condensates. And that’ll inevitably get them wet.

        Yes, I figured out BME280 dissipate heat. There’s different refresh rates available and they’ll all generate more or less heat and skew both temperature and humidity readings. I’ve now set them to the lowest interval. I don’t need several readings each second anyway, at least for my outside weather station 😆

        • MuttMutt@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          17 days ago

          My sensors are mounted on my front porch so literally it would have to rain upwards. I’ve dealt with storms, extreme heat (it was 102 yesterday and had rained a bit that morning so the humidity was high too), 100% humidity, cold (was down to about 10 degrees F last winter), and everything else Oklahoma weather can throw at it.

          The DHT-22 has survived that since January 2023. If there was condensing humidity it didn’t kill it.

          • hendrik@palaver.p3x.de
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            17 days ago

            Nice! I have some sensors running for many years as well. One of the older particle sensors, a BME280 and a geiger tube, just in case there’s some secret nuclear explosion. It’s super sensitive to sunlight, though. It’s all mounted underneath the balcony, so no rain either. And the temperatures are a bit off, due to the wall of the house.

            Yeah, I meant condensation as in the grass is soaking wet in the morning. There’s no rain on my sensors either, yet I threw out 2 or 3 DHT11/22. I tried drying them as well, but to limited success. Idk. Some people say there’s low quality DHT clones out there and better ones?! But I have no idea why mine kept failing. They’ve all been from different batches and online sellers.

            102F plus humidity sounds nasty.

            • MuttMutt@lemmy.worldOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              17 days ago

              It can be hit or miss for a lot of things. I rarely buy the more expensive stuff but did splurge on an ESP32 for my porch WLED setup as the cheapo kept having issues with the 1400 addressable LED’s. I’ve bought all kinds of sensors and there have been a couple duds but in general I’ve made out better than buying the more expensive ones and I can experiment more with cheap ones.

              My plan is to have a couple sensor packs built and aggregate the results then average them out for a more accurate picture. But I’m putting things in as I rebuild the house. It was what I call a slumlord house, no insulation, bad plumbing, shot roof, knob and tube electrical, etc… But I can go through and run whatever wherever.

                • MuttMutt@lemmy.worldOP
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  17 days ago

                  May as well, lol. When the house is done I should have a decent cash flow positive enough to be able to spend more time diving and traveling.

                  I’m using wled and just have random things that play and I manually set different ones on certain holidays. Nothing super fancy. I will eventually add more strips and light the whole house… may even attach to my soalar racking with a few strips. I have concrete headstones for Halloween and will be making a couple more but I am not sure if I want to run lights on them. Eventually my front yard will have a couple fruit trees with a pergola to put some on. After that I will probably look at a light show. The house is a semi craftsman style so I’m considering downlighting the side walls with a strip instead of going along the edge of the roof. With a white house it can be any color I want at night.

                  For Christmas I do have a couple things that are lit up. My other half bought a couple wire lit yard things that I have installed WS2812B fairy lights in and I made a WLED sign that says Merry Christmas in the same fairy lights. At some point I’m going to do a Christmas tree the same and mount it somewhere in the front.

  • bwrsandman@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    17 days ago

    I’ve been looking for something like this! Great work!

    What kind of temperature ranges is this capable of functioning in? Where I live, we can get pretty cold winters (-5C to -45) in half the year.

    • MuttMutt@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      17 days ago

      I’m not 100% certain yet on the temp range but at 10.00 and a fairly long life I figure that it was worth the risk.

    • MuttMutt@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      16 days ago

      Nope this is a different version than the official docs. I tried that and it didn’t work at all. This version constantly sends data every second and does not accept communication. You don’t even have to connect the device rx pin. The output is via UART continuously, all you can do is receive the output information.

  • MuttMutt@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    17 days ago

    Just a bit of information for anyone out there who may have already tried the project. I made a small change as after a time period the logs begin getting spammed with:

    13:56:23 [W] [pm1006k:048] Checksum error: calculated 0xAA, got 0x2A 13:56:24 [W] [pm1006k:048] Checksum error: calculated 0xAA, got 0x2A 13:56:25 [W] [pm1006k:048] Checksum error: calculated 0xAA, got 0x2A 13:56:26 [W] [pm1006k:048] Checksum error: calculated 0xAA, got 0x2A 13:56:27 [W] [pm1006k:048] Checksum error: calculated 0xAA, got 0x2A 13:56:28 [W] [pm1006k:048] Checksum error: calculated 0xAA, got 0x2A 13:56:29 [W] [pm1006k:048] Checksum error: calculated 0xAA, got 0x2A 13:56:30 [W] [pm1006k:048] Checksum error: calculated 0xAA, got 0x2A

    The change fixes that issue through adjusting the checksum. I am going to leave my testbed up and running for a few days to see if any other issues come up.