Arduino compatible software for ESP8266 based environmental monitoring station. Includes temperature, humidity, barometric pressure and PM2.5, PM10 dust monitoring
Arduino
Latest commit b2a4602 Feb 21, 2017 @zen zen committed on GitHub Merge pull request #8 from lechup/master
Readme fixes

README.md

EnviroMonitorStation

EnviroMonitorStation (part of Smogly aka EnviroMonitor project) is an ESP8266 based, outdoor environmental monitoring station. It includes temperature, humidity, barometric pressure and most importantly, PM2.5, PM10 dust monitoring.

Features:

  • PM1.0, PM2.5, PM10 monitoring
  • temperature, humidity, barometric pressure monitoring
  • heater for exsiccating incoming air for better results in humid conditions (e.g. during autumn and winter)
  • post data to custom backend
  • post data to Wunderground
  • OTA updates for software
  • WiFi auto configuration
  • 12V/5V powered

Currently EnviroMonitor station is DIY project, we don't provide ability to buy monitoring station, you need to build it yourself. We also designed PCB and enclosure so you can easily build your own sensor. Moreover - every piece of the project is Open Source, so you can modify it for your needs.

Please stay tuned, this is work in progress. Prototypes are being tested and we will post usable software and HW design soon.

Hardware

Bill of Materials

Below is the list of parts you will need to build monitoring station:

Software

Backend configuration

Before sensor is added to the system, it needs to be registered on the backend side. After registration you will receive couple of parameters:

  • sensor ID - used to identify the sensor
  • API key - to be able to post and receive data from backend

Sensor configuration

After sensor is connected to power, it start local AccessPoint for initial configuration. User needs to connect to this AccessPoint and as a next step, familiar HotSpot configuration page should be presented. Using this simple page user can configure:

  • sensor ID (generated during sensor registration)
  • API access key (generated during sensor registration)
  • WiFi network and password to use for sending data
  • backend and OTA server address

Once you finish configuration, sensor will reboot, and join configured WiFi network. If there was any error , e.g. wrong password, sensor will again reboot into AccessPoint mode, so you are able to correct configuration.

How we measure parameters

In every cycle device measures couple of parameters and sends them to EnviroMonitorWe backend. In current version of hardware we measure:

  • PM1.0, PM2.5 and PM10
  • external temperature and humidity
  • external barometric pressure
  • temperature and humidity of air incoming to PMS3003 sensor

Before we start measuring PM* parameters, we ensure that incoming air is of accepted parameters: it's humidity and temperature are acceptable. This is required because humid air particles have size similar to PM1 and PM2.5 and can impact precision of measurement. To overcome this effect one could try to figure out how humidity and temperature impacts the measurement (develop mathematical function) or heat the air. We decided to incorporate heating plate near PMS3003 air intake.

Once the air reaches accepted humidity level, we start PM* measurement. Raw data is then sent to backend using simple HTTP GET call. For every monitoring station we can apply individual calibration functions before data is presented.

Software updates

Every sensor can be updated over-the-air. Once a day sensor sends special request to backend asking for new compiled software image. Using combination of hardware versions and software version for given hardware backend decides to send new image to sensor over HTTP. Before applying new image we launch pre-update functions ensuring that even if update goes wrong, sensor is safe, e.g. we switch off the heater. Once the update is successful, we use post-update function to get back all sensor features.

Development

EnviroMonitor project is developed as a community and open source / open hardware project. We use Github for all the development workflow. EnviroMonitorStation is Arduino based project, but we use PlatformIO development environment. Please follow PlatformIO getting started guide to set up your environment. We try too keep our code Arduino compatible, so it's possible to use Arduino IDE for development, but we strongly recommend using PlatformIO.