Mobile Controlled Home (AVR-ATmega32 Proteus Simulation)
Two subsystems are implemented; a Safety door that could be opened by the mobile application by entering the user name and password, and a light on/off that could also be controlled by the mobile phone.
The system supports 5 users with different names and passwords, and uses an external EEPROM to read and save users' data.
- The program asks the user to enter a username and password, and checks if it matches any user that is saved in the EEPROM.
- If the user entered a wrong username or password 3 times, the system is locked for 10 seconds, and a siren sound is generated from the buzzer using PWM, then the system is unlocked again after 10 seconds.
- If the user entered "MASTER" as a username and password, the system enters the "Master User" state.
- If the user entered a correct username and password, the system enters the "Normal User" state.
- Master interface manages the users in the system and updates the data on the EEPROM.
- It has 3 options,
- Add User: Adds a new user to the system
- Edit User: Edits an existing user
- Remove User: Removes an existing user from the system
- Exit: Exits master user interface and returns to login interface
- Normal interface controls the door and lights in the home.
- The user can choose from 5 commands
- led on: Turns the lights on
- led off: Turns the lights off
- door open: Opens the door
- door close: Closes the door
- logout: Exits normal user interface and returns to the login interface
- DIO: Used for controlling GPIO pins.
- Timer0: used in PWM mode to create a siren sound from the buzzer
- Timer1: Used in PWM mode to control the servo motor
- Timer2: Used in normal mode for generating delays in the system
- TWI (I2C): Used for interfacing with the EEPROM
- UART: Used for interfacing with the Bluetooth module
-
- Master_User: Provides the master user interface
- Normal_User: Provides the master user interface
- Password_Check: Contains functions responsible for password-checking mechanisms
- String_Functions: Contains functions that help in dealing with strings
- User_Management: Contains functions that manage all the users in the system.
-
- Bluetooth_Module: Driver for HC-05 Bluetooth module and is used for interfacing with mobile phone
- EEPROM: Driver for ST24C08 EEPROM and is used to read and write data from and to the EEPROM
- SERVO: Driver used to control the servo motor
- SIREN: Driver used to make a siren sound from the buzzer
-
- DIO: Driver used to control the GPIO pins
- GIE: Driver used to control the global interrupt enable for the MCU
- PWM: Driver used for controlling timers 0/1/2 in PWM mode
- TMR: Driver used for controlling timers 0/1/2 in normal mode
- TWI: Driver used for interfacing with the I2C peripheral
- UART: Driver used for interfacing with the UART peripheral
-
- BIT_MATH: Contains bit-wise operations
- STD_TYPES: Contains all the data types used