logologo
Contact

HOMEABOUTSERVICESBLOGSBOOKSSHOPCONTACT

+977 9803661701support@nepatronix.orgLokanthali, Bhaktapur

© 2025 NepaTronix all rigths reserved

Carbon Monoxide Reader On Mobile App(IoT project)

  Back To Blogs

The Carbon Monoxide Reader project aims to develop a robot that monitors carbon monoxide (CO) levels and reports the data to a mobile application using the Blynk platform. This integration allows for real-time data visualization and alerts through a WiFi connection, enhancing safety by providing timely notifications of dangerous CO levels. The project leverages components such as the ESP32, a CO sensor, and an LCD for local display, combined with the Blynk app for remote monitoring. This project highlights the practical applications of IoT in environmental monitoring and mobile app interfacing with microcontrollers.

Project : 9


Introduction

The Carbon Monoxide Reader project aims to develop a robot that monitors carbon monoxide (CO) levels and reports the data to a mobile application using the Blynk platform. This integration allows for real-time data visualization and alerts through a WiFi connection, enhancing safety by providing timely notifications of dangerous CO levels. The project leverages components such as the ESP32, a CO sensor, and an LCD for local display, combined with the Blynk app for remote monitoring. This project highlights the practical applications of IoT in environmental monitoring and mobile app interfacing with microcontrollers.


Components Required

ESP32: A microcontroller with built-in WiFi and Bluetooth capabilities.

  1. CO Sensor: For detecting carbon monoxide levels in the environment.
  2. LiquidCrystal_I2C Display: To display sensor data and status messages locally.
  3. Power Supply: Typically a battery pack to power the ESP32 and sensor.
  4. Connecting Wires: For connecting all components.

Pin Configuration

  • Sensor Pin:
    • Sensor_PIN: 34
  • LCD Pins: Connected via I2C

Libraries Used

  • BlynkSimpleEsp32: For interfacing with the Blynk platform.
  • Wire: For I2C communication.
  • WiFi: For WiFi connectivity.
  • LiquidCrystal_I2C: For interfacing with the LCD display.

 

Circuit Diagram:


Code:

//Copy the blynk credential from your account device and paste it here

 

#define BLYNK_TEMPLATE_ID "TMPL670BbO1Nl"

#define BLYNK_TEMPLATE_NAME "Data Monitoring"

#define BLYNK_AUTH_TOKEN "4Q5w-qYfY3jO82qXBaL3O0E3irLFfDwb"

#define BLYNK_PRINT Serial

#include <BlynkSimpleEsp32.h>

#include <Wire.h>

#include <WiFi.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

#define Sensor_PIN 34

char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "nepatronix_2.4";  //Enter your WIFI SSID name

char pass[] = "CLB269DA03";      //Enter your WIFI password

BlynkTimer timer;

void notify() {

  int value = analogRead(Sensor_PIN);

  Serial.println(value);

  Blynk.virtualWrite(V1, value);

  display(1, 1, String(value));

 

  //  if (value == 800) { // If 1 receive then turn ON

  //    display(1, 1, "Toxic Air");

  //    Blynk.logEvent("intruder_alert", "Intruder Detected");

  //  } else {// Else turn OFF

  //    display(1, 1, "Noraml air");

  //  }

  delay(100);

}

void setup() {

  Serial.begin(9600);

  Wire.begin();

  lcd.init();

  lcd.clear();

  lcd.backlight();

  lcd.setCursor(1, 0);

  lcd.print("**NEPATRONIX**");

  delay(2000);

  lcd.clear();

  pinMode(Sensor_PIN, INPUT);

  display(1, 0, "Carbon MonoOxide: ");

  Blynk.begin(auth, ssid, pass); //Connecting to Blynk Server with ssid and password

  delay(500);

  Serial.println(WiFi.localIP());

 

  timer.setInterval(100L, notify);

 

}

void loop() {

  Blynk.run(); //run the blynk function in loop

  timer.run();

}

void display(int col, int row, String msg) {

  lcd.setCursor(col, row);

  lcd.print(msg);

}


Working


  1. Initialization:
  2. The ESP32 initializes serial communication at a baud rate of 9600.
    • The I2C LCD display is initialized, and a welcome message is displayed.
    • The ESP32 connects to the Blynk server using the provided credentials (auth token, WiFi SSID, and password).
    • The sensor pin is configured as an input.

  3. Main Loop:
  4. The program runs the Blynk and timer functions continuously.
    • The notify function is called at regular intervals to read the sensor value, display it on the LCD, and send it to the Blynk app.
    • The Blynk platform is used to monitor the sensor data and potentially trigger alerts.

  5. Sensor Data Monitoring:
  6. The notify function reads the CO sensor value using analogRead.
    • The value is printed to the serial monitor, displayed on the LCD, and sent to the Blynk virtual pin V1.
    • Additional logic can be added to trigger alerts based on the sensor readings.

Testing

Setup: Assemble the components and connect them as per the pin configuration.


  1. Power Up: Turn on the power supply and ensure the ESP32 and sensor are receiving power.

  2. WiFi Connection: Ensure the ESP32 is connected to the specified WiFi network.

  3. Blynk App: Configure the Blynk app with the provided template ID and auth token.

  4. Commands: Test the sensor data monitoring and ensure that the data is correctly displayed on the LCD and sent to the Blynk app.

  5. Display: Verify the LCD shows accurate CO levels and status messages.

  6. Alerts: Test the alert functionality by simulating high CO levels if applicable.

Conclusion

The Carbon Monoxide Reader project successfully demonstrates the integration of WiFi communication, sensor data monitoring, and remote control using the Blynk platform. By leveraging the ESP32 microcontroller and various components, the project provides a practical application in environmental monitoring. Users gain hands-on experience in IoT, mobile app interfacing, and sensor data visualization, laying a foundation for more advanced projects in the future. This project enhances safety by providing timely notifications of dangerous CO levels, showcasing the importance of IoT in modern environmental monitoring systems.




Total likes : 3

Comments







Read More Blogs!

Blind Stick Using Arduino Uno(Automation Project)

The Blind Stick is a simple yet effective device designed to assist visually impaired individuals in navigating their surroundings. Utilizing an ultrasonic sensor, the stick detects obstacles in its path and alerts the user through a buzzer. This early warning system helps the user avoid collisions and navigate safely.


1.7k04

RFID Door Lock Using Arduino Uno(Automation Project )

The RFID Door Lock system is a secure and convenient access control solution that uses RFID technology to allow or deny access to a door. By scanning an RFID card, the system can identify authorized users and trigger a servo motor to unlock the door if access is granted. This technology is widely used in offices, homes, and restricted areas to ensure only authorized personnel can enter.


1.6k04

Electromagnet with Compass(STEAM Education)

To understand the concept of electromagnetism and explore the direction of magnetic fields and poles.


1.8k05

Combination of Resistance Series Connection(STEAM Education)

To understand the effect of resistance in series connection on circuit behavior, that we will observe from LED intensity.


1.7k04