Magnetic door lock

download Magnetic door lock

of 15

  • date post

    19-May-2015
  • Category

    Documents

  • view

    1.649
  • download

    1

Embed Size (px)

Transcript of Magnetic door lock

  • 1. Magnetic Door Lock employing Arduino Technology

2. Abstract The Magnetic Door lock is a simple locking device that consists of a magnetic lock and armature platewith no moving parts and it purely works due to the magnetic field. Therefore the magnetic lock is trulyfail-safe (Power to lock). Thus, the magnetic lock is met with both security and fire safety requirements and is available for emergency exit doors. While the magnetic door lock might be quite a simplistic locking device, but the efficiency of the locking gadget can certainly not be denied. The purpose of thispaper is to design Magnetic Door Lock employing Arduino Technology. Magnetic lock or mag lock usesan electrical current to produce a magnetic force. When a current is passed through the coil, the magnetlock becomes magnetized. The door will be securely bonded when the electromagnet is energizedholding against the armature plate. Access control systems are operated by peripheral device (ie. keypad reader here ) to identify the user whether access is permitted or not. The power will beautomatically turned off by the user and gains access through a reader. The objective of the work undertaken in this paper is to sense the correctness of a secret code using the Arduino technology. 3. I.INTRODUCTIONII.DESCRIPTION ABOUT THETHIS section gives a brief introduction about the work,MICROCONTROLLERwhich describes all the components namely MagneticThis section gives a brief idea about theDoor Lock, Arudino platform, Atmeg168. Followed bydesign of Magnetic Door Lock by Arudino ATMEGA168 microcontroller its core features,Technology. block diagram, pin diagram and its description.Door locks are certainly considered to be the basic A. INTRODUCTIONmodes of the everyday household door andCircumstances that we find ourselves today in thekeeping this fact in mind, door locks hold an field of microcontrollers had their beginnings inimmense importance for the protection of doors. the development of technology of integratedWhile the magnetic door lock might be quite a circuits. This development had made it possible tosimplistic locking device, but the efficiency of thestore hundreds of thousands of transistors into onelocking gadget can certainly not be denied. chip. That was a prerequisite for production ofMagnetic Door Lock employing Arduinomicrocontrollers, and adding external peripheralsTechnology. The main aim of the worksuch as memory, input-output lines, timers andundertaken in this paper is to sense the correctnessother made the first computers. Further increasingof a secret code using the Arduino technology.of the volume of the package resulted in creationWhen the correct code is entered through keypad,of integrated circuits. These integrated circuitsit lights a green LED in addition to operating acontained both processor and peripherals. That issmall solenoid which when powered, will stronglyhow the first chip containing a microcomputer, orattract the metal slug in its center, pulling it into what would later be known as a microcontrollerplace, when the power is removed, it is free to came out .move.B. MICROCONTROLLER VERSUSArduino is an open-source electronics prototyping MICROPROCESSORSplatform based on flexible, easy-to-use hardwareMicrocontroller differs from a microprocessor in manyand software. Arduino can sense the environment ways. First and the most important is itsby receiving input from a variety of sensors andfunctionality. In order for a microprocessor to becan affect its surroundings by controlling lights,used, other components such as memory, ormotors, and other actuators. The microcontrollercomponents for receiving and sending data muston the board is programmed using the Arduinobe added to it. In sort that means thatprogramming language (based on Wiring) and themicroprocessor is the very heart of the computer.Arduino development environment (basedOn the other and , microcontroller is designed toon Processing). Arduino projects can be stand-be all of that in one. No other externalalone or they can communicate with software components are needed for its application becauserunning on a computer (e.g. Flash,all necessary peripherals are already built in to it.Processing, MaxMSP).Thus, we save the time and space needed toArduino is a small microcontroller board with a construct devices.USB plug to connect to your computer and anumber of connection sockets that can be wiredC. ATMEL ATMEGA168up to external electronics, such as motors, relays,MICROCONTROLLERlight sensors, laser diodes, loudspeakers,Overview:ATmega168 is widely used because itmicrophones, etc. They can either be poweredsupports wide range of system development toolsthrough the USB connection from the computer orsuch as C Compliers, Macro assemblers, Programfrom a 9V battery. They can be controlled fromDebugger/Simulators, In-circuit Emulators andthe computer or programmed by the computer andEvaluation Kits . Its features includes: 23 generalthen disconnected and allowed to workpurpose I/O lines, 32 general purpose workingindependently. Since the Arduino is an open-registers, three flexible timer/counters withsource hardware design,anyone is free to take thecompare/capture/PWM mode, a SPI serial port,designs and create their own clones of the16K bytes of in-system programmable Flash withArduino and sell them, so the market for theRead-while-Write capabilities. 512 bytes ofboards is competitive.EEPROM and 1K bytes SRAM. In Idle mode 4. CPU stops working while allowing the SRAM, channel 10-bit ADC, a programmable watchdogtimers/counters, USART, SPI port and interrupt timer with internal oscillator .system to continue functioning. It also has 6Description: The device is manufactured usingthrough an SPI serial interface, by a conventionalAtmels high-density non-volatile memory non-volatile memory programmer, or by an ontechnology.The on-chip ISP flash allows the chip boot program running the AVR core.program memory to be reprogrammed in-system Depending on the clock selection fuse settings, PB6 can be used as input to the inverting oscillator amplifier and input to the internal clock operating circuit Depending on the clock selection fuse settings, PB7 can be used as output from inverting oscillating amplifier PORT C (PC5:0) Port C is a 7-bit bi-directional I/O port with internal pull-up resistors. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated PC6/RESET If the RSTDISBL register is programmed, PC6 is used as I/O pin. Behavior of PC6 is different from other Port C pins. If RSTDISBL is not programmed, PC6 can be used as a Reset input. A low level on this pin for longer than the minimum pulse length will generate a reset even without the clock signal. Shorter pulses are not guaranteed to generate a Reset PORT D (PD7:0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins become tri-stated if the reset condition become active, even if the clock is running .PIN Description: AVCCAVCC is the supply pin for the A/DVCCConvertor, PC[5:0]. It should be externally Digital supply voltage. connected to VCC, even if the ADC is not used. IfGNDthe ADC is used it should be connected to VCC Ground voltage for the microcontrollerthrough low pass filterchip.AREF PORT B (PB7:0)AREF is an analog reference pin for thePort B is an 8-bit bi-directional I/O Port A/D convertor. XTAL1It is an input to thewith internal pull-up resistors. As Inputs, Port B inverting oscillator amplifier and the internalpins that are externally pulled low will sourceclock circuit [2]. XTAL2It is an output pin fromcurrent if the pull-up resistors are activated . the inverting oscillator amplifier. 5. Oscillator Characteristics: As shown in Figure , XTAL1 is input andXTAL2 is output of an inverting amplifier thatcan be configured for use as an on-chip oscillator.To use external oscillator as clock source, XTAL2should be left unconnected while XTAL1 isdriven.Quartz crystal or ceramic resonator can be used asoscillator.Block DiagramATmega168 CCP ModulesFigure below shows the block diagram of theEach CCP (Capture/Compare/PWM) moduleATMEL ATmega168 microcontroller. The AVR contains a 16-bit register which can be operate ascore has 32 general-purpose registers. All these 16-bit capture register, as a 16-bit compareregisters are directly connected to the Arithmetic register or as a 16-bit PWM master/slave dutyLogic Unit (ALU), allowing two independent cycle register. The CCP modules are identical inregisters to be accessed in 20 one singleoperation, with the exception of the operation ofinstruction executed in one clock cycle. The the special event trigger .Most registers and bitresulting architecture is code efficient. The device references for this IC are written in general form.is manufactured using Atmels high-density non-For example, a lower case n replaces thevolatile memory technology.Timer/Counter number, and a lower case x replaces the output compare unit channel. When these registers or bits are defined in a program, they are declared as TCNT2 for accessing Timer/Counter2 counter value and so on. Figure below shows a block diagram for the 16-bit Timer/Counter 6. Arduino can be used to develop interactiveobjects, taking inputs from a variety ofRegistersswitches or sensors, and controlling a TCCR1A Timer/Counter1 Control Register variety of lights, motors, and other Aphysical outputs.Arduino projects can be stand-alone, orthey can be communicate with softwarerunning on your computer (e.g. Flash,Processing, MaxMSP.) The Arduino programming language is animplementation of Wiring, a similarBit [7:6] COM1A1:0 Compare Output Mode forphysical computing platform, which isChannel A based on the Processing multimediaBit [5:4] - COM1B1:0 Compare Output Mode forprogramming environment.Cha