Hello world! Today i made a simple code to control a electric strike lock with a Password/ Access Code using a 1 channel relay. I don't have such a lock but i demonstrated it with a lamp attached to the relay. Check the next step for the schematic code & Parts list.

(I know! I wrote access wrong in the video..don't mind the typo..lol.)

Step 1: Schematic, Code & Parts List

You need these following librarys

  • password.h
  • LiquidCrystal_I2C.h
  • Keypad.h

Wire it up like the schematic and it should work after uploading,

if your not seeing anything, try change your I2C Address i will include a Code to scan your address.

You can change this at the line shown below which you can find on line 14 of the code.

  • #define I2C_ADDR 0x27

Most common I2C addresses.

  • PCF8574 = 0x20,
  • PCF8574A = 0x38,
  • PCF8574AT = 0x3F
  • PCF8574T = 0x27

Parts list:

  1. Arduino uno, I used the RobotDyn Uno.
  2. 1 Channel Relay KY-019
  3. Keypad 4x4
  4. LCD 1602 with I2C
  5. Electrical Strike Lock (Not needed to test the code, you will see if relay go's on or off.)

Good luck!

<p>Very good. I found that the <strong>LiquidCrystal_I2C.h </strong>library was causing issues with the functions contained within it. I was able to rectify this by installing the <strong>NewliquidCrystal_1.3.4</strong> library which can be found here: <a href="https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads" rel="nofollow">https://bitbucket.org/fmalpartida/new-liquidcrysta...</a></p><p>. After that the project worked perfectly. Thanks for the Instructable. </p>
<p>This is cool! I made a much simpler version of this with a 6 character combo with 4 numbers. When I want to take it to the next level, I am going to use this Instructable!</p>
<p>Thanks! it's handy stuff.</p>
<p>Follow me for more!</p>

About This Instructable




Bio: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the ... More »
More by vandenbrande:Arduino - LCD 20x4 Water LEVEL MONITOR HC SR04 Arduino - NRF24L01 2.4Ghz Wireless Relay Switch RGB led STRIP control Arduino Android BLUETOOTH - SMD5050  
Add instructable to: