Categories
PROJECTS

PhillyAir Mist Alert

Using Dust Sensors and Mist Makers for Public Awareness in Philadelphia’s ‘Playgrounds’

Simran Arora + Roshini Ganesh + Eduardo Martinez Villanueva + Yunfan Xu

Introduction

Philadelphia is facing a serious air pollution crisis. Recent studies show that the city has some of the worst air quality in the country, with dangerous levels of fine particulate matter, ozone, and nitrogen dioxide. Industrial activity, transportation, and energy production are the main sources of air pollution in Philadelphia. The city’s aging infrastructure, including its buildings and transportation systems, also contributes to the problem. It ranks as the 12th most polluted city in terms of air quality and has received a D grade from the American Lung Association.

The impact of this pollution on public health is significant. People living in areas with high levels of air pollution are at greater risk of respiratory problems, heart disease, and other health issues. As concern grows, community activists are calling for action to address this crisis. And one of the most vulnerable groups in Philadelphia is school children.

Exposure to pollutants such as fine particulate matter and nitrogen dioxide can cause respiratory issues such as asthma and bronchitis, hinder cognitive development, and even lead to cardiovascular problems and behavioral issues. Studies have shown that children growing up in areas with high levels of air pollution may experience a reduction in IQ and an increased risk of developing ADHD.

In addition to this issue, there is a lack of playgrounds in the city. In this investigation by WHYY, Nina Feldman shows how many schools across the city don’t have playgrounds. When there is a lack of safe and accessible play areas, often concrete parking lots and streets double as playgrounds. Philadelphia’s current school budget does not support the building of more playgrounds, which means this situation is to stay.

Source: Azavea

On Philly’s streets, the daily average of PM10, which refers to particular matter of a diameter of 10 micrometers, is very close to crossing the unhealthy level threshold. These particulate matter harm the human respiratory system. Car exhausts give out a very high level of PM10, and parking lots are where children are playing. This causes concern amongst parents and teachers.

Thus, for Philadelphia’s school children, who lack playgrounds and play on streets and parking lots, exposure to high particulate matter will cause several health issues. So what are some ways to mitigate this?

An incredibly simple solution is misting. Waster mist can with a size of 5-10 micrometers can improve air quality by effective capturing the floating particulate matters in the air and bring them down to the ground. Misting can also increase the comfortableness of air since it will reduce the air temperature and rise the humidity. Many countries and regions have already implemented misting device for improve air quality, such as the mist spraying drone in Bangkok, Thailand, as well as the misting cannon vehicles in Chongqing, China. In the U.S, a commercial cooling misting system will cost around $500 and consume half liter of water per minute per 10 ft. For dust-dust control purpose, the water consumption will be lower than the system for cooling.

Public misting installation in Bratislava

To summarize,

Philadelphia’s poor air quality has detrimental effects on the health of vulnerable school children.

and

The lack of playgrounds and green spaces worsens the situation, as it exposes children to poor air quality with high particulate matter concentration.

Source: The Philadelphia Citizen

Project Vision and Action

Our vision statement is to create a simple device that integrates air quality detection and mist generation to temporarily mitigate air pollution, create awareness and protect children from harmful dust exposure.

The functions of this device can be broken down into three parts: first, to detect the harmful levels of PM 2.5, second to alert children through light and sound, and third, to provide mitigation by misting.

In addition to these basic functions, a digital board can be added to the project for educational purposes to present air pollution conditions and hazards to the children in an understandable manner. Furthermore, the data can be collected and sent to a central system over a Wi-Fi network to build a database of prevailing conditions long-term for analysis and strategic planning.

Introducing our project

To place our project in the real world, specific sites were chosen. These are real schools in Philadelphia selected based on the type of playgrounds they have (next to a parking lot, small, used as a parking lot) and areas where PM2.5 and Diesel PM concentrations are high. The following diagram indicates the schools selected for the first phase of implementation.

Project Functioning

Part 1: Concept Diagram

Particle matter comes from different sources, but cars generate large amounts of polluting particles that are harmful for kids.
Our sensor consists of three types of components that measure particulate matter levels and communicate it to a database, alert children through light and sound, and generate mist from a water deposit through ultrasonic waves.
By creating a water mist with ultrasonic waves, the small droplets capture similarly sized pollutant particles. The added weight causes the particles to drop to the ground. This prevents the pollution at the edge from moving into the playground areas, helping mitigate the detrimental effects of pollution on the health of children playing to a certain degree.

Part 2: Product Demo

Process of interaction between the Arduino and the Sensors to trigger real-time response

Part 3: List of Parts & Sources

List of parts:

Advanced Parts:

  • For information display – Treedix 3.5 inch TFT LCD Display 320 x 480 Color Screen Module 
  • For powering – Mini Solar Panel + Solar Panel Controller
  • For location sharing – GPS Shield – Adafruit Ultimate Logger GPS Shield

Part 4: Wiring & Code

Connections:

Schematic wiring diagram, please note that the water atomizer should be connected to a Grove Shield and not as shown on this diagram.
  • Mount the Grove Base Shield on the Arduino Uno and connect the Water Atomizer to it using pin A3
  • Mount the Arduino Uno Expansion Module with the mini breadboard on top of the Grove Base Shield
  • Add the LED, Buzzer, and Wifi+Bluetooth sensors to the breadboard.
  • Connect the Receive data and Transmit data pins of the Wifi Shield to pins 10 and 11 on the Arduino Uno.
  • Connect positive and negative pins of the LED to pin 12 and the ground pin respectively.
  • Connect positive and negative pins of the Buzzer to pin 13 and the ground pin respectively.
  • Copy the following code to Arduino IDE. Add details of your Wifi Network to the code under the ‘Defining the Wifi Network’ section.
  • Add relevant API Key and Host Address Details given by the ThingSpeak website to the code under the ‘Defining the Wifi Network’ section.
  • Run the code.
/*
CPLN 5710 Sensing the City / Weitzman School of Design
More info on: https://www.sensingthecity.com/

Part of this sketch was adapted from the code and contributions of Christopher Grant:
https://cgrant.medium.com/using-the-esp8266-wifi-module-with-arduino-uno-publishing-to-thingspeak-99fc77122e82

Part of the setup and operation code of the MQ-9 LPG sensor is from https://www.circuits-diy.com/how-to-interface-mq-9-gas-sensor-with-arduino/ 

To share generated data online it's necessary to create an account and channel on:
https://thingspeak.com/
A platform that allows you to aggregate, visualize, and analyze live data.

This sketch uses Grove Water Atomizer, for more information about this module, please refer to the wiki site:
https://wiki.seeedstudio.com/Grove-Water_Atomization/

If Grove SEN55 is used as environmental sensor, the wiki site and code from Seedstudio should be followed also:
https://wiki.seeedstudio.com/Grove_SEN5X_All_in_One/
*/ 

#include <SoftwareSerial.h> //Include this library to allow Wi-Fi Shield to interact with UNO using pins 10/11

//connections to the Arduino Uno
#define RX 10                         // Receive data pin - Connects to TX Pin on UNO
#define TX 11                         // Transmit data pin - Connects to RX Pin on UNO
#define ledPin 12                     // Digital Output of LED connected to pin 12
#define buzzerPin 13                  // Buzzer connected to pin 13
#define emitterPin A3                 // Water Atomizer connected to analog pin A3
#define sensorPin A0                  // Air Quality Sensor connected to analog pin A0

//Defining the Wifi Network to be accessed
String AP = "WiFi network name";   // Write WiFi Network name to connect with
String PASS = "Password";            // Write here password of WiFi Network

String API = "ONHGC66G1GYO40OH";      // Write API KEY given by ThingSpeak channel
String HOST = "api.thingspeak.com";   // Write HOST ADDRESS given by ThingSpeak channel
String PORT = "80";                   // Define Port number to connect to ThingSpeak server
String field = "field1";              // Declare which fields are going to be used on the channel

