This project implements a comprehensive smart home automation system using Arduino Mega as the main controller. The system integrates multiple sensors and actuators to provide home security, environmental monitoring, and automated control of various home functions.
- Security System: Password and RFID-based access control for doors and gates
- Fire Detection: Automatic alarm system when fire is detected
- Gas Detection: Automatic ventilation when harmful gases are detected
- Environmental Monitoring: Temperature and humidity monitoring
- Water Leak Detection: Alerts and indicators for water leakage
- Automated Lighting: Motion-activated and light-sensitive lighting control
- Automated Doors/Gates: Servo-controlled doors, gates, and garage door
- Arduino Mega 2560 (Main controller)
- LCD Display (I2C 20x4)
- Servo Motors (for doors, gates, windows)
- Sensors:
- DHT11 (Temperature and Humidity)
- Flame Sensor
- MQ135 Gas Sensor
- Water Sensor
- Light Sensor
- Ultrasonic Distance Sensors (HC-SR04)
- PN532 NFC/RFID Module
- 4x4 Matrix Keypad
- Buzzer (for alarms)
- LEDs (for indicators and lighting)
- Relay Module (for controlling high-power devices)
- Breadboard and Jumper Wires
- LCD: Connected via I2C (SDA, SCL)
- Servo Motors:
- Door Right: Pin 5
- Door Left: Pin 6
- Gate: Pin 4
- Garage: Pin 9
- Keypad: Rows (52, 50, 48, 46), Columns (44, 42, 40, 38)
- Buzzer: Pin 41
- DHT11: Pin 32
- Ultrasonic Sensors:
- Sensor 1: Trig 26, Echo 24
- Sensor 2: Trig 53, Echo 51
- Sensor 3: Trig 39, Echo 31
- Gas Sensor Digital: Pin 22
- Water Sensor Power: Pin 7
- Light Sensor: Pin 30
- Fan: Pin 34
- LEDs:
- Garage Light: Pin 47
- Outside Lights: Pins 35, 33
- Salon Light: Pin 45
- Room Light: Pin 43
- Water Leak Indicator: Pin 49
- Flame Sensor: A15
- Gas Sensor Analog: A14
- Water Sensor Signal: A13
-
Hardware Assembly:
- Connect all components according to the pin configuration
- Refer to the datasheets in the
datasheetsfolder for detailed component information
-
Software Installation:
- Install the Arduino IDE
- Install the required libraries:
- LiquidCrystal_I2C
- Servo
- DHT
- Keypad
- Wire
- PN532 (for RFID)
-
Upload the Code:
- Open
src.inoin the Arduino IDE - Select Arduino Mega 2560 as the board
- Upload the code to the board
- Open
-
System Configuration:
- Default password: "1234" (can be changed in the code)
- RFID tag ID: "D3 61 6A 0B" (can be changed in the code)
-
Initial Access:
- Enter the password on the keypad (default: 1234)
- The gate will open upon successful authentication
- Present the RFID card to unlock the door
-
Automated Functions:
- Fire detection triggers alarm and warning on LCD
- Gas detection activates ventilation fan
- Motion detection turns on room lights automatically
- Darkness detection turns on outside lights
- Water leak detection activates indicator
-
Monitoring:
- LCD displays current temperature and humidity
- Serial monitor outputs all sensor readings
- System Not Responding: Check power connections and Arduino board
- Sensors Not Working: Verify pin connections and sensor functionality
- Servo Motors Not Moving: Check servo connections and power supply
- RFID Not Detecting: Ensure proper I2C connection and card compatibility
- Mobile app integration
- Wi-Fi connectivity for remote monitoring
- Voice control capabilities
- Energy consumption monitoring
- Additional sensors for enhanced functionality
This project is open-source and available for educational and personal use.
Developed as a smart home automation project using Arduino technology.