Process - YUQI1122/ECE387_Midterm GitHub Wiki

Before build the smoke detector, I need to know how sensitive the gas sensor is when applying different kinds of gases. I choose butane, alcohol, smoke from vapor and smoke from cigarettes to see the gas sensor is how sensitive to these gases. Firstly, I write the code to show the analog value of no gas put on the sensor. Then, I detect the analog value for these four gases one by one. Then, I find that it is hard to control the same concentration of the gas I want to test in ppm just by hand. Also, I found that the analog value will increase when I put more testing gas no matter what gas it is. Therefore, I compare the concentration of each gas when the analog value reaches 250 and record the first video. The Buzzer will work when the analog value reaches 250. According to the videos, I found that the MQ2 sensor is most sensitive to alcohol because the analog value becomes largest when I apply alcohol and it is least sensitive to the vapor gas because even the gas is very large amount, the analog value doesn't reach 250. Therefore, alcohol will be a big influence of the smoke detector. To solve this problem, I just write a code to convert analog value to shows the concentration of gas by parts per million and only detect the ppm value the gas. Then, I can only check the concentration of each gas to build a smoke detector which is shown in video 2.