Project tutorial

Air Quality License Plate Holder © LGPL

Air Quality License Plate Holder uses air quality sensor attaching to the vehicle to monitor the air quality through out the city.

  • 1,935 views
  • 0 comments
  • 5 respects

Components and supplies

Necessary tools and machines

3drag
3D Printer (generic)

Apps and online services

About this project

Air Quality License Plate Holder

Inspiration

Air Quality throughout the city has always been hard to measure, Air Quality License Plate Holder uses air quality sensor attaching to the vehicle to monitor the air quality through out the city.

This idea originally came from Pigeon Air Patrol, where they use pigeon to monitor air quality in London, other ones such as Spare the Air from Bay area only gives overall air quality in the city, but not in detailed way of mapping. Independent solutions like Smart City Air Monitor requires too many devices and can need constant human maintenance. We believe that using our own cars would have much better results through both public transportation and crowd sourcing, and we want to build it in a way where no one needs to constantly maintain the device.

What it does

Air Quality License Plate Holder allows both city vehicles and normal travelers to install an IoT device (Smart License Plate) onto the car to crowd source the air quality data via BLE then upload it to the cloud with GPS coordinate through the phone unit.

For the drivers, they can now avoid heavily polluted areas and find alternative routes, it also allows them to monitor pollution during time of the day. A bubble on Android app allows user to monitor the air as well as using other apps such as Maps for navigation. While looking at the current quality data we can upload it to the cloud, this way the drivers now are also providing the air quality data to the city so that everyone else can plan their days around it.

The city now knows where the most heavily polluted areas are, so that they can install air filters, trees, or simply signs to warn other citizens the general air quality around that area.

How we built it

We've used Intel Arduino 101 with Air Quality Sensor to detect the air quality, in order to mount it onto the car, we've decided to 3D print a Smart License Plate Holder that holds the solar panel with batteries on one side and sensors with Arduino 101 on the other.

A separate Android app is installed with a layer on top to both display, this allows user to monitor their surrounding in real time with other applications. The air quality information is also sending the data to the cloud along with the GPS coordinate from the Android phone so we can map out the air quality of the city.

Challenges we ran into

While building out the project we've ran into three separate issues, one software and one hardware, and one for power

1) Connecting BLE from Arduino 101 to Android device is not that simple, we have to go try over and over again before Android app finally communicates with the Arduino 101 BLE seamlessly. The code is open sourced on github.

2) The hardware was more of a challenge, because vehicles these days aren't meant to have any add on parts, especially on the surface of the car, we figured out a license plate holder can be used in front of the vehicle in order to solve this challenge.

3) In order to run the device without constant charging it, we've figured out a way to use solar panel to charge the battery for all the existing cars.

Accomplishments that we're proud of

Among the project we figured out a few ways of solving transportation IoT that we are really proud of.

1) We've able to figure out an innovative way of installing smart IoT devices onto the car without it falling off through a license plate holder, this way anyone can use the device.

2) We've figured out BLE does not consume much energy, so using solar to charge the battery through Grove Solar Panel Kit allows use to use the prototype.

3) Another thing we are proud of is that we are able to display vehicle's data to the user without them, just like facebook's chatheads, we are can now display air quality information without user inside the app itself.

4) We are providing good air quality data for Intel Earth Day

What we learned

We learned that most cities does not have mapped air quality data, and this is part of the information that can benefit all of the citizens as a whole. There are few groups trying to tackle this problem, such as London uses pigeons to collect air quality data, but the air above in the cloud isn't the same air that we breath on the ground. After learning this, we believe utilizing public (bus, taxi, police cars) and private vehicles are the best ways to tackle this issue.

What's next for Air Quality License Plate Holder

Currently we've printed out a case for Arduino 101 as well as Solar panel that's required to charge it, next step would be reduce the enclosure size and use chip such as TinyTile to reduce make it more battery efficient, as well as contact cities and ride on demand companies like Uber/Lyft to see which one potentially wants to partner and install these smart license plate on their fleet of transportations. Once we sign up one partner, we can open up kickstarter campaign to see if the public is interested as well.

Custom parts and enclosures

3D model
this is the 3D model for the device

Schematics

Arduino 101 with Grove Sensor
Arduino 101 with Grove Sensor
Img 20170727 225700 c39hvf2sfv

Code

Arduino BLE CodeArduino
Arduino BLE Code, this allows Android and other devices to connect to Air monitor via BLE
#include <CurieBLE.h>
const unsigned char ledPin = 13;              // On-board LED

BLEPeripheral blePeripheral;  
BLEService tempService("fef431b0-51e0-11e7-9598-0800200c9a67"); // Create custom BLE Service
BLEUnsignedIntCharacteristic  tempChar("fef431b0-51e0-11e7-9598-0800200c9a66", BLERead | BLENotify); // allows remote device to get notifications
int oldTemp = 0;          // last temperature reading from analog input
long previousMillis = 0;  // last time the temperature was checked, in ms

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);  // initialize the LED on pin 13 to indicate when a central is connected

  // initialize the BLE hardware
  BLE.begin();
  blePeripheral.setLocalName("Air Monitor");
  blePeripheral.setAdvertisedServiceUuid(tempService.uuid());    // add the service UUID
  blePeripheral.addAttribute(tempService);
  blePeripheral.addAttribute(tempChar);
  tempChar.setValue(oldTemp);               // initial value for this characteristic
//  BLE.advertise();

  Serial.println("BLE Central - LED control");

  blePeripheral.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
  BLEDevice central = BLE.central();

  // if a central is connected to peripheral:
  if (central) {
    Serial.print("Connected to central: "); Serial.println(central.address());  // print the central's MAC address
    digitalWrite(ledPin, HIGH);  // turn on the LED to indicate the connection

    // check the temperature every 5000ms as long as the central is still connected:
    while (central.connected()) {
      long currentMillis = millis();
      if (currentMillis - previousMillis >= 1000) {
        previousMillis = currentMillis;
          updateAirQual();
      }
    }
    digitalWrite(ledPin, LOW);   // when the central disconnects, turn off the LED.
    Serial.print("Disconnected from central: "); Serial.println(central.address());
  }

}

void updateAirQual() {
  //Set quality from 0 to 255, with one to 100 being normal
  int sensorValue = analogRead(A0);
  int quality = map(sensorValue, 0, 1023, 0, 255);
  Serial.println(quality);
  tempChar.setValue(quality);
}
Android and Arduino code
Smart City Air Monitor uses air quality sensor attaching to the vehicle to monitor the air quality through out the city. Edit Add topics

Comments

Similar projects you might like

IoT Based Garden Automation And Monitoring System

Project tutorial by SURESH V S

  • 343 views
  • 1 comment
  • 9 respects

URB (Universal Railway Model Bus) - Automate Your Layout

Project in progress by Steve_Massikker

  • 99 views
  • 0 comments
  • 2 respects

Punch Activated Arm Flamethrowers (Real Firebending)

Project showcase by Allen Pan

  • 42,830 views
  • 43 comments
  • 327 respects

Visual Capturing with OV7670 on Arduino

by Techduino

  • 4,738 views
  • 14 comments
  • 24 respects

Smart Energy Monitor Based on Arduino

Project tutorial by Mohamed Maher

  • 410 views
  • 1 comment
  • 3 respects
Add projectSign up / Login