//Setting up variables to facilitate data transmission
int countTrueCommand;                 
int countTimeCommand;                 
boolean found = false;                
int valSensor;                        
SoftwareSerial esp8266(RX,TX);        

//Variables to calculate air quality
float sensor_volt;                    
float RS_gas;                         // Get value of RS in a GAS
float R0 = -0.10;                     //example value of R0. Replace with your own
float ratio;                          // Get ratio RS_GAS/RS_air
float LPG_PPM;                        
float x;                              

//Setup code, to run once:
void setup() {
  
  Serial.begin(9600);                 
  delay(20000);                       // Delay 20 seconds for the sensor to get ready
  pinMode(ledPin, OUTPUT);            //initialize ledpin as output for the LED
  pinMode(sensorPin, INPUT);          //initialize sensorpin as input from air qua;ity sensor
  pinMode(emitterPin, OUTPUT);        //initialize emitterpin as output for the water atomizer
  pinMode(buzzerPin, OUTPUT);         //initialize buzzerpin as output for the water atomizer

  // ESP8266 SetUp - Connect to Access Point
  esp8266.begin(115200);              
  sendCommand("AT",5,"OK");           // Communication to ESP8266 is through AT commands, this checks connection with module
  sendCommand("AT+CWMODE=1",5,"OK");  // Set the WiFi mode 1:Station mode 
  sendCommand("AT+CWJAP=\"" + AP + "\",\"" + PASS + "\"",15,"OK"); // Connect ESP8266 module to targeted WiFi
  countTrueCommand = 0;               // Initialize value of count to 0

}

//Main code, to run in perpetuity
void loop() {
 //Following code allows to connect and write data to ThingSpeak ´
 valSensor = readSensor();                                                          // Collect value calculated by air quality sensor 
 String getData = "GET /update?api_key="+ API +"&"+ field + "=" +String(valSensor); // Check for valid API key for transfer
 sendCommand("AT+CIPMUX=1",5,"OK");                                                 // Print OK if received
 sendCommand("AT+CIPSTART=0,\"TCP\",\""+ HOST + "\"," + PORT,15,"OK");              // Check for valid Wifi connection
 sendCommand("AT+CIPSEND=0," +String(getData.length()+4),4,">");                    // Print OK if received
 esp8266.println(getData);                                                          // Print data that is transferred

 countTrueCommand++;                       
 sendCommand("AT+CIPCLOSE=0",5,"OK"); 
}

//Prompting response based on readings of the air quality sensor
int readSensor() {
    int sensorValue = analogRead(sensorPin);
    
    Serial.println(sensorValue);       // Print air quality measired by sensor
    Serial.print("\n\n");              // Print to next line

    if(sensorValue > 30) {             // When air pollution levels cross threshold, prompt action
    digitalWrite(ledPin, HIGH);        // Switch on LED
    digitalWrite(buzzerPin, HIGH);     // Switch on Buzzer
    digitalWrite(emitterPin, HIGH);    // Switch on Atomizer
    delay(500);                        // Wait 0.5 seconds
    digitalWrite(ledPin, LOW);         // Switch off LED
    digitalWrite(buzzerPin, LOW);      // Switch off Buzzer
    delay(500);                        // Wait 0.5 seconds
    digitalWrite(ledPin, HIGH);        
    delay(500);
    digitalWrite(ledPin, LOW);
    delay(500);
    digitalWrite(ledPin, HIGH);
    delay(500);
    digitalWrite(ledPin, LOW);
    delay(500);
    digitalWrite(ledPin, HIGH);
    delay(500);
    digitalWrite(ledPin, LOW); 
    Serial.print("AIR POLLUTION HIGH");// Print Air Pollution High
    Serial.print("\n\n");
    }
    else if (sensorValue < 30) {
    digitalWrite(ledPin, LOW);        // Keep LED switched off
    digitalWrite(buzzerPin, LOW);     // Keep Buzzer switched off
    digitalWrite(emitterPin, LOW);    // Keep Atomizer switched off
    
    }
    return sensorValue;               // Return air quality measures by sensor
    delay(1000);                      // Wait 1 second
    }  
    
  //Continuously check if data is transferred over Wifi
