Pocket Size CO (carbon Monoxide) Detector

About: Email : tinkerbuildlearn@gmail.com

As the name says this is a pocket sized CO detector which is used to detect Carbon monoxide in air our goal was to make this device portable and which fits in pocket size.

Now a days we are facing problem of air Pollution due to industrialization every day harmful gases are released into air and even vehicles releasing harmful Carbon monoxide.

So we thought of making this project which we could carry anywhere and check the air condition whether it is clean or polluted.

We have build this project in a affordable budget,it costed around 12 USD.

Supplies:

Step 1: Parts Used

Parts used in this projects are :-

  1. Arduino Pro Mini
  2. Oled 128*96 Display
  3. MQ9 Carbon Monoxide Sensor
  4. Li polymer battery
  5. Li polymer battery charger (Extracted from a old Powerbank)
  6. led 2mm x1
  7. Slide Switch
  8. Screws
  9. Cardboard
  10. Masking tape

Step 2: Circuit Diagram

Step 3: Arduino Code

#include 
#include #define OLED_RESET 4#define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) #define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); void setup() { pinMode(A0,INPUT); display.begin(SSD1306_SWITCHCAPVCC, 0x3C); display.clearDisplay(); Serial.begin(9600); display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(30,30); display.setTextSize(1); display.print("Checking..."); display.display(); } void loop() { while(count(30)!=30);while(true) { //Formula to Calculate PPM float input = analogRead(A0); float sensor = input*5/1023; float ppm = 3.027*exp(1.0698*(sensor)); display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(50,50); display.print(ppm); display.display(); display.clearDisplay(); delay(500); if(ppm <= 9.9) { display.clearDisplay(); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(10,5); display.println("Fresh Air"); display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(27,35); display.println("CO value(ppm)"); display.display(); } else if(ppm > 9.9) { display.clearDisplay(); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(2,5); display.println("WEAR MASK!"); display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(27,35); display.println("CO value(ppm)"); display.display(); } } } int count(int j) { int i; for(i=0; i<j; i++) { delay(1000); } return i; }

Step 4: Soldering and Building Case

Important tips:

  • Make sure you have a common VCC andGround point to complete the circuit (shown in image 3).
  • Switch is connected between positive of charger positive output and common VCC point.
  • The Green led was use to replace the onboard led of charger board just solder some thin flexible wires to led`s legs and solder them on the place of on board led.

BE CAREFUL !!! Desoldering the male headers from the LCD and Gas Sensor module can be a tedious task because male headers are soldered using Lead Free solder which requires more heat to melt down, so be careful and have patience while desoldering them otherwise you might damage some solder pads or tracks.

Step 5: Final Output

Share

    Recommendations

    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Arduino Contest 2019

      Arduino Contest 2019
    • Gardening Contest

      Gardening Contest

    Discussions

    0
    None
    audreyobscura

    27 days ago

    Thanks for sharing your diagram! This is useful!