Laser particle detectors are a high-tech way for quantifying whats floating around in the air. With a fan, a laser, and a sensitive photodetector, they can measure smoke and other particulates in real-time. Surprisingly, they are also fairly cheap, going for less than $20 USD on some import sites. They just need a bit of encouragement to do our bidding.

[Dave Thompson] picked up a ZH03B recently and wanted to get it working with his favorite sensor platform, Mycodo. With a sprinkling of hardware and software, he was able to get these cheap laser particle sensors working on his Raspberry Pi, and his work was ultimately incorporated upstream into Mycodo. Truly living the open source dream.

The ZH03B has PWM and UART output modes, but [Dave] focused his attention on UART. With the addition of a CP2102 USB-UART adapter, he was able to connect it to his Pi and Mac, but still needed to figure out what it was saying. He eventually came up with some Python code that lets you use the sensor both as part of a larger network or service like Mycodo and as a stand-alone device.

His basic Python script (currently only tested on Linux and OS X), loops continuously and gives a running output of the PM1, PM2.5, and PM10 measurements. These correspond to particles with a diameter of 1, 2.5, and 10 micrometers respectively. If you want to plug the sensor into another service, the Python library is a bit more mature and lets you do things like turn off the ZH03B’s fan to save power.

These sensors are getting cheap enough that you can build distributed networks of them, a big breakthrough for crowd-sourced environmental monitoring; especially with hackers writing open source code to support them.

…read more

Source:: Hackaday