void sendCommand(String command, int maxTime, char readReplay[]) {
  Serial.print(countTrueCommand);     
  Serial.print(". at command => ");   
  Serial.print(command);              
  Serial.print(" ");                  
  while(countTimeCommand < (maxTime*1))
  {
    esp8266.println(command);         //at+cipsend
    if(esp8266.find(readReplay))      //ok
    {
      found = true;                   
      break;                          // Break if true
    }
  
    countTimeCommand++;               // Count time
  }
  
  if(found == true)
  {
    Serial.println("Success");        // If found, print success
    countTrueCommand++;               // Increase value of count
    countTimeCommand = 0;             // Reset value of time
  }
  
  if(found == false)                  
  {
    Serial.println("Fail");           // If not found, print fail
    countTrueCommand = 0;             // Reset value of count
    countTimeCommand = 0;             // Reset value of time
  }
  
  found = false;                      //reset value of found
 }

Part 5: Data Collection Explanation

The Arduino UNO can be connected to a Wi-Fi network with shields/modules such as the ESP8266 microchip. The microchip contains built-in networking software to allow it to connect to the air quality sensor and share recorded observations online.

In the case of this project, we have used an ESP-01 Adapter along with the Wifi module for easier voltage regulation and interfacing.

All data collected can be then sent to a central location such as the ThingSpeak channel where real-time changes in pollution can be monitored and interpreted remotely. The following figure indicates how the data can be stored and visualized within the channel:

An online dashboard aggregates recorded pollution data over time and can be used to study pollution over a period of time and inform long-term mitigation strategies

Scaling Up and Way Forward

Future School Sites: The project can be piloted within existing ‘Healthy School’ planning frameworks supported by the City of Philadelphia as well as the EPA and the Trust for Public Land that work closely with schools to create healthy learning environments and spaces for play. Furthermore, the product can include components such as a display screen to function as an educative and awareness building tool.

Configurability: The project is compact and can be configured with as many or as few sensors as needed based on the function it needs to perform. Futhermore, its size allows it to be adapted to existing city infrastructure.

Knowledge Building: The product uses a decentralized method of operation, however, the data it records can be utilized to build a collective database providing insights about air quality levels within individual schools as well as schools across the entire city. The product can also be deployed over short or long periods of time to offer observations for a specific awareness project or a continuous research project. Finally, the rate of use of the atomizer can be used to suggest the kind of long-term mitigation strategy for that school/neighborhood.

Areas of scaling

This installation and iterations of it can also be installed beyond schools in several areas of the city where dust and air pollution are an issue. In Philadelphia, there is constant construction activity, especially in neighborhoods that are seeing an influx of students or are on their way to gentrification. The PhillyAir Mist could be installed around those streets, to warn and safeguard citizens from hazardous air pollution.

Funding

Since this product is primarily related to health and awareness, the funding could come from the following sources:

City of Philadelphia – Department of Public Health. Project handled by Air Pollution Control Board.

Pennsylvania Department of Health & Clean Air Council

EPA Office of Air and Radiation Competitive Grants

Visualization of PhillyAir Mist Alert System

References

Most Philadelphia public schools lack playgrounds – WHYY

Philly air quality: ALA State of the Air Report receives poor grade – WHYY

https://www.lung.org/media/press-releases/state-of-the-air-philadelphia

City of Philadelphia 2021 Air Quality Report

https://www.sciencedirect.com/science/article/pii/S1877705817353389

Trust for Public Land: Connecting Everyone to the Outdoors (tpl.org)

Healthy School Environments | US EPA

Leave a Reply

Your email address will not be published. Required fields are marked *