loading

Hii everyone

In my first instructable I will be making a gas alarm which sends message to the user if pollution is detected.

Step 1: Materials Required

(1) Arduino Uno board (or any Arduino board)

(2) GSM shield (Personally recommended GSM SIM900A).

(3) Jumper Cables

(4) 10 K resistor

(5) Breadboard

(6) MQ 135 gas sensor

Step 2: Making Connections (GSM MODULE TO ARDUINO)

First of all connect the Tx of gsm module to pin #2 of arduino , Rx to pin#3 and make the grounds of both the apparatus common. And don't forget to power the gsm shield with a 12v external power source while running your device.

Step 3: Making Connections (between sensor and Arduino)

make connections as shown in pic and TREAT YHE SIDE OF SENSOR WITH"MQ135" WRITTEN AS TOP.

and choose analog pin A0.( to match with code otherwise you have to change it)

Step 4: Testing Time

firstly we will run code attached so that we can see readings of sensor in normal and polluted environment on serial monitor.

Note down the values in both the cases.( we can make the environment polluted by lighting incense stick in front of sensor :p)

Step 5: Final testing

Use the noted values to edit the final code attached and change the cellphone number in code and write the code in arduino.

Open serial monitor and wait

serial monitor will show "status OK" and soon will send sms to the cellphone.

Video soon would be published.

<p>can we replace PIR sensor by Ultrasonic sensor</p>
<p>why is the sensor reading being taken in the setup() when it ( as far as I know) runs only once.</p><p>what all is happening inside loop()?</p><p>why is the baud rate 2400?</p>
Gsm module used works best on baud rate 2400 for purpose (refer datasheet) <br><br>Sensor reading is in setup so that i can avoid multiple sending of SMSs (obivously i dont want to go broke :p) by changing the code a little you can get what you want (probably i was very lazy to do so)<br><br>And for inside loop, we can also read the messages received on sim on serial monitor.this is for that :)<br><br>Hope that helps <br>Sorry for late reply ....<br><br>
<p>This is a great idea. Thanks!</p>
<p>thanks !!</p>

About This Instructable

27,638views

45favorites

License:

Bio: Teen highschooler from Udaipur,India. Technology Enthusiast. Been there done that !
More by us241098:Sending sms if smoke is detected (Arduino+GSM SIM900A 
Add instructable to: