The 4x4 Keypad is a general purpose 16 button (4x4) matrix keypad. It comes ready to work, simply peel-off the adhesive backing, stick it to your surface and plug it in.
- Maximum Rating: 24 VDC, 30 mA
- Interface: 8-pin access to 4x4 matrix
- Operating temperature: 32 to 122 °F(0 to 50°C)
- Dimensions:Keypad, 2.7 x 3.0 in (6.9 x 7.6 cm),Cable: 0.78 x 3.5 in (2.0 x 8.8 cm)
HARDWARE REQUIRED
- Arduino UNO with USB cable - 1
- 4x4 Matrix keypad – 1
- Jumper Wires Male to Male - 40 pieces
- Jumper wires MALE TO FEMALE – 40 piece
- breadboard 840 points - 1
- LCD 16*2 display – 1
- Potentiometer 10k – 1
- LED-3
- Resistor 220 ohm – 3
SOFTWARE REQUIRED
Arduino IDE ( programmable software for Arduino boards )
You can download the software from this link: https://www.arduino.cc/en/Main/Software
LIBRARY REQUIRED
You need to install these libraries:
- Liquid Crystal library
- Keypad library
This library is available via the Arduino IDE Library Manager, if you are using a Modern IDE, you can simply use the menu.
Sketch->Include Library->Manage Libraries
Then search for LiquidCrystal and Keypad.
Once found, click on its entry and the install button will appear
IDE (1.6.2 or above), you can simply use the menu: This library is available via the Arduino IDE library manager. If you are using a modern
You can download this library form this link:
LINK: http://goo.gl/PUiBBA (keypad source code and library)or
LINK: http://playground.arduino.cc/Code/Keypad(KEYPAD))
CIRCUIT DESCRIPTION
Keypad Membrane Connection
Using the diagram above as a reference the leftmost pin is pin 8 on the keypad and the rightmost is pin 1.
LCD 16x02 Connection:
The Arduino's +5V and GND will be connected to the pin of the breadboard
The LCD has 16 pins
- The first one from left to right is the Ground (GND) pin
- The second pin is the VCC which we connect the +5V pin on the breadboard.
- Next is the Vo pin on which we can attach a potentiometer for the contrast of the display
- The K (cathode) pin will be connected to the GND pin of the breadboard. The A (anode) pin will be connected to the +5V pin of the breadboard.
- The potentiometer's other pins will be connected to the +5V and GND pin of the breadboard.
Keypad 4x4 and LED Connections:
- The keypad has 8 pins, 4 of them are for the rows and other 4 pins for the columns.
- The keypad I'm using is 4x4. It has an additional connection input.
- The Keypad's pins will be connected respectively to the Digital 1-2-3-4-5-6-7-8 pin of the Arduino.
- The Red and Green LED will be attached on the breadboard
- The 220-ohm resistor will be connected to the anode leg of the LED
- Both LED’s cathode leg will be connected to the GND of the breadboard.
The Red LED’s Anode with resistor leg will be connected to the Digital 10 and green Led’s Anode with Resistor leg will be connected to digital 11 pins of the Arduino.
Note: You can connect VCC and GND on either first or third terminal of Potentiometer. It is variable resistor which has no polarity. By default, GND Pin has 0Ω Value and VCC Pin has 10KΩ Value.
CODE
CLICK TO DOWNLOAD THE LINK: https://drive.google.com/open?id=0BxpdhMRymue7V21BOHMxeER0LWM
OUTPUT
Output 1:
In the first output, you will see the Welcome text where you can enter the password.
Output 2:
If the password entered is correct then the output will show “Verified”
Output 3: