Modern and New and Easier Example of Locker With Arduino Matrix Keypad 4x4

Introduction: Modern and New and Easier Example of Locker With Arduino Matrix Keypad 4x4

About: Interest in PUNK/HARDCORE/METAL/HIGHLAND BAGPIPES

Another example of using a LCD keypad matrix 4x4 with an I2C circuit.

Step 1: The Schematic

This matrix keypad is made of 16 push buttons and with I2c communication, you just need 2 pins to manage it: SDA (A4 on arduino board) and SCL (A5 on arduino board).

I used a PCF8574A 16 DIP I/O I2c circuit the small schematic is given above. The address of this kind of components is 0x3C in my example (A0=0, A1=0, A2=1).

Step 2: The State Diagram: an Easier Method

This new method is based on timers which allow you to compose the good code (made of 4 characters: CODE1 then CODE2 then CODE3 then CODE4) on the keys in the right time.

The arduino sketch includes 4 special libraries:

  • SM.h
  • Wire.h
  • Keypad_I2C.h
  • Keypad.h

I give a pack of them and the sketch. If the typed code is good, the pin 13 light ON and you need to push the key ' * ' to initialize. If the code is wrong, the pin 13 flashes.

note: I can't download today the libraries due to an internal server error. Sorry.

PROBLEM SOLVED IF YOU USE .RAR

Step 3: Conclusion

The keys pushed must be detected on a rising edge, unless, it will not run properly.

All these components are very cheap and you will have a very catchy keyboard with few pins on the Arduino boards.

Thanx to all insteresting tutorial I found.

Happy instructable!

Be the First to Share

    Recommendations

    • Halloween Contest

      Halloween Contest
    • Retro Tech Challenge

      Retro Tech Challenge
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge

    2 Comments

    0
    manu4371
    manu4371

    Reply 1 year ago

    Thank you so much Gada888 for your " fidèle" support again despite it's a very small instructables but I'm happy to share it. Happy instructable!!