happybono / FinedustMonitorWithGPS

Fine dust (air pollution) monitoring station. Air pollution monitoring channel updates once every minute with PM10.0 and PM2.5 readings from the Nova PM (SDS011) Sensor. Also includes real time location tracking capabilities using the GY-NEO6MV2 GPS Sensor.

Home Page:https://thingspeak.com/channels/920137

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FinedustMonitorWithGPS

Fine dust (air pollution) monitoring station. Air pollution monitoring channel updates once every minute with PM 10.0 and PM 2.5 readings from the Nova PM (SDS011) Sensor. Also includes real time location tracking capabilities using the GY-NEO6MV2 GPS Sensor.

GitHub Last Commit GitHub Repo Size GitHub Repo Languages GitHub Top Languages

Please note

This project requires a GY-NEO6MV2 GPS Sensor. For a project that does not require a GPS module, Please visit the following link: https://github.com/happybono/FinedustMonitor

Final Product

Final Circuit

What's New

Click to Expand

v1.0

November 24, 2019

Initial Release.

December 16, 2019

Read GPS data from ThingSpeak and displays it on Google Maps using ESP12e NodeMCU and GPSNeo6MV2 Module.

December 25, 2019

Now supports [Channel Status Updates] in ThingSpeak : Updated FinedustMonitorWithGPS.ino, server.ino

December 29, 2019

Various bugs fixed.

January 20, 2020

"Latest PM sensor readings" plugin added in ThingSpeak.

v2.0

January 21, 2020

Displays additional information (temperature, latitude, longitude) in the "Latest PM sensor readings" plugin.

Various bugs fixed.

January 24, 2020

Added Reverse Geocoding function in Google Maps.

Optimized loading time for Google Maps.

Jaunary 25, 2020

Added an onclick event to displayed marker in Google Maps.

February 05, 2020

Added VBA (Visual Basic for Applications) code for reverse geocoding support in Microsoft Excel.
Powered by MSExcel logo

Added Javascript (.gs) code for reverse geocoding support in Google Sheets. (ⓒ 2018 Christos Samaras)
Added Javascript (.gs) code for reverse geocoding macro support in Google Sheets. (ⓒ 2016 - 2017 Max Vilimpoc)
Powered by Google logo

February 19, 2020

Optimized performance for data processing.

February 20, 2020

"Email Alert" function added as a ThingSpeak Analysis plug-in.

February 26, 2020

Performance improvements (up to 2× as faster than before) in the ADDRGEOCODE function in GEOSage.vb.

Now supports Unicode using the Microsoft ActiveX Data Objects Library in the ADDRGEOCODE function in GEOSage.vb.

February 27, 2020

Added GEOSage sample files.
GEOSage sample includes Excel files that use demonstation data using Google Maps Geocoding API Key. The API key used in this project for geocoding and reverse geocoding feature is not provided for your use. The mock data demonstrates all functions with static result values as Google Maps geocoding API Key and VBA Add-in code are not included in the GEOSage sample.

March 03, 2020

Added GEOSage.bas file to support directly import from Microsoft Excel.

May 28, 2020

Added 3D modeled housing file.

3DModel

June 04, 2020

Attached a programmed NFC Tag Sticker for faster and more convenient access to the ThingSpeak dashboard.

June 11, 2020

Fine dust (PM 2.5 and PM 10.0) 3D visualization bar charts added on the ThingSpeak dashboard.

June 12, 2020

Various bugs fixed those related with fine dust (PM 2.5 and PM 10.0) 3D visualization bar charts.

June 16, 2020

Supports multiple series (PM 2.5 & PM 10.0) chart as a ThingSpeak plugin.

June 17, 2020

Various bugs fixed.

June 25, 2020

Major improvements to the "Latest PM sensor readings" plugin.

June 27, 2020

Various improvements to the "Latest PM sensor readings" plugin.

Several bugs fixed those related with the "Latest PM sensor readings" plugin.

July 03, 2020

Various bugs fixed those related with fine dust (PM 2.5 and PM 10.0) 3D visualization bar charts.

July 08, 2020

Fixed a defect that prevented the measurement value from being uploaded under certain environmental conditions.

July 15, 2020

Temperature 3D visualization bar charts added on the ThingSpeak dashboard.

December 07, 2020

Applied font styling to the "Latest PM sensor readings" plugin.

Adjusted code formatting and indentation (if applicable).

December 08, 2020

Improved readability to symbols and measurement units.

December 27, 2020

"Geocoder failed due to: ZERO_RESULTS" error output changed. The error message is no longer displayed in the pop-up message box, will display it in the "Latest PM sensor readings" plugin as text.

December 30, 2020

Various bugs fixed.

v3.0

January 11, 2021

Now supports notifications through Twitter using Thingtweet plugin from the ThingSpeak platform.

March 28, 2021

Now supports analyzing and drawing charts on https://thingspeak.com/channels/1184617. Shown are the weekly average values (PM 2.5, PM 10.0, and temperature) using data from https://thingspeak.com/channels/920137.

April 22, 2021

Added Twitter timeline widget as a javascript based plug-in.

August 23, 2021

Improvements have been made to the "Email Alert" function.

April 16, 2022

Update to support tightened the rules around query parameters in the ThingSpeak platform.

Specifications

Scenarios

  • Measuring the fine dust contamination level in the air in real time. The value is displayed on the OLED Screen, and updated every second.
  • Measuring the current temperature.
  • Track and update device location in a real time.
  • Reading GPS data (longitude, latitude) from ThingSpeak and display it using Google Maps with the Maps JavaScript API.
  • Refining data and synchronize with the web-based cloud service. (i.e. ThingSpeak, Plaive)
  • Refining average calculated data to separate channel on the web-based cloud service. (i.e. ThingSpeak, Plaive)
  • Using reverse geocoding to convert a location (latitude, longitude) measured by the device to a readable address.
  • Using Microsoft Excel to process batch of locations (latitude, longitude). Data can be exported in CSV format from ThingSpeak to open in Excel.

What is Reverse Geocoding?

Reverse geocoding is the process of back (reverse) coding of a point location (latitude, longitude) to a readable address or place name. This permits the identification of nearby street addresses, places, and/or areal subdivisions such as neighbourhoods, county, state, or country.

More information on reverse geocoding with Google Maps JavaScript API
Powered by Google logo

Connections

  • 1 x Micro-USB

Wireless

  • IEEE 802.11 b/g/n Wi-Fi technology.

Battery life

  • Up to 35 hours (1 day and 12 hours) of typical device usage.
  • Testing consisted of full-time active use until complete battery discharge.
  • Wi-Fi was connected to a network.
  • Syncs data once every minute with PM 10.0 and PM 2.5 readings from the Nova PM (SDS011) Sensor, Temperature reading from the DS18B20 Temperature Sensor and GPS positioned reading values (longitude, latitude) from the GY-NEO6MV2 GPS Sensor.
  • Battery life may vary significantly with settings, usage and other factors.

Apparatus (Equipment)

Platform

  • NodeMCU ESP8266-12E

SDS011 Dust Sensor

  • Soldering required
  • D1 : TX of SDS011

0.96" SSD1306 I2C OLED Display

  • Soldering required
  • D3 : Data, D2 : Clock

GY-NEO6MV2 GPS Sensor

  • Soldering required
  • D6 & D7 : TX & RX of GY-NEO6MV2 respectively.

DS18B20 Temperature Sensor (Thermometer)

  • Soldering required
  • D4 : Data

iriver Tactile (SPB-10000) Portable Battery

  • USB Port : Power
  • Micro-USB : Charging Port
  • Dimension : 63.3 mm (W) × 90.7 mm (D) × 22.3 mm (H)
  • Weight : 180 g
  • Input : DC-5V / 2A (Micro 5-Pin)
  • Output : DC-5V / 2A (2 USB ports)
  • Capacity : 10,000 mAh

Circular NFC Tag Sticker (N-Tag 216)

Schematics

Schematics Diagram

Data Refinement / Synchronization

ThingSpeak

Plaive

Libraries Used

DallasTemperature

This library supports the following devices :

DS18B20
DS18S20 - Please note there appears to be an issue with this series.
DS1822
DS1820
MAX31820
https://github.com/milesburton/Arduino-Temperature-Control-Library

TinyGPSPlus (TinyGPS++) for GY-NEO6MV2

A new, customizable Arduino NMEA parsing library A NEW Full-featured GPS/NMEA Parser for Arduino TinyGPS++ is a new Arduino library for parsing NMEA data streams provided by GPS modules.

Like its predecessor, TinyGPS, this library provides compact and easy-to-use methods for extracting position, date, time, altitude, speed, and course from consumer GPS devices.
https://github.com/mikalhart/TinyGPSPlus

SSD1306 (0.96") OLED Display

This is a driver for SSD1306 128x64, 128x32, 64x48 and 64x32 OLED displays running on the Arduino/ESP8266 & ESP32 and mbed-os platforms. Can be used with either the I2C or SPI version of the display.
https://www.github.com/ThingPulse/esp8266-oled-ssd1306

RunningMedian

Arduino library to determine the running median by means of a circular buffer.
https://github.com/RobTillaart/Arduino/tree/master/libraries/RunningMedian

Running Median looks like a running average with a small but important twist. Running average averages the last N samples while the running median takes the last N samples, sort them and take the middle one, or the average of the middle two.

Important differences between running average and running median:

  • Running median will return real data (e.g. a real sample from a sensor) if one uses an odd size of the buffer (preferred). Running average may return a value that is never sampled.
  • Running median will give zero weight to outliers, and 100% to the middle sample, whereas running average gives the same weight to all samples.
  • Running median will give often constant values for some time.
  • As one knows the values in the buffer one can predict to some extend how much the next samples will change the running median.
  • Running median is a bit harder as one needs to keep the values in order to remove the oldest and keep them sorted to be able to select the median.

References

About

Fine dust (air pollution) monitoring station. Air pollution monitoring channel updates once every minute with PM10.0 and PM2.5 readings from the Nova PM (SDS011) Sensor. Also includes real time location tracking capabilities using the GY-NEO6MV2 GPS Sensor.

https://thingspeak.com/channels/920137

License:MIT License


Languages

Language:C++ 56.7%Language:JavaScript 17.6%Language:MATLAB 8.2%Language:VBA 5.8%Language:Visual Basic .NET 5.8%Language:HTML 4.5%Language:CSS 1.3%