This is a project for a smart home system using PIC16f877A microcontroller. The system is designed to control home for ease of life and happiness. The system includes an RFID-based door lock, fire alarm system, theft detection system with laser security with alarm, screen status display, and indication of status with LEDs. That was done as a project for the Data Aquistion Course at the Faculty of Computer Engineering, AASTMT - Cairo 2024.
- RFID based door lock
- Fire alarm system
- Theft detection system with laser security with alarm
- Screen status display
- Indication of status with LEDs
Level 1 | Level 2 | Top View | Back View |
---|---|---|---|
- PIC16f877A microcontroller
- Arduino UNO
- RFID module
- Fire sensor
- Laser module
- LEDs
- LDR sensor
- Buzzer
- LCD display 16x2
- servo motor
- DC Fan motor
- 5v power supply
- Resistors
- Capacitors
- Relay
- MikroC for PIC
- Proteus
- Arduino IDE
- Pic Programmer k150
Main Circuit Diagram
More detailed circuit diagram can be found in the Proteus file.
The body is designed in Autocad and cut using a laser cutting machine. The body is designed to hold all the components in place and provide a good look for the system. The material used is MDF 3mm thickness. Here is the AutoCAD design for the body.
Let's dive into the working scenario of the system and see how it works in different situations.
- The system will be in the locked state initially.
- When the RFID card is scanned, the system will check the card number with the stored card number.
- If the card number matches, the system will unlock the door using a servo, show the card number on the LCD display, buzzer accepted tone, and turn on the green LED.
- If the card number does not match, the system will show the card number on the LCD display, buzzer rejected tone, and turn on the red LED.
Entering.Home.mp4
- The system will continuously check the fire sensor.
- If the fire sensor detects a fire, the system will show the fire detected message on the LCD display, turn on the blue LED, turn on the fan using relay, and buzzer fire alarm tone.
FIre.Detection.mp4
- The system will continuously check the LDR sensor.
- If the LDR sensor detects any interruption in the laser beam, the system will show the theft detected message on the LCD "Theft detected, Call 911", turn on all LEDs blinking, and buzzer theft alarm tone.
Thief.Detection.mp4
- RS -> B4
- EN -> B5
- D4 -> B0
- D5 -> B1
- D6 -> B2
- D7 -> B3
- VSS -> GND
- VDD -> 5v
- V0 -> Potentiometer 10k
- A -> 5v
- K -> GND
- VCC -> 5v
- GND -> GND
- Signal -> B2
- Blue -> D5
- Red -> D6
- Green -> D7
- Buzzer -> D4
- Signal -> A0
- VCC -> 5v
- GND -> GND
- DO -> B6
- Fan -> Relay NO
- Relay COM -> 5v
- signal -> D3
- VCC -> 5v
- GND -> GND
- Signal -> 5v
Connect the RFID module with the Arduino UNO as follows:
- VCC -> 5v
- GND -> GND
- RST -> D9
- SDA -> D10
- MOSI -> D11
- MISO -> D12
- SCK -> D13
- IRQ -> Not Connected
- RST -> Not Connected
clone the repository and open the project in MikroC for PIC. Compile the project and load the hex file into the PIC16f877A microcontroller using the PIC programmer. Connect the components as per the circuit diagram. Run the project and enjoy the smart happy home system.
- Connect RFID module
- Make Arduino code for RFID module
- Uart communication between PIC and Arduino
- Connect LCD display
- Connect Servo motor
- work LEDs with triggers
- Connect Buzzer
- Connect Fire sensor
- Connect LDR sensor
- Connect Fan with relay
- Connect Laser module
- Design the body
- Integrate all components
- Test the system
- Add Interupts
- Use PWM for servo motor
- Add push button as bell
- Add Bluetooth module for remote control
- Add LDR to open garden lights
- Add GSM module for SMS alerts
- Add Camera for surveillance
- Add temperature sensor
- Add humidity sensor
- Add gas sensor
- Add motion sensor
- Add voice control
- Add AI for smart home