Introduction: Home Safety
The trend of acquiring safety and security technologies for a home is on a rise. To mitigate issues like theft attempt or gas leakage, away from home,a user has to know that such an incident has taken place. This project helps the user to know the current status of the house through a web server. The user is provided with information on the status of unauthorized access, flame detection and gas leakage.
Note: To make the web server accessible through Internet, port forwarding has to be done on the router.
Step 1: Components Required
- Arduino UNO R3 x 1
- USB Cable x 1
- Arduino Ethernet Shield x 1
- Gas Sensor (MQ2) x 1
- Small breadboard x 1
- Router x 1
- Ethernet Cable x 1
- PIR Sensor x 1
- Flame Sensor x 1
- Male to Female connecting wires x 20
- Male to Male connecting wires x 20
Step 2: Interfacing PIR Sensor With Ethernet Shield
A passive infrared sensor (PIR sensor) is an electronic sensor that measures infrared (IR) light radiating from objects in its field of view. They are most often used for motion detection.
Working of the Pins:
Time Delay Adjust: Sets how long the output remains high after detecting motion.It can be adjusted from 5 seconds to 5 minutes.
Sensitivity Adjust:Sets the detection range.(3 meters to 7 meters)
Trigger Selection Jumper: Set for single or repeatable triggers.
Ground pin: Ground input
Output Pin: Low when no motion is detected. High when motion is detected. High is 3.3V
Power Pin: 5 to 20 VDC Supply input.
- First of all place the Arduino Ethernet shield on the top of Arduino Board.
- Connect the PIR sensor Signal pin to the digital pin 2 on the Arduino Ethernet shield using male to female connecting wire.
- Take one male to male wire, connect one terminal of wire to the +5V of Arduino Ethernet Shield and other terminal of the wire on the Breadboard.
- Take a male to female wire, connect 1 terminal where 5V pin of the Arduino is connected on the breadboard and the other terminal of the wire to the Vcc pin of PIR Sensor.
- Take a male to female wire, connect 1 terminal to the GND pin of the Arduino Ethernet Shield and the other terminal of the wire to the GND pin of PIR Sensor.
Step 3: Interfacing Flame Sensor With Ethernet Shield
A flame detector is a sensor designed to detect and respond to the presence of a flame or fire. The flame sensor is used to detect the presence of fire or other infrared source (Flame or a light source of a wavelength in the range of 760 nm to 1100 nm can be detected). It can be used in fire fighting robot or heat seeking robot.
• Small and compact in size
• Adjustable threshold value
• 2 state binary output (logic high and low)
Hardware Connections: The module has simple 4 pin male berg connector:
• VCC -- 3.3V-5V voltage
• GND -- GND
• DO -- board digital output interface (0 and 1)
• AO -- board analog output interface
• The potentiometer is provided to adjust the threshold level. To read sensor status D0 pin should be connected to a digital pin.
- Connect the Flame Sensor D0 pin to the digital pin 3 on the Arduino Ethernet shield using male to female connecting wire.
- Take a male to female wire, connect 1 terminal where 5V pin of the Arduino is connected on the breadboard and the other terminal of the wire to the VCC pin of Flame Sensor.
- Take a male to female wire, connect 1 terminal to the GND pin of the Arduino Ethernet Shield and the other terminal of the wire to the GND pin of Flame Sensor.
Step 4: Interfacing Gas Sensor With Ethernet Shield
A gas detector is a device that detects the presence of gases in an area, often as part of a safety system. Gas Sensor(MQ2) module is useful for gas leakage detection (home and industry). It is suitable for detecting H2, LPG, CH4, CO, Alcohol, Smoke or Propane. Due to its high sensitivity and fast response time, measurement can be taken as soon as possible. The sensitivity of the sensor can be adjusted by potentiometer. This type of equipment is used to detect a gas leak or other emissions and can interface with a control system so a process can be automatically shut down.
The voltage that the sensor outputs changes accordingly to the smoke/gas level that exists in the atmosphere. The sensor outputs a voltage that is proportional to the concentration of smoke/gas. In other words, the relationship between voltage and gas concentration is the following:
• The greater the gas concentration, the greater the output voltage
• The lower the gas concentration, the lower the output voltage
- Connect the Gas Sensor A0 pin to the Analog pin A0 on the Arduino Ethernet shield using male to female connecting wire.
- Take a male to female wire, connect 1 terminal where you connected 5v pin of the Arduino on the breadboard and the other terminal of the wire to the Vcc pin of Gas Sensor.
- Take a male to female wire, connect 1 terminal to the GND pin of your Arduino Ethernet Shield and the other terminal of the wire to the GND pin of Gas Sensor.
Step 5: Upload the Arduino Sketch
- Ensure that all the connections are checked again.
- Connect the Ethernet cable from the router to the Ethernet port of Arduino Ethernet Shield.
- Connect the USB cable to your Arduino.
- Upload the sketch
- Now connect a phone/laptop to the router via WiFi or LAN.
- Open a browser and enter the static IP address typed in the sketch.
Now, the webpage can be seen on any browser on phone/Laptop.
Step 6: Reference Images for Construction
We have a be nice policy.
Please be positive and constructive.