This is a prototype for an iot based smoke detector which measures the amount of Carbon monoxide, lpg and smoke present. We display the output on the serial monitor as well as the lcd display. We will use the serial plotter to plot the results. Purpose: To design a working model to detect smoke and give readings about the contents of the smoke such as carbon monoxide, smoke percent, lpg, etc Requirements: The model should measure all the major components of smoke and give an analysis graph. The results should be stored on the cloud using thingspeak and esp8266. All the hardware requirements are mentioned below.
- Arduino uno
- MQ2 sensor
- jumper cables
- LCD 16X2 display module
- I2C module
- esp8266 wifi module
- usb type B connector
- screwdriver
- pins
- soldering machine
The following are the reaseach papers referenced:
https://ieeexplore.ieee.org/document/8712773
https://ieeexplore.ieee.org/document/7724514
https://www.instructables.com/Smoke-Detector/
Phase 1: Collection of hardware. Sourced from amazon
Phase 2: Basic integration. Here we checked whether the sensor is working or not by simply checking its power supply and its ability to detect smoke.
Phase 3: Connection of arduino uno with mq2 sensor
Phase 4: Soldering the pins on the lcd display and then integrating the lcd with i2c with the entire setup. (Soldering was a tricky part)
Phase 5: Uploading code and integrating the right libraries
Phase 6: Testing with incense sticks and burning paper.
Phase 7: Using esp8266 wifi module to use the cloud service on thingspeak.
- Proper safety while soldering
- Always connect 3.3V to the esp pin. If 5v power supply is used then the esp will be fried.
- Always disconnect the arduino while changing pins on the board.
MQ2 sensor showing 0 values: We adjusted the connections to the breadboard using jumper cables and verified the pins to be connected. After checking the values, we made use of a stronger source of smoke. This solved the problem as it turned out that the carbon monoxide present in incense sticks is too little to be detected
Soldering: We asked for help from the racing department of our college to help solder the lcd pins.
LCD display not showing values despite being powered on: Turns out, this problem had an easy solution. After days of researching, we simply used a screwdriver and turned the screw of the potentiometer on the I2C module. As a result, the reading on the lcd were displayed properly.
Following things can be used for testing:
- Incense stick
- A paper set on fire
- Plastic set on fire
- A burning cigarette stub
We aim to upload the reading on the thingspeak interface with cloud. Note that, arduino uno by itself does not have any wifi capabilities. So we need to take help of the esp8266 wifi module chip. However due to connection issues with the esp8266 and an error in thingspeak interface, we weren't able to complete the cloud service on time.