Introduction: IoT Based Toxic Gas Detection System
Toxic gases have huge environmental effects. People are suffering several diseases due to them. Properly detection of toxic gas level is important for us. with this respect I develop this project for sensing the toxic gas level in our environment.
Toxic gases have huge environmental effects. People are suffering several diseases due to them. Properly detection of toxic gas level is important for us. with this respect I develop this project for sensing the toxic gas level in our environment.
Step 1: Necessary Things
- Linkit Smart Dou
- MQ Gas Sensors (MQ-3, MQ-2, MQ-7)
- Card Board
- Jumper Wire
- Thinger.io (Account)
- Arduino IDE
- Hot Glue Gun
- Soldering Iron
- Cutter knife
Step 2: Building the System
- Make hole using cutter knife for placing gas sensors on it. Attached some hot glue on the sensors back side for fixing the sensors with the card board.
- Connect the sensors pin with linkit smart dou micro-controller by using proper pin diagram.
- Connect the GND and VCC pin of all the sensors.
- Place the micro-controller inside the card board and fixed it using hot glue.
If you want to add more sensors ..... you can add it.
Pin Diagram
Power up the linkit board via usb or usb power bank
MQ2 sensor
VCC --- 5V
A0 ------ A0 (linkit board)
GND ----- GND
MQ3 sensor
VCC --- 5V
A0 ------ A1 (linkit board)
GND ----- GND
MQ7 sensor
VCC --- 5V
A0 ------ A2 (linkit board)
GND ----- GND
All the VCC and Ground are connected with Linkit board's VCC and Ground.
Step 3: Preparing Linkit Smart Dou
By Default Linkit Smart7688 Duo is working in AP Mode but for this project we need to make it to Station Mode. Since we have a plan to use this board in arduino yun mode so, we need to do some configuration.
First, connect the board with your PC and Scan the Wifi Network and you will find the Network with the name of LinkIT *******; connect to it and open your browser and type this URL. http://mylinkit.local/ and you will see the login screen. First time put the password and click on save and then again login. After Login click on "Network" tab and then you will the following screen and select the Station mode. and then select your own wifi network and then enter your wifi password and click on "Configure & Restart". Now your board is connected with your own network.
For more details please follow the wiki of linkit smart dou board.
Now we need to configure the arduino yun bridge mode of linkit smart Dou.
From windows 10/7, open the putty terminal and write the ip address of the linkit smart dou board or write mylinkit.local.
After connecting putty with board execute the following commands to enable Bridge Mode.
# uci set yunbridge.config.disabled=’0’
# uci commit
# reboot
Now the board is ready for this project.
Step 4: Uploading the Arduino Source Code to Linkit Smart Dou
• Open the Arduino IDE.
• To get the board manager you must go to File >> Preferences then, in the "Additional Boards Manager URLs" paste the link bellow: (check the figure)
http://download.labs.mediatek.com/package_mtk_lin...
Then, install the linkit smart dou board by going to Tools >> Board > Boards Manager... You can find it by scrolling down, or just typing linkit in the search box.(check the figure)
As you can see I have already installed it, but if you haven't make sure you do it by clicking the install button.
Now check whether the board is available or not, by click on Tools >> Board, and in Tools > Port. As seen here.(check the figure)
Now, you just write the code and upload by clicking upload button (******).
*****Uploading Firmware to linkit board
Before uploading the Arduino code to the board, make sure that your thinger.io lib for Adruino IDE is properly downloaded and your user name and credential is properly added. The Thinger.io dashboard visualizes the real time data after uploading the source code to the linkit board.
Attachments
Step 5: Setup the Thinger.io Platform
Thinger.io is a iot-cloud platform which is used here for streaming data from the device to cloud. It provides free streaming service up-to two devices. If you don't have any account please open an account.
For adding a new device, click on add device and then enter the name , description and your credential (credential is mandatory for connecting a device to thinger.io, you need to put this credential and device name as well as your user name on the Arduino source code for connecting the device to the cloud).
For creating a Dashboard for data visualization, you need to click on add dashboard then put the dashboard name and description. please refer thinger.io documentation for more details about dashboard, device and other services.
Uploading Firmware to linkit board
Before uploading the Arduino code to the board, make sure that your thinger.io lib for Adruino IDE is properly downloaded and your user name and credential is properly added.
The Thinger.io dashboard visualizes the real time data after uploading the source code to the linkit board.