This project utilises a Plantower PMS7003 particulate matter sensor and a NodeMCU ESP8266-12E to remotely send live air-quality data to MadSensor's "NodeMCUBrendan" Dashboard. The data consists of PM 1.0, PM 2.5 and PM 10.0 particle readings which are plotted overtime at 30 second intervals. This file will go throught the steps on how to set up both the NodeMCU and the PMS7003 to then be used with the provided code.
For this project, the NodeMCU will be programmed in the Arduino IDE and as such ESP8266-12E suppourt must be installed. The steps to do so are as follows:
- In the Arduino IDE: select "File > Preferences" and paste http://arduino.esp8266.com/stable/package_esp8266com_index.json into the "Additional Boards Manager URLs:" field then click "OK".
- From this, select "Tools > Board > Boards Manager..." to open the Boards Manager to then search and install "ESP8266 by ESP8266 Community" Now that NodeMCU suppourt is installed, the "ESP-12E Module" Board can be selected by going to "Tools > Board > NodeMCU 1.0 (ESP-12E Module)".
The PMS7003 is a particle concentration sensor which can be used to obtain the number of suspended particles in the air. This is accomplished using laser scattering, in which a laser is used to radiate the suspending particles in the air and the curve of scattering light change overtime can be found. From this, equivalent particle diameter and the number of particles with different diameter per unit volume can be calculated using the sensor's built-in microprocessor. The datasheet for this sensor provides the following functional diagram:
The Pin Definitions for the PMS7003 can be found in its datasheet:
Where:
- Pin 1 and 2 are 5V
- Pin 3 and 4 are GND
- Pins 6 and 8 are not connected
- Pin 7 and 9 are the Serial Port RX and TX, and
- Pin 10 and 5 are SET and RESET
For more information about the PMS7003 sensor, the datasheet can be found here.
The PMS7003 datasheet provides a circuit diagram of the PMS7003 connected to a generic Host MCU. This is how the sensor will be connected to the NodeMCU, with some minor modifications. For this project, only VCC, GND, RX and TX will be needed. Therefore, the pins being used on the NodeMCU will be Vin (5V), GND and D1 (GPIO4) as well as D2 (GPIO5) for the RX and TX pins. From this, the NodeMCU and the PMS7003 should be ready to use with the provided code.