Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
A Magnetic Door Lock employing Arduino             Technology                 BY,        SRAVANTHI RANI SINHA S
A Magnetic Door Lock employing Arduino                   Technology• To sense the correctness of a secret code  using the ...
1. Arduino Introduction2. Variety and Shields and Sensors3. Applications4. Design and Development of Magnetic DOOR   lock
Arduino is a board   USB to Serial             Digital In/Out Pins USB Port                                               ...
Hardware FeaturesMicrocontroller                                       ATmega168/ATmega328Operating Voltage               ...
BLOCK DIAGRAM OF ATMEGA MICROCONTROLLER
ATMEGA168 MICROCONTROLLERIts features includes:• 23 general purpose I/O lines• 32 general purpose working registers• 3 fle...
2. Arduino Variety, Shields and Sensors
Arduino Variety
Arduino Shield  Add-on module to extend arduino’scapabilities. Also called Daughterboard                 or Cape
Shields
Communication ShieldsEthernet      WiFi      RFID                         GPSBluetooth      GPRS
SensorsIR Thermometer            Smoke Detector   PressurePolar Heart Rate Sensor        RTC         pH Sensor
3. Applications
Heart Rate Monitor Interface
Arduino Electric Blindshttp://bitly.com/zfZT3H                                      Gear Motor
Barcode scanner
Lego and Arduinohttp://bitly.com/wLBvY0     NXShield
Design and Development of             Magnetic Door lockCOMPONENTS AND EQUIPMENT• Arduino Diecimila or  Duemilanove board ...
The schematic diagram
The Bread Board Layout
The software for this project#include <Keypad.h>                                                void loop()#include <EEPRO...
void updateOutputs()                       void loadCode(){                                          {if (locked){        ...
Putting It All Together
Conclusion and future scope• A Magnetic Door Lock employing Arduino  technology is presented. we have  implemented a fail ...
References•   http://arduino.cc/•   ITP Physical Computing•   http://www.ladyada.net•   http://www.sparkfun.com•   http://...
Magnetic door lock using arduino
Magnetic door lock using arduino
Magnetic door lock using arduino
Upcoming SlideShare
Loading in …5
×

Magnetic door lock using arduino

19,062 views

Published on

Published in: Education
  • Be the first to comment

Magnetic door lock using arduino

  1. 1. A Magnetic Door Lock employing Arduino Technology BY, SRAVANTHI RANI SINHA S
  2. 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. 3. 1. Arduino Introduction2. Variety and Shields and Sensors3. Applications4. Design and Development of Magnetic DOOR lock
  4. 4. Arduino is a board USB to Serial Digital In/Out Pins USB Port Atmega328pPower Supply Power Pins Analog Input Pins
  5. 5. Hardware FeaturesMicrocontroller ATmega168/ATmega328Operating Voltage 5V Microcontroller ATmega168Input Voltage (recommended) Operating Voltage 5V 7-12VInput Voltage (limits) 7-12V Input Voltage (recommended) Input Voltage (limits) 6-20V 6-20VDigitalI/O Pins Digital I/O Pins 14 (of which 6 provide PWM(of which 6 provide PWM output) 14 output) Analog Input Pins 6Analog Input Pins DC Current per I/O Pin 40 mA 6DC 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 MemoryDC 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 KBFlash Speed Clock Memory 16 MHz (ATmega328) of which 2 KB used by bootloader 1 KB (ATmega168) or 2 KBSRAM (ATmega328) 512 bytes (ATmega168) or 1 KBEEPROM (ATmega328)Clock Speed 16 MHz
  6. 6. BLOCK DIAGRAM OF ATMEGA MICROCONTROLLER
  7. 7. ATMEGA168 MICROCONTROLLERIts 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 .
  8. 8. 2. Arduino Variety, Shields and Sensors
  9. 9. Arduino Variety
  10. 10. Arduino Shield Add-on module to extend arduino’scapabilities. Also called Daughterboard or Cape
  11. 11. Shields
  12. 12. Communication ShieldsEthernet WiFi RFID GPSBluetooth GPRS
  13. 13. SensorsIR Thermometer Smoke Detector PressurePolar Heart Rate Sensor RTC pH Sensor
  14. 14. 3. Applications
  15. 15. Heart Rate Monitor Interface
  16. 16. Arduino Electric Blindshttp://bitly.com/zfZT3H Gear Motor
  17. 17. Barcode scanner
  18. 18. Lego and Arduinohttp://bitly.com/wLBvY0 NXShield
  19. 19. Design and Development of Magnetic Door lockCOMPONENTS 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
  20. 20. The schematic diagram
  21. 21. The Bread Board Layout
  22. 22. The software for this project#include <Keypad.h> void loop()#include <EEPROM.h> {char* secretCode = "1234"; char key = keypad.getKey();int position = 0; if (key == * && ! Locked)boolean locked = true; {const byte rows = 4; // unlocked and * pressed so change codeconst byte cols = 3; position = 0;char keys[rows][cols] = getNewCode(); {{1,2,3},{4,5,6},{7,8,9},{*,0,#}}; updateOutputs();byte rowPins[rows] = {2, 7, 6, 4}; }byte colPins[cols] = {3, 1, 5}; if (key == #‘){Keypad keypad = Keypad(makeKeymap(keys), rowPins, locked = true; colPins, rows, cols); position = 0;int redPin = 9; updateOutputs(); }int greenPin = 8; if (key == secretCode[position]){position ++;}int solenoidPin = 10; if (position == 4)void setup() { {pinMode(redPin, OUTPUT); locked = false;pinMode(greenPin, OUTPUT); updateOutputs();loadCode(); }flash(); delay(100);updateOutputs(); } }
  23. 23. void updateOutputs() void loadCode(){ {if (locked){ if (EEPROM.read(0) == 1){digitalWrite(redPin, HIGH); secretCode[0] = EEPROM.read(1);digitalWrite(greenPin, LOW); secretCode[1] = EEPROM.read(2);digitalWrite(solenoidPin, HIGH);} secretCode[2] = EEPROM.read(3);else{ secretCode[3] = EEPROM.read(4);}digitalWrite(redPin, LOW); }digitalWrite(greenPin, HIGH); void saveCode()digitalWrite(solenoidPin, LOW);} {} EEPROM.write(1, secretCode[0]); EEPROM.write(2, secretCode[1]); void getNewCode(){ EEPROM.write(3, secretCode[2]);flash(); EEPROM.write(4, secretCode[3]);for (int i = 0; i < 4; i++ ) EEPROM.write(0, 1);{ }char key; void flash()key = keypad.getKey(); {while (key == 0){key = keypad.getKey();} digitalWrite(redPin, HIGH);flash(); digitalWrite(greenPin, HIGH);secretCode[i] = key; delay(500);} digitalWrite(redPin, LOW);saveCode();flash();flash(); digitalWrite(greenPin, LOW);} }
  24. 24. Putting It All Together
  25. 25. 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.
  26. 26. References• http://arduino.cc/• ITP Physical Computing• http://www.ladyada.net• http://www.sparkfun.com• http://www.openlabtaipei.org/ (Openlab Taipei)• http://seeedstudio.com• http://coopermaa2nd.blogspot.com Thank you, Sravanthi Rani Sinha s (09BD1A04A0)

×