Design considerations

The pm2.5/pm10 sensor

Of course we can't easily make pm2.5/pm10 sensor ourselves but fortunately there are some existing ones on the market. We are looking for a sensor that is easy to buy and reasonably cheap but its measurements can actually be trust. Here's the list of sensors that were considered:

I didn't want to buy all of them so I had to choose one. Based on few Internet reviews, from which http://aqicn.org/sensor/ is the most convincing, I've chosen the last one for following reasons:

I bought it and first tests show quite good correlation between results obtained and expected.

Microcontroller

I would like make this project work on two platforms - normal atmega328p based Arduino (if uploading is not needed and reading current values from LCD is good enough) and ESP8266 for full featured version. In both cases, Arduino environment will be used for programming as this not only makes prototyping easy but also makes it much easier for others to contribute to the project.

ESP8266 comes in many surface mountable models. ESP-12F seems to be the best of them as it has all the usable pins broken on the edge. ESP-07 has mostly the same footprint (short of flash pins which probably won't be used in this project) but also has connector for external antenna so I would like the main board to also be compatible with this one.

Power source

The main power source should be A/C power as I hope those modules to run 24h a day, reporting all the measurements for further analysis. All the sensors uses fan for air ventilation using quite a lot of power so lasting on battery for weeks is not really possible. Still, I would like it to be portable enough to take it with me and do some measurements outside. At the same time I want to be cheap.

The sensor (sds011) requires 5V (with 3.3V UART). While Arduino can run on both 3.3V and 5V, ESP8266 is 3.3V only. So we need 5V and a voltage regulator.

For those reasons, microusb will be used for providing power. Cheap 1117 linear regulator will be used for 3.3V (at least in first revisions) to ESP8266. Microusb connector makes it easy for everyone to find spare power adapter and also makes it very easy (and cheap) to use battery by using cheap power banks.

SDS011 module takes ~100 mA when in active mode and around 3mA when sleeping. ESP8266 requires ~100mA when uploading data, ~70mA when idling with WiFi connected, ~15mA when WiFi is disabled (so called modem sleep) and <1mA when in deep sleep.

LCD

I would like current values to be displayed somehow. While ultra low power consumption is not a priority right now, I would still like this module to be portable so it has to be usable on batteries with LCD constantly displaying values. Also, since ESP8266 is planned as a main platform, it has to be usable with low amount of pins. And again, it has to be cheap and easy to buy.

Few LCDs were considered:

OLED displays may be operated using both SPI and I2C but they are smallest and most expensive from the three. They also use quite a lot of power (~20mA). HD44780 uses ~2-3 mA and are cheap so they could be used but they have quite limited display area. PCD8544 based displays use least power ~0.2mA, has ~1.5" diagonal and can easily provide 12x6 of very readable text area. They can be driven by only 3 pins which is good enough. Nokia LCD seems to be the best candidate for this project.

Usability

I assume most of the users of this module won't necessarily be programmers, even less of them will be familiar with ESP8266 development environment (even though Arduino environment was chosen to easy that). I suppose some of them won't even be hackers (they may have the module built by someone else). For those reasons, the module has to be easy to use, configure and upgrade.

Fortunately ESP8266 makes all of this possible. Configuration can be done by web interface when device is put to AP mode and doing OTA upgrade (also using web interface) is also possible. Using device as both WiFi client and Access Point at the same time was considered but since device is taking quite a lot of current in this mode (can't go to sleep), I decided to use AP mode only in "service/configuration" mode. To enter this mode, push button will have to be pressed when powering/resetting the device.

Another the push buttons will be available:

Enclosure

There will be two enclosures - internal and external. Internal one is used just to hold all components together and to be able to easily take the sensor outside for some measurements (as I want it to be portable). I aim at easy to build and cheap enclosure. Because of the price point, using 3D printed enclosure is not an option. Using universal project enclosure was considered but It would have to be customised (by drilling/cutting holes). Providing good ventilation may also be problematic (even though SDS011 can be easily connected with a 6mm hose). I think that the best option will be to use two sheets of laser cut 2mm plexi, some screws and spacers. Laser cut plexi is cheap and quite easy to get and since all the drills will be made by a machine, screwdriver will be all that is needed to put the whole thing together.

External enclosure will be created from some large plastic box with some ventilation grills on the sides. It has to protect the module from rain and wind providing good ventilation at the same time.

Risks

Sensor accuracy

Dust sensor is key component of this project. When choosing it, I was looking at the highest accuracy I could within the budget. While SDS011 seemed to achieve good results in tests I've seen specification says its relative error is maximum of 15% and +/- 10ug/m³ (at room temperature and humidity). While 15% seems good enough to me, +/- 10ug is problematic since we are aiming at measuring values in the range of 5-50 ug/m³ (50 being the 100% of the norm). Another risk is that those errors are expected at room temperature/humidity but those sensors will be used outdoors.

First tests of the sensor shows at least that the measurements can be very reproducible. I have plans on doing some comparison tests with professional measuring equipments.

Weather conditions

Those sensors will be mainly used outdoors so they should behave in wide range of weather conditions. Again, SDS011 is the most important part here. Its work environment is specified as:

Now I'm quite satisfied with the temperature but we have to keep it in mind at winter in cold areas and protect it from the very sunny environments at summer. Humidity may be the problem, though. I guess that when humidity is high, the measurements can be wrong because of high amount of water particles in the air. I will add temperature and humidity sensor to the project so that we can also monitor weather conditions.

Components lifetime

I'm concerned about the lifetime of the components used. SDS011 and ESP8266 are of the main concern to me. ESP8266 is quite new part and it didn't yet prove its robustness.

SDS011 consists of a laser, photo diode and a fan. The laser used has 8000h specified lifetime. That's a lot since we won't be doing constant measurements (there will be quite long intervals between measurements). I'm not really concerned about photo diode lifetime but I am concerned about it getting dirty from dust after some time. It will have to be cleaned from time to time. Fan is another problematic component. Fortunately we can stop it by entering sleep mode but still fans can fail quite easily.