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!

LED Intensity Controlled with Resistance(STEAM Education)

The aim of this project is to understand how resistance affects the flow of current in a circuit and to learn how to control the intensity of an LED by varying resistance.


1.7k04

Power LED with Solar Panel(STEAM Education)

To understand and demonstrate the utilization of solar energy to power an LED light.


1.9k05

TEMPERATURE HUMIDITY READER ON MOBILE (IoT Project)

The Temperature Humidity Reader project utilizes an ESP32 microcontroller in conjunction with a DHT11 sensor to monitor temperature and humidity levels. The collected data is displayed on an LCD and transmitted to a mobile application using the Blynk platform. This project provides an efficient way to remotely monitor environmental conditions in real time, making it useful for applications such as home automation, weather stations, and greenhouse monitoring.


2.2k03

Top 20 IoT Projects for Final Year Students

Explore the top 20 IoT projects that will inspire and challenge you in your final year. From smart parking systems and air quality monitors to home automation and industrial safety solutions, these projects cover a wide range of industries and applications. Each project demonstrates how IoT can be used to optimize processes, improve safety, and create smarter systems. With these hands-on projects, you'll gain valuable experience in hardware integration, cloud computing, data analysis, and mobile app development, preparing you for a future in the fast-growing field of IoT.


6.8k010