{"id":21605443,"url":"https://github.com/antonashraf/smart-home-pic16f877a","last_synced_at":"2026-05-20T06:04:34.386Z","repository":{"id":241665977,"uuid":"805069695","full_name":"AntonAshraf/Smart-Home-PIC16f877A","owner":"AntonAshraf","description":"Happy Home: A smart home system featuring a smart door lock, flame detector, and theft protection system.","archived":false,"fork":false,"pushed_at":"2024-06-07T11:52:36.000Z","size":1914,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T19:15:05.523Z","etag":null,"topics":["arduino","data-aquisition","flame-sensor","laser","lcd16x2","ldr-sensor","mikroc","pic16f877a","rfid-rc522","spi","uart"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntonAshraf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-23T20:29:22.000Z","updated_at":"2024-06-07T11:52:40.000Z","dependencies_parsed_at":"2024-05-29T15:44:44.129Z","dependency_job_id":null,"html_url":"https://github.com/AntonAshraf/Smart-Home-PIC16f877A","commit_stats":null,"previous_names":["antonashraf/smart-home-pic16f877a"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonAshraf%2FSmart-Home-PIC16f877A","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonAshraf%2FSmart-Home-PIC16f877A/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonAshraf%2FSmart-Home-PIC16f877A/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonAshraf%2FSmart-Home-PIC16f877A/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntonAshraf","download_url":"https://codeload.github.com/AntonAshraf/Smart-Home-PIC16f877A/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244242324,"owners_count":20421860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","data-aquisition","flame-sensor","laser","lcd16x2","ldr-sensor","mikroc","pic16f877a","rfid-rc522","spi","uart"],"created_at":"2024-11-24T20:13:52.035Z","updated_at":"2026-05-20T06:04:34.130Z","avatar_url":"https://github.com/AntonAshraf.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Happy-Smart-Home-PIC16f877A\n\n## 📃Description\nThis 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.\n\n![Project Image](https://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/368ce15e-84a5-4550-b129-732cf5d7373e)\n\n## 💪Features\n\n- RFID based door lock\n- Fire alarm system\n- Theft detection system with laser security with alarm\n- Screen status display\n- Indication of status with LEDs\n\n## 🌆System Overview\n\n|Level 1| Level 2| Top View|Back View|\n|--------|---------|-----------|----|\n|![Level 1](https://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/a79618d0-93df-48ae-b04d-82cdfb650c8b)|![Level 2](https://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/d84a73a3-c38e-4ad6-847a-d00772e220de)|![Top View](https://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/ebd74ca5-9512-46f5-90af-cfc56e578aad)|![Back View](https://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/d8c99dd7-2a5e-4006-ba89-c5edb532d2e0)|\n\n\n## 🧰Components\n- PIC16f877A microcontroller\n- Arduino UNO\n- RFID module\n- Fire sensor\n- Laser module\n- LEDs\n- LDR sensor\n- Buzzer\n- LCD display 16x2\n- servo motor\n- DC Fan motor\n- 5v power supply\n- Resistors\n- Capacitors\n- Relay\n\n## 🛠️Tools\n- MikroC for PIC\n- Proteus\n- Arduino IDE\n- Pic Programmer k150\n\n## ⚡Circuit Diagram\nMain Circuit Diagram\n\n![Circuit Diagram](https://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/079085f0-52f1-47f0-a3ad-8f11228c28a2)\n\n\nMore detailed circuit diagram can be found in the Proteus file.\n\n## 🏡Body Design\nThe 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](https://github.com/AntonAshraf/Smart-Home-PIC16f877A/blob/main/Design%20Autocad.DWG) is the AutoCAD design for the body.\n\n![Body Design](https://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/d49c2954-5407-40ed-b56d-50e64c6b163e)\n\n\n\n \n## ⚙️Working Scenario\nLet's dive into the working scenario of the system and see how it works in different situations.\n\n### Scenario 1: RFID-based door lock\n- The system will be in the locked state initially.\n- When the RFID card is scanned, the system will check the card number with the stored card number.\n- 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.\n- 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.\n\n\n\nhttps://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/488ff5a3-4ca5-4eaa-8534-886a92be30ea\n\n\n--- \n### 🔥Scenario 2: Fire alarm system\n- The system will continuously check the fire sensor.\n- 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.\n\nhttps://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/fb4e5179-9552-4fe4-873f-79747b9e4fd2\n\n\n---\n\n### 😈Scenario 3: Theft detection system with laser security with alarm\n- The system will continuously check the LDR sensor.\n- 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.\n\n\nhttps://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/cf75f298-28b5-47ed-9aa7-0f596353c0e2\n\n---\n\n## 🔍Pin Configuration with PIC16f877A\n\n![PIC16F877a](https://github.com/AntonAshraf/Smart-Home-PIC16f877A/assets/51335125/d47bbce5-58a0-4b35-80fb-92aacd9a345b)\n\n\n#### LCD Display\n- RS -\u003e B4\n- EN -\u003e B5\n- D4 -\u003e B0\n- D5 -\u003e B1\n- D6 -\u003e B2\n- D7 -\u003e B3\n- VSS -\u003e GND\n- VDD -\u003e 5v\n- V0 -\u003e Potentiometer 10k\n- A -\u003e 5v\n- K -\u003e GND\n\n#### Servo Motor\n- VCC -\u003e 5v\n- GND -\u003e GND\n- Signal -\u003e B2\n\n#### LEDs\n- Blue -\u003e D5\n- Red -\u003e D6\n- Green -\u003e D7\n\n#### Buzzer\n- Buzzer -\u003e D4\n\n#### LDR Sensor\n- Signal -\u003e A0\n\n#### Fire Sensor\n- VCC -\u003e 5v\n- GND -\u003e GND\n- DO -\u003e B6\n\n#### Fan with Relay\n- Fan -\u003e Relay NO\n- Relay COM -\u003e 5v\n- signal -\u003e D3\n\n#### Laser Module\n- VCC -\u003e 5v\n- GND -\u003e GND\n- Signal -\u003e 5v\n\n### RFID Module\nConnect the RFID module with the **Arduino UNO** as follows:\n- VCC -\u003e 5v\n- GND -\u003e GND\n- RST -\u003e D9\n- SDA -\u003e D10\n- MOSI -\u003e D11\n- MISO -\u003e D12\n- SCK -\u003e D13\n- IRQ -\u003e Not Connected\n- RST -\u003e Not Connected\n\n## 💻How to run the project\nclone 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.\n## ✅To Do\n\n- [x] Connect RFID module\n- [x] Make Arduino code for RFID module\n- [x] Uart communication between PIC and Arduino\n- [x] Connect LCD display\n- [x] Connect Servo motor\n- [x] work LEDs with triggers\n- [x] Connect Buzzer\n- [x] Connect Fire sensor\n- [x] Connect LDR sensor\n- [x] Connect Fan with relay\n- [x] Connect Laser module\n- [x] Design the body\n- [x] Integrate all components\n- [x] Test the system\n- [ ] Add Interupts\n- [ ] Use PWM for servo motor\n- [ ] Add push button as bell\n- [ ] Add Bluetooth module for remote control\n- [ ] Add LDR to open garden lights\n- [ ] Add GSM module for SMS alerts\n- [ ] Add Camera for surveillance\n- [ ] Add temperature sensor\n- [ ] Add humidity sensor\n- [ ] Add gas sensor\n- [ ] Add motion sensor\n- [ ] Add voice control\n- [ ] Add AI for smart home\n\n\n## 👥collaborators\n- [Mahmoud Hany Fathallah](https://github.com/MahmoudHanyFathalla)\n- [Nouran Mostafa](https://github.com/NouranMOS)\n- [Salma Ismail](https://github.com/SalmaAzab)\n- [Anton Ashraf](https://github.com/AntonAshraf)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonashraf%2Fsmart-home-pic16f877a","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonashraf%2Fsmart-home-pic16f877a","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonashraf%2Fsmart-home-pic16f877a/lists"}