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 :-
- Wiring connection between PM2.5 and Arduino ESP8266
- 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).
- 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.
- Connect 4th pin and 5th pin of PM2.5 to Tx and Rx of arduino board respectively.
- You are done with wiring connection. Yay! :). All are other pins of PM2.5 are not required now.
- 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:
- Click on Tools and navigate to Boards > Boards Manager and search for ESP. Select & install esp2866
- Now again click on Tools and navigate to ESP2866 modules and select NodeMCU 0.9 (ESP-12 module)
- Click on the File and open the firmware code in the IDE and modify the SSID, password, API key and Sensor id.
- Now click on the verify icon, then upload icon to flash the firmware to the ESP2866 arduino board.
- 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 😀