Arduino LM35 + MQ2

by DenizG1 in Circuits > Arduino

6964 Views, 20 Favorites, 0 Comments

Arduino LM35 + MQ2

Arduino_logo_pantone.png

In this project i want a device that uses bolt MQ2 and LM35 for a basic alert system

What We Need?

IMG-20170304-WA0010.jpg

1. First we need an arduino microcontroller

2. LM35 temperature sensor

3. MQ2 smoke and gas sensor

4. We need 6 1K ohm resistors

5. 5 Leds

6. Some jumper wires

7. 1 Breadbord

8. 1 Buzzer

Lets Hook Up LM35 and Its Leds

IMG-20170304-WA0002.jpg
IMG-20170304-WA0006.jpg

First connect LM35 and leds just like in the picture and then connect middle leg of LM35 to arduinos analog pin 0 and right leg to + line and left leg to - line and connect blue leds + output to pin 13 and - input to - line with 1K resistor yellow leds output pin 12 and - input to - line with 1K resistor red leds output to pin 11 and - input to - line with 1K resistor and that is it

Lets Hook Up MQ2 and Its Leds and Buzzer

IMG-20170305-WA0006.jpg
IMG-20170305-WA0007.jpg

First connect everything just like in the picture connect right leg of the sensor to analog pin 1 and vcc to + and gnd to - and connect buzzers - to - with 1K resistor and + to pin 8 and blue leds - to - with 1K resistor and + to pin 9 and red leds - to - with 1K resistor and + to pin 10 and thats it

Code

IMG-20170305-WA0009.jpg
IMG-20170305-WA0010.jpg

Sorry but I couldnt write it to here but you can write it from the video and from the pictures

Video

Arduino LM35 + MQ2

Hope you can make it and use it