Friday, July 23, 2021

SDS011 PM2.5/10 Particulate Meter

It's unfortunately forest fire season again in British Columbia, and we've had a pretty terrible start with a lethal heatwave, highest ever recorded temperatures in Canada at the town of Lytton followed shortly by its destruction due to a fire.

Currently, there are hundreds of active fires around BC, and I am reminded by what happened less than a year ago, when we returned from our cross Canada moving trip, we drove right back to a pretty smoggy BC:

Somewhere near Coquihalla Summit, on our last day of the return trip (Sep 2020)

The air quality in Vancouver is currently still pretty close to normal, but as a precaution we've doubled up on our air filtration capacity and I've also started looking into DIY solutions. Here is a Honeywell filter cartridge and an Amazon box + muffin fan combo that I've started experimenting with.


Of course, its difficult to quantify the effect of anything you build, and combining my interest in building various IoT gadgets, I decided to try and build something myself. After a quick search, I settled on the Nova Fitness SD0S11 laser diode based solution due to its widespread availability and what looks like reasonable quality for the price. Within about 3 weeks a yellow AliExpress package arrived, and I was able play with it a bit up during my thesis-finalizing procrastination periods.

The sensors look pretty simple to work with, as it contains a standalone microcontroller and communicates via a 9600 UART. The sensors conveniently comes with a CH340G-based USB-UART converter that also powers the device via your USB port. The device is supposed to draw around 100mA max, and my guess is most of it is to power the small fan that draws air through the inlet tube and through the measurement chamber. 


As they say, a person with a watch always knows what time it is; a man with two watches is never sure...

I decided to get two of them to compare any inter-device variation, and while it was possible to get another microcontroller to talk to it, the quickest way appeared to be via the python interface, which was able to access the sensor data with a few lines of code. Out of the box, the sensor will be always on and query every second, but apparently this is not good for the long term longevity and of course will also draw more power since the fan and diode are on all the time. So here's the overall process for an occasional poll:

- init device with serial port
- wake up the device (if asleep).
- wait 15 seconds (probably to purge the measurement chamer)
- query the sensor (returns two values, PM2.5 and PM10)
- put it back to sleep (this prolongs sensor life)
- delay for the desired sleep period (subtract warmup time above)

... rinse and repeat as needed.



From here, I was able to read the data pretty quickly (I spent more time updating macports and installing python3...)

Since I had two of them, the obvious first thing to do is see how much inter-device variation there is between the two I got. I ran the two sensors for two tests consisting of about an hour each, with 1 minute polling intervals. Data plot to come...

No comments: