Pollution control & Status

Pollution control & Status

A smart pollution control device is set near the exhaust of the vehicle to alert the user when they are wasting fuel and causing pollution

  • 3,535 views
  • 0 comments
  • 5 respects

Components and supplies

Apps and online services

About this project

Vehicles contribute a large amount of pollution to earth, even though Electric vehicles are promoted, there is still a long way to go emission free ,our solution is a step towards it.

When the vehicles are stopped at traffic signals, they emit hazards gases even when not moving. People don't turn their vehicles off even if the traffic is 5 minutes long this way they contribute in pollution , our device monitors the pollution level and sends alert to the user reminding them about the fuel wastage and their contribution in pollution. The device suggest to turn the vehicle off at traffic signals, when the pollution level reaches 850 ppm value in the sensor. The alert is send to mobile application which is set in front of them. The app is simple, when the user vehicle pollution is in limit then the app show shows a happy earth face and the earth asks for help with a sad face when the pollution is above limits. This way they save fuel for them and earth from pollution.

we cannot stop the pollution at once but we can slow it down till we come up with a solution to stop it at once.

Code

code.inoArduino
#include <CurieBLE.h>


BLEPeripheral blePeripheral;              // BLE Peripheral Device (the board you're programming)
BLEService PollutionService("19b10001-e8f2-537e-4f6c-d104768a1214"); // BLE Pollution Service


BLEIntCharacteristic data("19b10000-e8f2-537e-4f6c-d104768a1214", BLERead | BLEWrite | BLENotify);  // remote clients will be able to get notifications if this characteristic changes
                              
int counter=0;
void setup() {
  Serial.begin(9600);    // initialize serial communication
  pinMode(13, OUTPUT);   // initialize the LED on pin 13 to indicate when a central is connected

  /* Set a local name for the BLE device
     This name will appear in advertising packets
     and can be used by remote devices to identify this BLE device
     The name can be changed but maybe be truncated based on space left in advertisement packet */
  blePeripheral.setLocalName("PollutionSketch");
  blePeripheral.setAdvertisedServiceUuid(PollutionService.uuid());  // add the service UUID
  blePeripheral.addAttribute(PollutionService);   // Add the BLE Heart Rate service
  blePeripheral.addAttribute(data); // add the Heart Rate Measurement characteristic

  /* Now activate the BLE device.  It will start continuously transmitting BLE
     advertising packets and will be visible to remote BLE central devices
     until it receives a new connection */
  blePeripheral.begin();
  Serial.println("Bluetooth device active, waiting for connections...");
}

void loop() 
{
  // listen for BLE peripherals to connect:
  BLECentral central = blePeripheral.central();

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

    // check the heart rate measurement every 200ms
    // as long as the central is still connected:
    while (central.connected()) 
    {
      int sendData;
      int pollution = analogRead(A0);
      if(pollution>=790)          //790 indicates high pollution
      {
        counter++;                //counter updates when value is greater than or equal to 790
      }                           //counter is updated till 4000 if pollution is above 790 for 4 seconds continuously
      else if(counter<790)        //if value is lesser than 790 counter is reset to 0
      {
        counter=0;
      }
      if(counter=>4000)           //counter is checked for value of 4000 indicating 4 seconds. 
      {                           
        sendData=4;               //indicates high pollution
        data.setValue(sendData);  // and update the pollution status
        counter=0;                //counter is reset to 0.
      }
      else
      {
         sendData=0;               //indicates moderate pollution
        data.setValue(sendData);  // and update the pollution status
      }
     }
  
    // when the central disconnects, turn off the LED:
    digitalWrite(13, LOW);
    Serial.print("Disconnected from central: ");
    Serial.println(central.address());
    }
}

Schematics

Arduino 101 & MQ - 135 Sensor
Connect A0 in MQ 135 to Analog pin 0
Connect Vcc in MQ135 to 5V in Arduino 101\
Connect GND in MQ135 to GND in Arduino 101
Untitled sketch bb 57dsmbdrsm
CIRCUIT DIAGRAM
Arduino 101 and sensor conenction
Untitled sketch bb mwdjoq4qox
ble_arduino101_blink_l5siKmVNGT.apk

Comments

Similar projects you might like

Servo Control with TV Remote Control

Project showcase by eldo85

  • 5,591 views
  • 5 comments
  • 17 respects

Control an LED with the Remote Control

Project showcase by Nicholas_N

  • 3,196 views
  • 2 comments
  • 9 respects

Arduino Temperature Control

Project tutorial by Team pandhoit

  • 18,234 views
  • 10 comments
  • 28 respects

Bluetooth control led with lcd led status display real time.

Project tutorial by Youssef Sabaa

  • 17,325 views
  • 4 comments
  • 34 respects

SMART CUBE: A New Way to Control Your Home

Project tutorial by Alberto Sartori

  • 13,527 views
  • 7 comments
  • 30 respects
Add projectSign up / Login