These tutorial  will guide you to make  a password access control using “Keypad Membrane” connected to a Relay Module, Were just temporarily used LED for the output just to check if it is working, instead using a mechanical solenoid door lock.

Here is the guide using a Relay module in Arduino

Electronic Required

  • Arduino UNO / MEGA / PRO
  • 2x LED (RED & GREEN)
  • 1x Relay Module
  • 1x Matrix Keypad Membrane

You can download the Keypad library here  | > Zip
You can download the Password library here | > Zip

The LED’s

LED Red Positive Connected to Arduino A0(Analog)
LED Red Negative Connected to Arduino Ground
LED Green Positive Connected to Arduino A1(Analog)
LED Green Negative Connected to Arduino Ground

The Relay Module

Relay VCC Connected to 5v
IN1 Connected to Arduino Digital Pin 2
IN2 Connected to Arduino Digital Pin 3
IN3 Connected to Arduino Digital Pin 4
IN4 Connected to Arduino Digital Pin 5
Ground Connected Arduino Ground

 The Matrix Keypad Membrane

Keypad Pin1 Connected to Digital Pin 6
Keypad Pin2 Connected to Digital Pin 7
Keypad Pin3 Connected to Digital Pin 8
Keypad Pin4 Connected to Digital Pin 9
Relay-With-Keyboard-Password-Access-Control

 

Using Password Access Control on Matrix Keypad with Optocoupler Relay
Facebooktwitterredditpinterestmail
Tagged on:         

JLCPCBPCBgogoPCBway4pcb

5 thoughts on “Using Password Access Control on Matrix Keypad with Optocoupler Relay

  • at
    Permalink

    Just a smiling visitor here to share the love (:, btw outstanding style and design.

    Reply
  • at
    Permalink

    I have tried to use the above code but i get errors

    ./opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -build-path /tmp/536009369/build -hardware opt/arduino-builder/hardware -hardware ./opt/cores -tools opt/arduino-builder/tools -tools ./opt/tools -built-in-libraries opt/libraries/latest -libraries /tmp/536009369/pinned -libraries /tmp/536009369/custom -fqbn arduino:avr:uno -build-cache /tmp -logger humantags -verbose=false /tmp/536009369/sketch_dec3a
    /tmp/536009369/sketch_dec3a/sketch_dec3a.ino:26:81: error: too many initializers for ‘char [3][4]’
    char keys[ROWS][COLS] = {{‘1′,’2′,’3’},{‘4′,’5′,’6’},{‘7′,’8′,’9’},{‘*’,’0′,’#’}};
    ^
    /tmp/536009369/sketch_dec3a/sketch_dec3a.ino:31:1: error: ‘Password’ does not name a type
    Password password = Password(“4008”);} // You can change the password here
    ^
    /tmp/536009369/sketch_dec3a/sketch_dec3a.ino:31:38: error: expected declaration before ‘}’ token
    Password password = Password(“4008”);} // You can change the password here
    ^
    exit status 1
    Any help would be great

    Reply
    • at
      Permalink

      Hi! Rich,,, Code has been updated. issue @ the variables/declarations>(unlockedled, lockedled, ledcurrentvar)

      Reply
  • at
    Permalink

    Hi.

    How do you add pushbutton to this setup. So you can open the door from inside.

    Reply
    • at
      Permalink

      Just add a push button as INPUT then attach to any available pin then create a function that calls the relay channel to release solenoid or magnetic lock. do forget to release or reset the password ones open from inside.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *