Beruflich Dokumente
Kultur Dokumente
microcontroller 8051 security alarm based system circuits GSM based Home security system hidden cameras
The major building blocks of this gsm based project are: 1. Microcontroller based control system with regulated power supply. 2. GSM Modem/phone. 3. Digital and Analog sensors and controlled devices. Above is the circuit diagram of home or office security system. We can see that system has TEN LEDs attached to microcontroller. These LEDs can serve two jobs. One is ofcourse indication and the second is "we can attach any external device with these signals like bulb or cameera, or any suitable device using proper optocoupler and relays.First LED is flashing led, which is an indication that the system is running smoothly. The second LED is for alarm against security problems, remaining eight LEDs can be used for controlling cameras in each room to take snaps of the person who has un-authorised access to that room. Thus we say that this GPS based camera controlled security system for home or offices. CODE of the GPS based camera controlled security system using microcontroller AT89s51 is written in keil C51 microvision 4. #include<at89x51.h> // include at89x51 . h #include<stdio.h> // include stdio . h #include<stdlib.h> // include stdlib . h void initialize_GSM_modem(void); void initialize_serialcommunication(void); unsigned int counterup = 0; unsigned char Command_CMGF[]="AT+CMGF=1\r"; // AT+CMGF for selecting Text Mode unsigned char CtrlZ=0x1A; // CTRL+Z for sedning SMS after the message has been entered unsigned char Command_CMGS[]="AT+CMGS =+9233385xxxxx\r"; // recepient mobile number unsigned char Command_AT[]="AT\r"; unsigned char msg02[]="Hello!"; // inputs // if any of the push button is pressed logic zero will be detected by microcontroller on respective input pin sbit input_door_1 = P1^0; sbit input_door_2 = P1^1; sbit input_door_3 = P1^2; sbit input_door_4 = P1^3;
if(input_door_6 == 0){ output_door_6=0; alarm = 1; puts("door # 3 is opened"); delay2(); while(!TI); TI = 0;SBUF = 0x1A;} if(input_door_5 == 0){ output_door_5=0; alarm = 1; puts("door # 4 is opened"); delay2(); while(!TI); TI = 0;SBUF = 0x1A;} if(input_door_4 == 0){ output_door_4=0; alarm = 1; puts("door # 5 is opened"); delay2(); while(!TI); TI = 0;SBUF = 0x1A;} if(input_door_3 == 0){ output_door_3=0; alarm = 1; puts("door # 6 is opened"); delay2(); while(!TI); TI = 0;SBUF = 0x1A;} if(input_door_2 == 0){ output_door_2=0; alarm = 1; puts("door # 7 is opened"); delay2(); while(!TI); TI = 0;SBUF = 0x1A;} if(input_door_1 == 0){ output_door_1=0; alarm = 1; puts("door # 8 is opened"); delay2(); while(!TI); TI = 0;SBUF = 0x1A;} if(alarm == 1) { counterup++; if(counterup>=10) { counterup = 0; alarm = 0; P2=0;} } } } void initialize_GSM_modem(void){ delay2(); puts(Command_AT); delay2(); puts(Command_CMGF); delay2(); puts(Command_CMGS); delay2();