{"id":81139,"date":"2024-05-28T23:50:44","date_gmt":"2024-05-29T03:50:44","guid":{"rendered":"https:\/\/www.engineersgarage.com\/?p=81139"},"modified":"2024-05-23T12:42:18","modified_gmt":"2024-05-23T16:42:18","slug":"otp-based-door-lock-system-arduino","status":"publish","type":"post","link":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/","title":{"rendered":"How to design an OTP-based door lock"},"content":{"rendered":"<p><span data-preserver-spaces=\"true\">Today, mobile-based authentication to verify a person&#8217;s identity is common. Online service providers often use it for access to services, approval of transactions, or to change a user&#8217;s credentials.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Imagine using a similar mobile-based authentication to enter your home, office, or any private space. It&#8217;s possible. In this project, we&#8217;ll design a mobile-based access system for access to a private room. This device controls the room&#8217;s door using a relay. The door only opens if the one-time password (OTP) sent via a registered mobile number is confirmed.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">This device is built using Arduino Mega. It uses an IR sensor and a SIM900 modem to send an SMS containing a random OTP. The user can enter the OTP through a keypad. The system also has an OLED screen attached that serves as the user interface and guides users in accessing the room.\u00a0<\/span><\/p>\n<p><strong>Components required<\/strong><\/p>\n<ol>\n<li>Arduino Mega 2560 x1<\/li>\n<li>SIM900 GSM modem x1<\/li>\n<li>IR sensors x1<\/li>\n<li>SSD1306 OLED x1<\/li>\n<li>Relay\/Electronic lock x1<\/li>\n<li>Connecting or Dupont wires<\/li>\n<\/ol>\n<p><strong>Circuit connections<br \/>\n<\/strong><span data-preserver-spaces=\"true\">To build this device<\/span><span data-preserver-spaces=\"true\">, the SIM900 modem, SSD1306 OLED, IR sensor, 4&#215;4 keypad, <\/span><span data-preserver-spaces=\"true\">and<\/span><span data-preserver-spaces=\"true\">\u00a0relay or electronic lock are interfaced with Arduino Mega \u2014 which offers enough GPIOs to work with all these components.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">To interface the SIM900<\/span><span data-preserver-spaces=\"true\">, the modem\u2019s GND, TX, and RX pins are connected to Arduino\u2019s ground, RX1, and TX1 pins. The keypad is connected to Arduino\u2019s GPIO 22, 24, 28, 30, 32, 34, and 36.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">The seven-pin SSD1306 OLED module is used and connected to the Arduino as follows.<\/span><\/p>\n<p><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-4.51.20\u202fPM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-81141\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-4.51.20\u202fPM-1024x322.png\" alt=\"\" width=\"740\" height=\"233\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-4.51.20\u202fPM-1024x322.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-4.51.20\u202fPM-300x94.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-4.51.20\u202fPM-768x241.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-4.51.20\u202fPM-1536x483.png 1536w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-4.51.20\u202fPM-368x116.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-4.51.20\u202fPM.png 1692w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><\/a><\/p>\n<p>The IR sensor is connected to Arduino&#8217;s GPIO 8. The relay or electronic lock is interfaced at Arduino&#8217;s GPIO 50. The device&#8217;s circuit connections are shown below.<\/p>\n<p><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-5.11.11\u202fPM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-81143\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-5.11.11\u202fPM-1024x729.png\" alt=\"\" width=\"703\" height=\"501\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-5.11.11\u202fPM-1024x729.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-5.11.11\u202fPM-300x213.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-5.11.11\u202fPM-768x546.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-5.11.11\u202fPM-334x238.png 334w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-22-at-5.11.11\u202fPM.png 1470w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/a><\/p>\n<p><strong>Arduino sketch<br \/>\n<\/strong>After making the circuit connections, upload the following sketch to Arduino Mega. Remember to replace the registered mobile number you want to receive the OTP in the sketch.<\/p>\n<style>\n.gist-data{    height:250px; \/\/ Any height    overflow: auto;<br \/>}<\/style>\n<p><script src=\"https:\/\/gist.github.com\/Ajak58a\/40a847b599430304b499a03d3441680b.js\"><\/script><\/p>\n<p><strong><span data-preserver-spaces=\"true\">How it works<br \/>\n<\/span><\/strong><span data-preserver-spaces=\"true\">When the device is plugged in after installation, it initializes the display screen and sends the AT commands to the SIM900 modem to check network strength. The message \u201cOTP-based Door Lock\u201d is displayed on the OLED screen.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">When a user is within the vicinity of the authenticated door, an OTP is generated, which is a random number between 1000 and 9999. The OTP is sent to the user\u2019s registered mobile number. The OLED\u2019s interface prompts the user to enter the OTP, which can be entered via the 4&#215;4 keypad on the device.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">If<\/span><span data-preserver-spaces=\"true\">\u00a0the passcode entered by the user is the same as the OTP\u00a0<\/span><span data-preserver-spaces=\"true\">that was<\/span><span data-preserver-spaces=\"true\">\u00a0sent to the registered mobile number<\/span><span data-preserver-spaces=\"true\">, access is granted<\/span><span data-preserver-spaces=\"true\">.<\/span><span data-preserver-spaces=\"true\"> The relay\/electronic lock unlocks the door and keeps it open for ten seconds. Once the relay\/electronic lock is operated, the door is locked again.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">If<\/span><span data-preserver-spaces=\"true\">\u00a0the passcode entered by the user does not match the OTP sent to the registered mobile number<\/span><span data-preserver-spaces=\"true\">, access is denied<\/span><span data-preserver-spaces=\"true\">.<\/span><span data-preserver-spaces=\"true\">\u00a0The microcontroller does not trigger the relay\/electronic lock, and the door remains shut.\u00a0<\/span><\/p>\n<p><strong><span data-preserver-spaces=\"true\">The code<br \/>\n<\/span><\/strong><span data-preserver-spaces=\"true\">The code begins by importing the\u00a0<\/span><span data-preserver-spaces=\"true\">Keypad<\/span><span data-preserver-spaces=\"true\">.h, SPI.h, Wire.h, Adafruit_GFX.h, and Adafruit_SSD1306.h libraries.\u00a0<\/span><span data-preserver-spaces=\"true\">The Keypad<\/span><span data-preserver-spaces=\"true\">.h<\/span><span data-preserver-spaces=\"true\">\u00a0library handles input from the 4&#215;4 membrane keypad. The SPI.h, Wire.h, Adafruit_GFX.h, and Adafruit_SSD1306.h libraries work with the SSD1306 OLED.\u00a0<\/span><span data-preserver-spaces=\"true\">This<\/span><span data-preserver-spaces=\"true\">\u00a0is followed by a declaration of variables for the OLED module\u2019s pin connections and the related constants.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">An object of the Adafruit_SSD1306 class is instantiated to operate the OLED display. The variables for the pin connections and\u00a0<\/span><span data-preserver-spaces=\"true\">key<\/span><span data-preserver-spaces=\"true\">\u00a0values of the\u00a0<\/span><span data-preserver-spaces=\"true\">keypad<\/span><span data-preserver-spaces=\"true\">\u00a0are defined. An object of the Keypad class is instantiated. The variables\u00a0<\/span><span data-preserver-spaces=\"true\">defining<\/span><span data-preserver-spaces=\"true\">\u00a0the pin connections for the relay and IR sensor are declared. The variables to hold the OTP are also declared.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">The user-defined function sendATCommand()\u00a0<\/span><span data-preserver-spaces=\"true\">is used to send<\/span><span data-preserver-spaces=\"true\">\u00a0the AT commands to the SIM900 modem, connected to Arduino\u2019s UART1 port. The user-defined function printText()\u00a0<\/span><span data-preserver-spaces=\"true\">is defined to print<\/span><span data-preserver-spaces=\"true\">\u00a0text on the OLED screen.\u00a0<\/span><span data-preserver-spaces=\"true\">The user-defined function SendSMS()\u00a0<\/span><span data-preserver-spaces=\"true\">is defined\u00a0<\/span><span data-preserver-spaces=\"true\">to<\/span><span data-preserver-spaces=\"true\">\u00a0<\/span><span data-preserver-spaces=\"true\">send<\/span><span data-preserver-spaces=\"true\">\u00a0the generated OTP to the user\u2019s registered mobile number.<\/span><span data-preserver-spaces=\"true\">\u00a0<\/span><span data-preserver-spaces=\"true\">The user-defined function getOTP() is defined\u00a0<\/span><span data-preserver-spaces=\"true\">to<\/span><span data-preserver-spaces=\"true\">\u00a0<\/span><span data-preserver-spaces=\"true\">parse<\/span><span data-preserver-spaces=\"true\">\u00a0the keypad input and\u00a0<\/span><span data-preserver-spaces=\"true\">match<\/span><span data-preserver-spaces=\"true\">\u00a0the passcode of the OTP, which was sent to the registered mobile number.<\/span><span data-preserver-spaces=\"true\">\u00a0<\/span><\/p>\n<p>In the setup() function, the baud rate for the serial debug is set to 9600 bps. The display is initialized. The pin connecting the IR sensor is set as the input and the pin connecting relay\/electronic lock is set as the output. The baud rate for serial communication with the SIM900 modem is set to 9600 bps. The AT commands are sent to check the network\u2019s strength.<\/p>\n<p>In the loop() function, the text \u201cOTP-based Door Lock\u201d is printed on the OLED screen. If the IR sensor detects the user at the door, the controller generates a four-digit OTP, which is a random number between 1000 and 9999. The display screen indicates that an OTP for granting access has been sent to the registered mobile number. The OTP is sent by calling the SendSMS() function. The OLED screen is updated, prompting the user to enter the passcode sent to their registered mobile number. The OTP is verified by calling the getOTP() function. Access is granted if the user-entered passcode matches the OTP.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/drive.google.com\/file\/d\/1o5m1JWs0YSBP3AgPI6xdmqpMG4qUUiXe\/preview\" width=\"640\" height=\"480\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, mobile-based authentication to verify a person&#8217;s identity is common. Online service providers often use it for access to services, approval of transactions, or to change a user&#8217;s credentials.\u00a0 Imagine using a similar mobile-based authentication to enter your home, office, or any private space. It&#8217;s possible. In this project, we&#8217;ll design a mobile-based access system&hellip;<\/p>\n","protected":false},"author":387,"featured_media":81144,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[32,13,1871],"tags":[3294,1175,4391,4470,4339,4460,1403,1449],"class_list":{"2":"type-post","18":"entry","19":"has-post-thumbnail"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.2 (Yoast SEO v25.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to design an OTP-based door lock<\/title>\n<meta name=\"description\" content=\"How to build an OTP-based door lock system.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to design an OTP-based door lock\" \/>\n<meta property=\"og:description\" content=\"How to build an OTP-based door lock system.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/\" \/>\n<meta property=\"og:site_name\" content=\"Engineers Garage\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/engineersgarage\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"499\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nikhil Agnihotri\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EngineersGarage\" \/>\n<meta name=\"twitter:site\" content=\"@EngineersGarage\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nikhil Agnihotri\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/\"},\"author\":{\"name\":\"Nikhil Agnihotri\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/3c71105e3b40a1fd12c79c15602914b6\"},\"headline\":\"How to design an OTP-based door lock\",\"datePublished\":\"2024-05-29T03:50:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/\"},\"wordCount\":870,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png\",\"keywords\":[\"amoled\",\"Arduino\",\"arduinomega\",\"electroniclock\",\"electronicproject\",\"irsensor\",\"mobile\",\"OTP\"],\"articleSection\":[\"Arduino Projects\",\"Electronic Projects\",\"Video\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/\",\"url\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/\",\"name\":\"How to design an OTP-based door lock\",\"isPartOf\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png\",\"datePublished\":\"2024-05-29T03:50:44+00:00\",\"description\":\"How to build an OTP-based door lock system.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#primaryimage\",\"url\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png\",\"contentUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png\",\"width\":800,\"height\":499},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.engineersgarage.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to design an OTP-based door lock\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.engineersgarage.com\/#website\",\"url\":\"https:\/\/www.engineersgarage.com\/\",\"name\":\"Engineers Garage\",\"description\":\"Electronic Projects, Electrical Engineering Resources, Makers Articles and Product News\",\"publisher\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.engineersgarage.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\",\"name\":\"Engineer's Garage - WTWH Media\",\"url\":\"https:\/\/www.engineersgarage.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png\",\"contentUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png\",\"width\":372,\"height\":52,\"caption\":\"Engineer's Garage - WTWH Media\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/engineersgarage\",\"https:\/\/x.com\/EngineersGarage\",\"https:\/\/www.youtube.com\/channel\/UC0VITh11JSYk-UW7toLebUw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/3c71105e3b40a1fd12c79c15602914b6\",\"name\":\"Nikhil Agnihotri\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d26b31563fa36169891c8c7d312e9b33de8a0e3da1340ec14ef2de84d5c43497?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d26b31563fa36169891c8c7d312e9b33de8a0e3da1340ec14ef2de84d5c43497?s=96&r=g\",\"caption\":\"Nikhil Agnihotri\"},\"url\":\"https:\/\/www.engineersgarage.com\/author\/nikhil-agnihotri\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to design an OTP-based door lock","description":"How to build an OTP-based door lock system.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/","og_locale":"en_US","og_type":"article","og_title":"How to design an OTP-based door lock","og_description":"How to build an OTP-based door lock system.","og_url":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/","og_site_name":"Engineers Garage","article_publisher":"https:\/\/www.facebook.com\/engineersgarage","og_image":[{"width":800,"height":499,"url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png","type":"image\/png"}],"author":"Nikhil Agnihotri","twitter_card":"summary_large_image","twitter_creator":"@EngineersGarage","twitter_site":"@EngineersGarage","twitter_misc":{"Written by":"Nikhil Agnihotri","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#article","isPartOf":{"@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/"},"author":{"name":"Nikhil Agnihotri","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/3c71105e3b40a1fd12c79c15602914b6"},"headline":"How to design an OTP-based door lock","datePublished":"2024-05-29T03:50:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/"},"wordCount":870,"commentCount":0,"publisher":{"@id":"https:\/\/www.engineersgarage.com\/#organization"},"image":{"@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#primaryimage"},"thumbnailUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png","keywords":["amoled","Arduino","arduinomega","electroniclock","electronicproject","irsensor","mobile","OTP"],"articleSection":["Arduino Projects","Electronic Projects","Video"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/","url":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/","name":"How to design an OTP-based door lock","isPartOf":{"@id":"https:\/\/www.engineersgarage.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#primaryimage"},"image":{"@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#primaryimage"},"thumbnailUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png","datePublished":"2024-05-29T03:50:44+00:00","description":"How to build an OTP-based door lock system.","breadcrumb":{"@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#primaryimage","url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png","contentUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator.png","width":800,"height":499},{"@type":"BreadcrumbList","@id":"https:\/\/www.engineersgarage.com\/otp-based-door-lock-system-arduino\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.engineersgarage.com\/"},{"@type":"ListItem","position":2,"name":"How to design an OTP-based door lock"}]},{"@type":"WebSite","@id":"https:\/\/www.engineersgarage.com\/#website","url":"https:\/\/www.engineersgarage.com\/","name":"Engineers Garage","description":"Electronic Projects, Electrical Engineering Resources, Makers Articles and Product News","publisher":{"@id":"https:\/\/www.engineersgarage.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.engineersgarage.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.engineersgarage.com\/#organization","name":"Engineer's Garage - WTWH Media","url":"https:\/\/www.engineersgarage.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png","contentUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png","width":372,"height":52,"caption":"Engineer's Garage - WTWH Media"},"image":{"@id":"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/engineersgarage","https:\/\/x.com\/EngineersGarage","https:\/\/www.youtube.com\/channel\/UC0VITh11JSYk-UW7toLebUw"]},{"@type":"Person","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/3c71105e3b40a1fd12c79c15602914b6","name":"Nikhil Agnihotri","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d26b31563fa36169891c8c7d312e9b33de8a0e3da1340ec14ef2de84d5c43497?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d26b31563fa36169891c8c7d312e9b33de8a0e3da1340ec14ef2de84d5c43497?s=96&r=g","caption":"Nikhil Agnihotri"},"url":"https:\/\/www.engineersgarage.com\/author\/nikhil-agnihotri\/"}]}},"featured_image_src":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator-600x400.png","featured_image_src_square":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2024\/05\/Door-lock-rotator-600x499.png","author_info":{"display_name":"Nikhil Agnihotri","author_link":"https:\/\/www.engineersgarage.com\/author\/nikhil-agnihotri\/"},"_links":{"self":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts\/81139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/users\/387"}],"replies":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/comments?post=81139"}],"version-history":[{"count":0,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts\/81139\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/media\/81144"}],"wp:attachment":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/media?parent=81139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/categories?post=81139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/tags?post=81139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}