PM2.5 – A SensorWeb project by Mozilla

About SensorWeb

SensorWeb is a connected Device project by Mozilla. You can visit sensorweb.io for more information

Initial requirements :-

  • Hardware required : PM2.5, ESP8266 Arduino (there are other arduino like boards too. checkout github repository for more details) and connecting male-female wires. Check out images for more clarity.
  • Download and install Arduino IDE. I followed this blog .
  • Clone the sensor-web arduino-station  from github for the firmware. This is used to configure your arduino ESP8266 board.
  • In firmware code, you need SSID and Password (i.e Wi-Fi name and password) for internet connection so that collected data can be uploaded to SensorWeb server.   Data can be seen as visualization on SensorWeb dashboard.
  • Also, you need API key and sensor id.  Either you can request these from its website by filling contribute form or you can mail them directly with your name, email, location. They will setup a station for you on the dashboard.

Installation and configuration steps for ESP8266 arduino and PM2.5 :-

  1. Wiring connection between PM2.5 and Arduino ESP8266IMG_20160622_161828
  2. As you can see in the image : PM2.5 sensor and arduino board. PM2.5 sensor has 8 pins (let’s say, leftmost as 1st and rightmost as 8th pin ). 1st – 2nd are power pins (Vin & GND) while 4th – 5th pins are data pins (Tx & Rx).
  3. Connect 1st pin and 2nd pin of PM2.5 to Vin (+ve) and GND (-ve) of arduino board respectively. You can see in above image : violet color wire for Vin and red color wire for GND.
  4. Connect 4th pin and 5th pin of PM2.5 to Tx and Rx of arduino board respectively.
  5. You are done with wiring connection. Yay! :). All are other pins of PM2.5 are not required now.
  6. Run the Arduino IDE (as root or administrator) and click on File and navigate to Preferences. Add http://arduino.esp8266.com/stable/package_esp8266com_index.json  in Additional Boards Manager URLs:Screenshot from 2016-06-17 15-30-59
  7. Click on Tools and navigate to Boards > Boards Manager and search for ESP. Select & install esp2866photo446984252042618933Screenshot from 2016-06-22 17-27-23
  8. Now again click on Tools and navigate to ESP2866 modules and select NodeMCU 0.9 (ESP-12 module)photo446984252042618934
  9. Click on the File and open the firmware code in the IDE and modify the SSID, password, API key and Sensor id.
  10. Now click on the verify icon, then upload icon to flash the firmware to the ESP2866 arduino board.
  11. Now you are good to go 🙂 . Connect arduino with power source and after few minutes you can see your PM2.5 data on SensorWeb dashboard.

Note : While Flashing the firmware to arduino, remove all the wiring connection between PM2.5 and arduino.

 

Happy Hacking 😀

 

 

 

Advertisements

One thought on “PM2.5 – A SensorWeb project by Mozilla

  1. Pingback: Harvesting Air Quality Data with a NodeMCU, SensorWeb and IFTTT | dietrich.ayala

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s