Fostering Friendships - Enhancing Social Bonds in the Classroom
Magnetic door lock using arduino
1. A Magnetic Door Lock employing Arduino
Technology
BY,
SRAVANTHI RANI SINHA S
2. A Magnetic Door Lock employing Arduino
Technology
• To sense the correctness of a secret code
using the Arduino technology.
• When the correct code is entered through
keypad, it lights a green LED in addition to
operating a small solenoid.
3. 1. Arduino Introduction
2. Variety and Shields and Sensors
3. Applications
4. Design and Development of Magnetic DOOR
lock
4. Arduino is a board
USB to Serial Digital In/Out Pins
USB Port
Atmega328p
Power Supply
Power Pins Analog Input Pins
5. Hardware Features
Microcontroller ATmega168/ATmega328
Operating Voltage 5V
Microcontroller ATmega168
Input Voltage (recommended)
Operating Voltage 5V 7-12V
Input Voltage (limits) 7-12V
Input Voltage (recommended)
Input Voltage (limits) 6-20V
6-20V
DigitalI/O Pins
Digital I/O Pins 14 (of which 6 provide PWM(of which 6 provide PWM output)
14 output)
Analog Input Pins 6
Analog Input Pins
DC Current per I/O Pin 40 mA 6
DC Current per Pin Pin 50 mA
DC Current for 3.3V
I/O 40 mA
16 KB (ATmega168) or 32 KB (ATmega328) of which 2 KB used by
Flash Memory
DC Current for 3.3V Pin bootloader 50 mA
SRAM 1 KB (ATmega168) or 2 KB (ATmega328)
EEPROM 512 bytes (ATmega168) or 116 (ATmega328)
KB KB (ATmega168) or 32 KB
Flash Speed
Clock Memory 16 MHz (ATmega328) of which 2 KB used by
bootloader
1 KB (ATmega168) or 2 KB
SRAM
(ATmega328)
512 bytes (ATmega168) or 1 KB
EEPROM
(ATmega328)
Clock Speed 16 MHz
7. ATMEGA168 MICROCONTROLLER
Its features includes:
• 23 general purpose I/O lines
• 32 general purpose working registers
• 3 flexible timer/counters with compare/capture/PWM mode, a SPI
serial port
• 16K bytes of in-system programmable Flash with Read-while-Write
capabilities.
• 512 bytes of EEPROM and 1K bytes SRAM.
• In Idle mode CPU stops working while allowing the SRAM,
timers/counters, USART, SPI port and interrupt system to continue
functioning.
• It also has 6 channel 10-bit ADC, a programmable watchdog timer
with internal oscillator .
22. Design and Development of
Magnetic Door lock
COMPONENTS AND EQUIPMENT
• Arduino Diecimila or
Duemilanove board or clone
• D1 Red 5-mm LED
• D2 Green 5-mm LED
• R1-3 270 resistor
• K1 4 x 3 keypad
• 0.1-inch header strip
• T1 BC548
• 5V solenoid (< 100 mA)
• D3 1N4004
28. Conclusion and future scope
• A Magnetic Door Lock employing Arduino
technology is presented. we have
implemented a fail safe maglock ,fail secure
maglock also can be implemented.
• Instead of keypad Reader using the variety of
sensors and shields various combinations of
Magnetic Door Lock can be produced and
installed according to the requirements of any
Industry.
The main aim of the work undertaken in this paper is to sense the correctness of a secret code using the Arduino technology. When the correct code is entered through keypad, it lights a green LED in addition to operating a small solenoid which when powered, will strongly attract the metal slug in its center, pulling it into place, when the power is removed, it is free to move.
ATmega168 is widely used because it supports wide range of system development tools such as C Compliers, Macro assemblers, Program Debugger/Simulators, In-circuit Emulators and Evaluation Kits . Its features includes: 23 general purpose I/O lines, 32 general purpose working registers, three flexible timer/counters with compare/capture/PWM mode, a SPI serial port, 16K bytes of in-system programmable Flash with Read-while-Write capabilities. 512 bytes of EEPROM and 1K bytes SRAM. In Idle mode CPU stops working while allowing the SRAM, timers/counters, USART, SPI port and interrupt system to continue functioning. It also has 6 channel 10-bit ADC, a programmable watchdog timer with internal oscillator .
VCCDigital supply voltage.GNDGround voltage for the microcontroller chip.PORT B (PB7:0) Port B is an 8-bit bi-directional I/O Port with internal pull-up resistors. As Inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated.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 .AVCC AVCC is the supply pin for the A/D Convertor, PC[5:0]. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used it should be connectedto VCC through low pass filter AREFAREF is an analog reference pin for the A/D convertor.XTAL1 It is an input to the inverting oscillator amplifier and the internal clock circuit.XTAL2It is an output pin from the inverting oscillator amplifier.
The Arduino Duemilanove ("2009") is a microcontroller board based on the ATmega168 or ATmega328. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.