GSM SECURITY SYSTEM USINF AVR Controller
To make project on AVR, GSM secuirty
In this project we will make Office or home security system. There will be security for LPG gas leakage, intruder, fire and Rain. We will monitor these and control also. For controlling we will use relay for controlling devices and use fan for fire. We will use GSM modem to monitor these. We will send sms on particular nos. when any problem increase above the peak level.
We will use AT commands to send sms from mobile.
Micro controller interface
In this sensor unit it is our choice , how many sensor’s we use , IN this project we use two sensor’s, In this project we use two electronics circuit with infra red sensor’s and fire alarm sensor.
In the infra red sensor. We use ic 555 as a main component. Pin no 4 and pin no 8 is connected to the positive supply. Pin no 1 is connected to the negative voltage. One capacitor is grounded from the pin no 5 for noise cancellation. Output is available on the pin no 3. Sensor is connected to the pin no 2.
In the case of infra red sensor. Pin no 2 is negative bias through the 33k ohm resistor and pin no is positively biased through the photodiode. One infra red transmitter l.e.d is focused to the photodiode . Infra red l.e.d is directly connected to the positive and negative supply through the 470 ohm resistor..
In normal stage when light is focus on the photodiode then pin no 2 is positively biased photodiode. If pin no 2 is positive then negative output is available on the pin no 3. Now when any body interrupt the light then there is no light on the photodiode and pin no 2 is now gets its voltage from only 33 k ohm resistor. If pin no 2 is become negative then output is shifted to the pin no 3. when positive output is available on the pin no 3 and with the help of this voltage NPN transistor is on and npn transistor provide a negative voltage as a pulse to the microcontroller.
If we connect two sensor as a input to the microcontroller then we use same circuit with the ic 555 .
Note that microcontroller sense only negative input to the microcontroller.
We will use GSM modem sm300 at 9600 baud rate.
This GSM modem is a highly flexible plug and play quad band GSM modem for direct and easy
integration to RS232. Supports features like Voice, Data/Fax, SMS,GPRS and integrated TCP/IP
Specifications for Fax
· Group 3, class 1
Specifications for data
· GPRS class 10: max 85.6 kbps(downlink)
· PBCCH support
· Coding schemes CS 1,2,3,4
· CSD upto 14.4 kbps
· Non transparent mode
· Quad Band GSM/GPRS
· GPRS multi-slot class 10/8
· GPRS Mobile station class B
· Compliant to GSM Phase 2/2+
o Class 4 (2W@850/900Mhz)
o Class 1(1W@1800/1900Mhz)
· Control via AT commands(GSM 07.07,
07.05 and enhanced AT commands)
· Operation Temperature(-20 deg C to
+55 deg C)
Specifications for SMS
· Point-to-point MO and MT
· SMS cell broadcast
· Text and PDU mode
· Use AC – DC Power Adaptor with following ratings
· DC Voltage : 12V
· DC Current : 1A
· Polarity : Centre +ve & Outside –ve
· Current Consumption in normal operation 250mA, can rise up to 1Amp while transmission.
· RS-232 through D-TYPE 9 pin connector, Serial port baud rate adjustable 1200 to115200
bps (9600 default)
· Stereo connector for MIC & SPK
· Power supply through DC socket
· SMA antenna connector
· Push switch type SIM holder
· LED status of GSM / GPRS module
· Insert SIM card: Press the yellow pin to remove the tray from the SIM cardholder. After
properly fixing the SIM card in the tray, insert the tray in the slot provided.
· Connect Antenna: Screw the RF antenna on the RF cable output provided.
· If voice call is needed, connect the mic and speaker to stereo sockets.
· Connect RS232 Cable: (Cable provided for RS232 communication) Default baud rate is
9600 with 8-N-1, no hardware handshaking. Cable provided has pins 7 and 8 shorted that will
set to no hardware handshaking. In you need hardware handshaking the pins 7-8 can be
taken for signaling.
o Pin 2 is RS232 level TX out
o Pin 3 is RS232 level RX in
o Pin 5 is Ground
o Pin 7 RTS in (shorted to pin 8 in cable for no hardware handshaking)
o Pin 8 CTS out (shorted to pin 7 in cable for no hardware handshaking)
Connect the power Supply (9-12V) to the power jack. Polarity should be Center +ve and
outer –ve DC jack.
Network Led indicating various status of GSM module eg. Power on, network registration &
After the Modem registers the network, led will blink in step of 3 seconds. At this stage you
can start using Modem for your application.
Examples for send and receive SMS
For sending SMS in text Mode:
AT+CMGF=1 press enter
AT+CMGS=”mobile number” press enter
Once The AT commands is given’ >’ prompt will be displayed on the screen.
Type the message to sent via SMS. After this, press ctrl+Z to send the SMS.
If the SMS sending is successful, “ok” will be displayed along with the message number.
For reading SMS in the text mode:
AT+CMGF=1 Press enter
Number (no.) is the message index number stored in the sim card. For new SMS, URC will be received
on the screen as +CMTI: SM ‘no’. Use this number in the AT+CMGR number to read the message.
The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.
The AVR architecture was conceived by two students at the Norwegian Institute of Technology (NTH) Alf-Egil Bogen and Vegard Wollan.
The original AVR MCU was developed at a local ASIC house in Trondheim, Norway called Nordic VLSI at the time, now Nordic Semiconductor, where Bogen and Wollan were working as students. It was known as a μRISC (Micro RISC) and was available as silicon IP/building block from Nordic VLSI. When the technology was sold to Atmel from Nordic VLSI, the internal architecture was further developed by Bogen and Wollan at Atmel Norway, a subsidiary of Atmel. The designers worked closely with compiler writers at IAR Systems to ensure that the instruction set provided for more efficient compilation of high-level languages. Atmel says that the name AVR is not an acronym and does not stand for anything in particular. The creators of the AVR give no definitive answer as to what the term "AVR" stands for. However, it is commonly accepted that AVR stands for Alf (Egil Bogen) and Vegard (Wollan)'s Risc processor".
Note that the use of "AVR" in this article generally refers to the 8-bit RISC line of Atmel AVR Microcontrollers.
Among the first of the AVR line was the AT90S8515, which in a 40-pin DIP package has the same pinout as an 8051 microcontroller, including the external multiplexed address and data bus. The polarity of the RESET line was opposite (8051's having an active-high RESET, while the AVR has an active-low RESET) but other than that, the pinout was identical.
The AVR is a modified Harvard architecture machine where program and data are stored in separate physical memory systems that appear in different address spaces, but having the ability to read data items from program memory using special instructions.
AVRs are generally classified into five broad groups:
tinyAVR — the ATtiny series
0.5–8 kB program memory
Limited peripheral set
megaAVR — the ATmega series
4–256 kB program memory
Extended instruction set (Multiply instructions and instructions for handling larger program memories)
Extensive peripheral set
XMEGA — the ATxmega series
16–384 kB program memory
44–64–100-pin package (A4, A3, A1)
Extended performance features, such as DMA, "Event System", and cryptography support.
Extensive peripheral set with DACs
megaAVRs with special features not found on the other members of the AVR family, such as LCD controller, USB controller, advanced PWM, CAN etc.
FPSLIC™ (AVR with FPGA)
FPGA 5K to 40K gates
SRAM for the AVR program code, unlike all other AVRs
AVR core can run at up to 50 MHz 
Main article: AVR32
In 2006 Atmel released microcontrollers based on the new, 32-bit, AVR32 architecture. They include SIMD and DSP instructions, along with other audio and video processing features. This 32-bit family of devices is intended to compete with the ARM based processors. The instruction set is similar to other RISC cores, but is not compatible with the original AVR or any of the various ARM cores.
Flash, EEPROM, and SRAM are all integrated onto a single chip, removing the need for external memory in most applications. Some devices have a parallel external bus option to allow adding additional data memory or memory-mapped devices. Almost all devices (except the smallest TinyAVR chips) have serial interfaces, which can be used to connect larger serial EEPROMs or flash chips.
Program instructions are stored in non-volatile flash memory. Although the MCUs are 8-bit, each instruction takes one or two 16-bit words.
The size of the program memory is usually indicated in the naming of the device itself (e.g., the ATmega64x line has 64 kB of flash while the ATmega32x line has 32 kB).
There is no provision for off-chip program memory; all code executed by the AVR core must reside in the on-chip flash. However, this limitation does not apply to the AT94 FPSLIC AVR/FPGA chips.
Internal data memory
The data address space consists of the register file, I/O registers, and SRAM.
Atmel ATxmega128A1 in 100-pin TQFP package
The AVRs have 32 single-byte registers and are classified as 8-bit RISC devices.
In most variants of the AVR architecture, the working registers are mapped in as the first 32 memory addresses (000016–001F16) followed by the 64 I/O registers (002016–005F16).
Actual SRAM starts after these register sections (address 006016). (Note that the I/O register space may be larger on some more extensive devices, in which case the memory mapped I/O registers will occupy a portion of the SRAM address space.)
Even though there are separate addressing schemes and optimized opcodes for register file and I/O register access, all can still be addressed and manipulated as if they were in SRAM.
In the XMEGA variant, the working register file is not mapped into the data address space; as such, it is not possible to treat any of the XMEGA's working registers as though they were SRAM. Instead, the I/O registers are mapped into the data address space starting at the very beginning of the address space. Additionally, the amount of data address space dedicated to I/O registers has grown substantially to 4096 bytes (000016–0FFF16). As with previous generations, however, the fast I/O manipulation instructions can only reach the first 64 I/O register locations (the first 32 locations for bitwise instructions). Following the I/O registers, the XMEGA series sets aside a 4096 byte range of the data address space which can be used optionally for mapping the internal EEPROM to the data address space (100016–1FFF16). The actual SRAM is located after these ranges, starting at 200016.
Almost all AVR microcontrollers have internal EEPROM for semi-permanent data storage. Like flash memory, EEPROM can maintain its contents when electrical power is removed.
In most variants of the AVR architecture, this internal EEPROM memory is not mapped into the MCU's addressable memory space. It can only be accessed the same way an external peripheral device is, using special pointer registers and read/write instructions which makes EEPROM access much slower than other internal RAM.
However, some devices in the SecureAVR (AT90SC) family  use a special EEPROM mapping to the data or program memory depending on the configuration. The XMEGA family also allows the EEPROM to be mapped into the data address space.
Since the number of writes to EEPROM is not unlimited — Atmel specifies 100,000 write cycles in their datasheets — a well designed EEPROM write routine should compare the contents of an EEPROM address with desired contents and only perform an actual write if contents need to be changed.
PCB general purpose
IR sensor 5 mm.
push to on sw
.001 µf,0.1 µf,0.01µf
Crystal 11.0592 MHz
Speaker 8 ohm
Relay 12v 100 ohm
Transformer 6v 500mA
Copper clad board
BLOCK DIAGRAM AUTO DIALER SECURITY SYSTEM
CIRCUIT AND THEORY ARRANGEMENT
CHECKING AVAILABILITY OF COMPONENTS
COMPONENT INSERTION AND SOLDERING
REWORK OR TROOUBLE SHOOTING
www.toshnakits.com for electronics components in punjab
Book – Ali mazidi