Warning: Declaration of Db::query($query) should be compatible with mysqli::query($query, $resultmode = NULL) in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 29

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/u1300519/data/www/acoptex.com/_lib/CacheLite/Lite.php on line 757

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/u1300519/data/www/acoptex.com/_lib/CacheLite/Lite.php on line 757

Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 64

Warning: mysqli_fetch_array() expects parameter 2 to be int, string given in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 64

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/u1300519/data/www/acoptex.com/_lib/CacheLite/Lite.php on line 757

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/u1300519/data/www/acoptex.com/_lib/CacheLite/Lite.php on line 757

Warning: Cannot modify header information - headers already sent by (output started at /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php:0) in /var/www/u1300519/data/www/acoptex.com/_config/config.php on line 168

Warning: session_start(): Cannot start session when headers already sent in /var/www/u1300519/data/www/acoptex.com/_config/config.php on line 169

Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 92

Warning: mysqli_fetch_array() expects parameter 2 to be int, string given in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 92

Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 64

Warning: mysqli_fetch_array() expects parameter 2 to be int, string given in /var/www/u1300519/data/www/acoptex.com/_lib/class.Db.php on line 64
jobs.html_title
0

members

Difficult Basics: Project 022d 4x3 matrix membrane keypad, LEDs - security code

of Acoptex.com in UNO

Basics: Project 022d

Project name:  4x3 matrix membrane keypad, LEDs - security code

Attachments: sketch1, sketch2, sketch3 and libraries

In this project, you need these parts :

1.Aruduino Uno R3 (you can also use the other version of Arduino)

2. 4 x 3 matrix membrane keypad 1pc

3.Arduino IDE ( you can download it from here  )

4.Jumper cables

5.Breadboard 1 pc

6.LEDs 2 pcs (red and green colors)

7.Resistor 2 pcs (220 Ohm each)

General

We will learn how to connect  4 x 3 matrix membrane keypad, LEDs to Arduino board and upload the security code to it.

Understanding the 4x3 matrix membrane keypad

Keypads are used in all types of devices, including cell phones, fax machines, microwaves, ovens, door locks, etc. They're practically everywhere.

For this project, the type of keypad we will use is a 4 x 3 membrane matrix keypad. This is a keypad that follows an encoding scheme that allows it to have much less output pins than there are keys. For example, the matrix keypad we are using has 12 keys (0-9, *, #), yet only 7 output pins. With a linear keypad, there would have to be 17 output pins (one for each key and a ground pin) in order to work. The matrix encoding scheme allows for less output pins and thus much less connections that have to made for the keypad to work. In this way, they are more efficient than linear keypads, being that they have less wiring. 

Signals and contacts of 4x3 matrix membrane keypad

Signals and connections of LED

The operating voltage of the LED is 1.8V and the operating current is 10mA-20mA. The Arduino Uno board can supply 5V or 3.3V power. We will use 5V for this project, so the minimum resistance of the current limiting resistor should be (5 V to 1.8 V)/20 = 160 Om. The 220 Om offered in the kit is suitable and you can also choose other resistors that meet the condition. The larger the resistance is, the dimmer the LED will get.

Wiring

The following picture shows the needed connections with the Arduino Uno

Step by Step instruction

  1. Open Arduino IDE.
  2. Plug your Adruino Uno board into your PC and select the correct board and com port
    Open up serial monitor and set your baud to 9600 baud.
    Verify and upload the the sketch to your Adruino Uno.
    Plug your Adruino Uno board into your PC and select the correct board and com port
  3. Open up serial monitor and set your baud to 9600 baud.
  4. Verify and upload the the sketch to your Adruino Uno.
  5. Press any of the buttons on the keypad.
  6. This sketch takes input from a keypad for secret code.  If the code is entered correctly it turns on a green LED to simulate access granted and prints access granted in Serial Monitor. Otherwise the red LED is lit and access denied is printed in Serial Monitor.

Summary

We have learnt how to connect 4x3 matrix membrane keypad, LEDs to Arduino board and uploaded the security code to it.

Libraries:

  • See attachments on the begining of this project description
  • We have attached the Keypad library but you can also download and install it via the Arduino IDE library manager. If you wanna use our library then download, unzip it and add to libraries in your PC, for example C:\Users\toshiba\Documents\Arduino\libraries or C:\Program Files (x86)\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC.
  • Keypad library is available via the Arduino IDE library manager. Open Arduino IDE, then Sketch->Include Library->Manage Libraries... Then search for Keypad. Once found, click on its entry and the install button will appear. See more information about this library here.
  • EEPROM library is integrated inside Arduino IDE. We also attached it here.
  • Password library we attached too. Download, unzip it and add to libraries in your PC, for example C:\Users\toshiba\Documents\Arduino\libraries or C:\Program Files (x86)\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC.

Sketch:

  • See attachments on the begining of this project description.
  • There are 3 different sketches. Sketch1 /Andrew Mascolo idea/ has default password inserted in code which you can change to yours easily+you can use different password lenght.
  • Sketch2 /Saddam idea/ has default password programmed in code which you can change to yours easily by pressing # on keypad + you can modify code and use different password lenght.
  • Sketch3 max password lenght is 20. when you enter secret code press * to enter. it will check if code is wrong or good. Password you can modify on the begining of the code.


Other projects of Acoptex.com
Medium Basics: Project 083w Sipeed Maixduino board - Using PlatformIO IDE of Acoptex.com in Sipeed Maixduino 08-08-2019
Medium Basics: Project 083e Sipeed Maixduino board - Uploading MaixPy of Acoptex.com in Sipeed Maixduino 04-08-2019
Medium Basics: Project 083f Sipeed Maixduino board - Using MycroPython of Acoptex.com in Sipeed Maixduino 04-08-2019

jobs.published_at
jobs.viewed