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!

20 ESP Project For beginner

The world of IoT (Internet of Things) is rapidly expanding, and the NodeMCU (ESP8266/ESP32) microcontroller has become a favorite tool for building smart, connected devices. In this blog, we explore 20 exciting and innovative projects using NodeMCU, ranging from home automation to smart security systems. Each project offers hands-on experience, allowing enthusiasts, hobbyists, and developers to dive into the realm of IoT and create practical, real-world applications. These NodeMCU projects demonstrate how everyday tasks can be automated and controlled remotely, whether it's monitoring air quality, controlling lighting, securing your home, or managing energy consumption. With detailed explanations and step-by-step guidance, this blog serves as a comprehensive resource for those eager to learn, experiment, and build projects that connect the physical world with the digital realm. Whether you're a beginner or an experienced maker, these projects will inspire you to unlock the potential of IoT with NodeMCU and explore the endless possibilities of smart technology.


4.7k07

Soil Moisture Tester(STEAM Education)

To learn how to build a soil moisture tester that alerts when soil moisture levels are low.


1.6k04

20 Arduino Projects For Beginners

Arduino UNO provides a versatile and accessible platform for building a wide range of innovative projects, whether you're a beginner just starting out or an experienced developer exploring complex applications. From simple LED blinking projects to advanced home automation systems and robotic creations, the possibilities are endless. Through hands-on experimentation and coding, Arduino UNO enables users to understand key concepts such as sensor interfacing, motor control, and automation. As seen in the diverse projects mentioned, the Arduino UNO serves as a gateway to mastering electronics, automation, and IoT development. By engaging in these projects, enthusiasts not only develop technical skills but also unlock creativity, allowing them to build real-world solutions for everyday challenges. With the foundation laid by these projects, the door is open for further exploration, customization, and innovation in the fascinating world of electronics and robotics.


4.3k010

Research on IoT based Attendace System

This IoT based research project is designed to create an RFID-based attendance system using an ESP32 microcontroller and an MFRC522 RFID reader. The system reads RFID card UIDs, compares them with predefined UIDs to identify users, and displays the results on a LiquidCrystal_I2C LCD screen. If the scanned card UID matches the predefined UID, a "Welcome" message is shown; IoT Projects Arduino otherwise, an "Access Denied" message is displayed. This project demonstrates the use of RFID technology for access control and attendance management.IoT Projects .


3.1k011