Using Keypads with Arduino - Build an Electronic Lock

  Переглядів 217,044

DroneBot Workshop

DroneBot Workshop

День тому

Today we are going to work with Matrix Keypads, easy-to-use interfaces for your Arduino designs. We’ll also build an electronic combination lock.
Article with code: dronebotworkshop.com/keypads-...
More articles and tutorials: dronebotworkshop.com
Join the conversation on the forum: forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe/
I’m sure you’ve seen lots of devices that use keypads, they are a common user interface for many types of electronic equipment that require user input.
Membrane matrix keypads are very inexpensive and, as it turns out, they are also very easy to use with an Arduino. This makes them an ideal input device for your next project.
Today I’ll show you how these devices work and how simple it is to use them. We’ll start with the basics and finish by constructing an electronic combination lock.
Here is what will be covered in this video:
00:00 - Introduction
02:12 - How Keypads work
06:18 - Basic Keypad test
12:37 - Keypad with LCD
18:39 - Electronic Lock
As always, you’ll find an article that has more details and all of the code used in this video on the DroneBot Workshop website.
Hope you enjoy the video!

КОМЕНТАРІ: 238
@Webendowed
@Webendowed 4 роки тому
I'm fairly new to the electronic hobby. I bought my UNO R3 kit and a 37 piece sensor kit as a Christmas present to myself, so I'm only around 5-6 months into this journey but you have taught me so much. I just wanted to drop you a comment and say thank you for making quality and informative videos. :)
@colindgrant
@colindgrant 4 роки тому
Exact same story here, this channel really gave me a boost!
@peterpade6293
@peterpade6293 2 роки тому
I’m a retired mechanical engineer from Sydney, Australia. Just recently started dabbling into electronics and found your guidance extremely helpful. Thanks for your very helpful projects.
@mattikaki
@mattikaki 4 місяці тому
I have been doing electronics from 1966 as a ham operator and from 1969 as electronic maintenance engineer. Now I am retired and have been ignoring Arduino until now when I need a matrix keyboard electronics. Thank you for very clear tutorial.
@Coolarj10
@Coolarj10 3 роки тому
You are amazing - your videos are SO good!! Each and every one of them is pleasant to watch/listen to, clear, detailed, and very step-by-step with no missed steps in between! Thank you!!
@tubeDude48
@tubeDude48 4 роки тому
As always, *GREAT* *JOB Bill* !! For those that don't know, you might have explained the 2 jumpers on the I2C module and the one on the Relay.
@FoxAndHenForge
@FoxAndHenForge 3 роки тому
Thank you! I was having issues with entering multiple digits in a row but you answered all my questions there!
@abenwinUT
@abenwinUT 2 роки тому
For us noobies.... this is a very informational video. Thanks for the time taken to produce this video. Learned a lot already. Just wanted to share something that was a mystery to me until I found it on Amazon. And that is the LCD address. Default Address: 0x27 for PCF8574T chip; 0x3F for PCF8574AT chip;. Mine has the PCF8574T chip, hence 0x27. No wonder it didn't work when I had 0x3f. Thanks again for all who share their experience with us 'noobies'.
@hc8714
@hc8714 2 роки тому
this is the best one out there. He explains how library ref works and why he chose to wrote the code in such a way. The others just make a 3-5 min video and then spent half of it showing now to solder.
@chetanreddy8875
@chetanreddy8875 3 роки тому
I watch whole ads without skipping only for his effort! Its easily understandable even by beginners.
@NewAgeDIY
@NewAgeDIY 4 роки тому
Great weekend lockdown project. Simple and practical. I designed a 3D case that when finished it will house the display and keyboard that will access my backup locking system on my work shed. It’s a very easy to follow instructions for beginners or intermediate makers that will showcase how a few bits and pieces can produce a working device. I highly recommend this project.
@KommaAchtKommaEins
@KommaAchtKommaEins 3 роки тому
Thanks a bunch. Best information on how the joints work on a matrix keypad. In fact I've been inspired to take some small buttons and create my own 4x3 keypad on a PCB working as a radio transmitter controlling several other Arduinos using an nRF2701 module.
@MrWATCHthisWAY
@MrWATCHthisWAY 4 роки тому
Love your channel, your work shop, each lessons and the fact that you teach everyone who knows little to absolutely nothing about electronics & electricity. Your explanations and real world applications make your lessons even more useful and enjoyable to your audience. I too use the female to male Ribbon Cables to make connections in the same fashion as you do, but I’ve found that cheap ones have minimal contact on their respective sides and have caused more problems and made bad connection when using them. I only purchase quality ribbon cables from now on because of these problems created. You mentioned that we could use any pin for signaling the Solenoid controller and you chose pin 13. I’m guessing any pin that is still non-designated unless we rewrote the software code to allow for double usage! I’m fairly new to code writing as you can read from my question. Have a long history with electronics & electricity but interfacing the coding is still a challenge for me. But with your tutorial I’m moving at a faster pace now and for this I thank you for all that you make available to us. Great job and I’m constantly going back over and rewatching all your tutorials. If only my workbench and area look like yours? To have power coming from a outlet on the back face of your workbench. Now that would be something, and maybe you could show us how you developed your workstation? It truly is something to be proud of!!! Love you work and never miss any or your video’s because there is always something new to learn even though I’ve been at this for awhile!!!
@robertb2350
@robertb2350 3 роки тому
Kudos to this channel for finally ditching the two camera setup during the show. Now the show can get it's 5 star rating it deserves.
@kirkyd123
@kirkyd123 Рік тому
Thanks so much for the excellent videos you produce! Just enough information, but not too much. Awesome job!
@Richardj410
@Richardj410 4 роки тому
Thanks, I look forward to your videos. Every time I learn something new.
@electronic7979
@electronic7979 4 роки тому
It was a useful and educational video. I watched every second with pleasure.
@stevetobias4890
@stevetobias4890 4 роки тому
Yet another great video. Thank you for sharing your expertise to newbies like me.
@ramakrishnatadepalli107
@ramakrishnatadepalli107 2 роки тому
I am a 12 year child and I was very interested in electronics I got my first arduino it was very important for me to understand as I had no idea this channel is so helpful that I understand it so easily thanks
@bluegizmo1983
@bluegizmo1983 4 роки тому
Years ago, I had a car with a broken ignition key lock, so it could be started with any key. Rather that replace the ignition key lock I installed a hidden matrix keypad that acted as a starter bypass system so the car couldn't be started unless you entered the code on the hidden keypad first. Yes, it would've been easier to just replace the ignition key, but it was way cooler to have a hidden keypad to start the car lol
@cessposter
@cessposter 3 роки тому
discount james bond
@chivainmanfoumbi9026
@chivainmanfoumbi9026 2 роки тому
GREAT idea !!!!
@HeWhoIsWhoHeIs
@HeWhoIsWhoHeIs 2 роки тому
Doing the same thing with my garage door. Building a weather proof box for keypad and display. It's super cool.
@monkeymanstones1
@monkeymanstones1 4 роки тому
Adsense owes you for 2 commercials I watched before the video started. Thanks for making this video. I can now use my large number of these 16 button pads I recieved with my many Gizmosphere Gizmo 2's. What I'd love is a video showing how to use the pad, 4 or so air quality sensors and a (I think it's a DHT11) Temp & Humidity sensors to be able to have the display switch between the sensors based on the button I press on these keypads. Thanks again for this video!
@tpobrienjr
@tpobrienjr 4 роки тому
As always, you have explained well. Thank you.
@muhammadbilal2000
@muhammadbilal2000 3 роки тому
Thank you so very much for the amazing video with a simple explanation.
@stevegoforit.9912
@stevegoforit.9912 4 роки тому
I have seen many of your videos and enjoy them very much. Being new to this hobby I remember watching a video of yours explaining how resistance can determine what key was pressed. It seems you could do the same with this keypad . this post was inspired by one of your previous videos and I very much like them all thank you.
@Thebasicmaker
@Thebasicmaker 2 роки тому
I'm going to use this setup with the rotating Lidar that you introduced in a past video!
@damofx
@damofx 4 роки тому
Stay safe too man, you're doing a fantastic job!
@jamesgoacher1606
@jamesgoacher1606 4 роки тому
I will find this useful thank you. The obvious difference would be to print out a row of asterixs instead of the key press but I will think about that.
@tedsykora1858
@tedsykora1858 4 роки тому
Very nice video. I will keep this in the back of my head as something I may use in the future.
@attilaszep3316
@attilaszep3316 3 роки тому
Thank you very much for your project. Completely clear.
@bobtail1200
@bobtail1200 2 роки тому
Im so appreciative of you making these vids. Im leaning
@G_aaron
@G_aaron 8 місяців тому
Wonderful presentation thanks
@robertrobert5583
@robertrobert5583 2 роки тому
Thanks for the tutorial which I found very helpful. Having been puzzled by seeing the "!strcmp()" command, I looked it up and realised that it is "!strcmp" that returns a TRUE if the strings are the same not "strcmp", which surprised me but then the code made sense.
@practicemakesbetter7132
@practicemakesbetter7132 4 роки тому
A very nice and thorough video as usual!
@fury4076
@fury4076 4 роки тому
How people gives thumbs down? As long as people give effort you should appreciate it, especially for this kind of project. Look how he present and Explained it well ⚡ Be kind, spread love
@gregclare
@gregclare 4 роки тому
ADRIAN ALOLOD Totally agree. The problem is that there are people out there who have nothing better to do than give instant thumbs-down. I think mostly they are just sad soles who perhaps are jealous of the great work productive UKpostsrs do. Knowing this, you should always just consider the *ratio* of thumbs-up to thumbs-down. ie. Not just notice that a few sad soles have hit thumbs-down. Another good reason to always thumbs-up a video you liked, or even just considered was a pretty good effort. :)
@fury4076
@fury4076 4 роки тому
@@gregclare For me, He deserved a lot of subscribers more than to the youtuber who always have a freaking loud music on their video.
@TheJimtanker
@TheJimtanker 4 роки тому
I was just thinking the exact same thing. This is a great tutorial. I've been thinking about doing something like this but with an RFID added in to determine users.
@TimEckel
@TimEckel 4 роки тому
@@TheJimtanker But I believe this is the incorrect way to interface with these keyboards as it requires too many pins. A better tutorial would be using a resistor array so you only need a couple pins.
@TheJimtanker
@TheJimtanker 4 роки тому
@@TimEckel Do you know where there's a tutorial on that?
@riggz7683
@riggz7683 3 роки тому
Thank you. Amazing tutorial
@Headmastar
@Headmastar 2 роки тому
Thanks for generous delivery of info. EAZY.
@leiflindqvist9095
@leiflindqvist9095 3 роки тому
Excellent tutorial, thanks!
@cyr-il
@cyr-il 5 місяців тому
Your explanation are really perfect !!
@moustaphesy3023
@moustaphesy3023 4 роки тому
I learn much easily through your videos
@chuckhole
@chuckhole Рік тому
Your videos are always understandable and informative. Thank You! This would also make a good dummy security device by not connecting it to a locking device and simply replying "Incorrect Password" after any entry. Of course, that means using the old keyed lock-set as usual, but you might keep some burglars busy for a while trying to enter a non-existent password.
@edgarpisano
@edgarpisano 4 роки тому
Sir please keep going with the good work. I really love your videos
@tahevol
@tahevol 3 роки тому
Great presentation, as always
@Leroys_Stuff
@Leroys_Stuff 4 роки тому
Thank you Bill great video
@user-hd2iv8jr6n
@user-hd2iv8jr6n 2 роки тому
you have great way to explain. thank you
@ze_das_maquinas
@ze_das_maquinas 4 роки тому
Congratulations for this vídeo, very good lesson. Thanks!
@avejst
@avejst 4 роки тому
Nice projects Thanks for sharing 👍😁
@anokhautomation4453
@anokhautomation4453 2 роки тому
Very very useful tutorial and project. thanks for sharing.
@KwanLowe
@KwanLowe 4 роки тому
Your website is most excellent. Thanks for this tutorial. I learned a bunch.
@cessposter
@cessposter 3 роки тому
For a single millisecond I thought you said "I learned a book."
@muhammadrafiqulislamkhan6994
@muhammadrafiqulislamkhan6994 2 роки тому
You are really good explainer. Your valueable video to teach us to learn Arduino code and make a project. Thank for sharing
@nara49veera12
@nara49veera12 4 роки тому
Very good explanation and demonstration
@MyOwntuahur
@MyOwntuahur 4 роки тому
Thanks for this useful post.!!!
@patrickmaartense7772
@patrickmaartense7772 4 роки тому
well explained, good content
@cyprusnz2597
@cyprusnz2597 Рік тому
I love your tutorials! Thanks alot
@3dtechcrafts493
@3dtechcrafts493 3 роки тому
good and clear information,thank you
@peters2949
@peters2949 Рік тому
Best tutorials on youtube
@u-bloxi-parry4042
@u-bloxi-parry4042 4 роки тому
Could you please do something for the upcycleing and reusing of salvaged keypads/lcd displays/rotary encoders, ANYTHING that you can salvage from electronics, please??
@abshproelec4537
@abshproelec4537 3 роки тому
Thank you for this crystal clear video. I guess the keypad library includes a debounce routine so multiple keypresses are not detected ?
@francisleesc
@francisleesc 2 роки тому
Thank you for the demo!👍👍👍👍👍👏👏👏👏👏👏🙏🙏🙏🙏
@herok4306
@herok4306 3 роки тому
It was extremely useful to me...Thank You sir..
@jameswesthoff2410
@jameswesthoff2410 4 роки тому
Thanks for the awesome video, Bill.!! Are you planning any more DB1 videos in the near future? Stay safe.!!
@vhieltechhub254
@vhieltechhub254 Рік тому
thank you this is is very informative
@siralone3646
@siralone3646 2 роки тому
thanks, best video about keypad :)
@Waltkat
@Waltkat 4 роки тому
Thank you for another great video tutorial. And that CircuitBasics website is a great resource for both Arduino and RasberryPi.
@cosmikodes
@cosmikodes 4 роки тому
Sir you and your videos are just marvellous
@tonybuckley3905
@tonybuckley3905 Місяць тому
excellent video
@mrkewi1
@mrkewi1 7 місяців тому
Thank you.
@kenhchetao1989
@kenhchetao1989 Рік тому
thank for your sharing
@mikhapichkhadze2885
@mikhapichkhadze2885 4 роки тому
Very interesting thank you for this video
@rmilo
@rmilo Рік тому
WOW, THANKS!
@chivainmanfoumbi9026
@chivainmanfoumbi9026 2 роки тому
this video is just GREAT !!!!! thanks a lot.....
@larspeterjensen3913
@larspeterjensen3913 4 роки тому
Great informative video. Just for fun! What happens if the Arduino looses power. Will I be locked out?
@TheAvproman
@TheAvproman 3 роки тому
This is a great presentation! Have you demonstrated using a RF ID module?
@snehashishbanerjee2575
@snehashishbanerjee2575 3 роки тому
Your videos are always awesome! Love this one too..!
@puneethkumar703
@puneethkumar703 3 роки тому
wokwi.com/playground/electronic-safe
@thehappycoder3760
@thehappycoder3760 Рік тому
Very clear
@alfredsivanzire3552
@alfredsivanzire3552 4 роки тому
You're the best.
@2150dalek
@2150dalek Рік тому
Thank you for the instructional video. You saved me from purchasing a computer manufacturer's $25 keypad which is more or less the same thing as a $3.99 one.
@ElectroMentor
@ElectroMentor 3 роки тому
Perfect 👍
@dennissmithjr.5370
@dennissmithjr.5370 4 роки тому
Cool video, thanks.
@vikgochannelKLT
@vikgochannelKLT 3 роки тому
Mudah dipahami videonya,dan terimakasih atas programnya
@NortelGeek
@NortelGeek 2 роки тому
ABCD are part of the AUTOVON military telephone network. It's still there but no longer used very much. ABC and D were usually marked as "Routine, Priority, Flash, and Flash Override", each creating a "precedence" for the call going through. Flash Override was the highest priority call and each of these classifications could "preempt" other lower priority calls on the public network during a disaster or other emergency. For the youngsters: Flash wasn't always used for just three-way calls. It was originally used to signal or "recall" the operator after a call to arrange payment for overtime usage or to set up repeat dialing or "sequence calls" which are calls that could be made after the current one without hanging up. After that, Flash (or "Link" on Nortel phones) was used to invoke other automated features, such as conference calling, call waiting and call parking.
@kazzarden70
@kazzarden70 4 роки тому
Thanks for an good and interesting video. =) Now a dumb question. What are the programming language in use?
@wherami
@wherami 11 місяців тому
Thank you very much
@TOMTOM-nh3nl
@TOMTOM-nh3nl 4 роки тому
Thank You
@flyingsalmon
@flyingsalmon 3 роки тому
Thank you for your very informative and patient explanations. I am a bit puzzled by the lamp connection and the relay. I have a relay module that comes with Egeloo Super Starter kit and it seems to have the same model number, but I see in your video, it's mounted on a different controller...what's that controller (Q1)? (so I can locate it in my kit or purchase it). And secondly, what is the lamp model (Q2)? and how is that connecting to the unknown controller that relay is sitting on (Q3)? There seems to be 2 wires from that controller...one of them to the lamp which is going to 12V DC (we don't have 12v on UNO R3). Your setup is cool but we don't have such setup for educational purposes...could you explain how we can achieve this economically? (I already have connection to keypad and other modules such as buzzers and displays working). Many thanks in advance. Hope you're still around on UKposts!
@PyroRob69
@PyroRob69 3 роки тому
The only suggestion I would make after completing the testing of this code would be to display an asterisk rather than the number typed in for the password. No need to display it. That kind of defeats it. I would also step it up one more step. Add a RFID card reader in addition to the passcode. "Something you have, and something you know." Hreat video!
@razisindi49
@razisindi49 4 роки тому
Thanks a lot, nice video. Could you create new training for stepper motor. When you enter a value and stepper motor turns as much as the value is entered
@adadmohamedcherif192
@adadmohamedcherif192 3 роки тому
Great, thanks .
@stefanvanraemdonck9054
@stefanvanraemdonck9054 4 роки тому
You can also put an extra count in the 'incorrect password' section. If the count reaches, let's say 5, then the program goes into an infinite loop. Offcourse you need to reset that count in the 'correct password' side
@laythabdulwahab9498
@laythabdulwahab9498 27 днів тому
good job
@darrell2150beta
@darrell2150beta 3 роки тому
Can the pins being used by the TFT screen be utilized if using a breakout board? Dual usage on the pins as it were.
@RameshKumar-rt8xb
@RameshKumar-rt8xb 3 роки тому
WHy is this guy so gud in explaining but still don't have muh views??? But he is doing a great job
@qzorn4440
@qzorn4440 3 роки тому
sweet vid... i would like to use may be this matrix membrane keypad or just a 4 button version to tell the Arduino to output usb windows PC F11 F12 function key commands to control pause/run Bandicam software and change the regedit registry file to run/pause (0 or 1) of a second program syncing the 2 together? now to make it happen? suggestion... thanks a lot...:)
@Hamide233
@Hamide233 2 роки тому
Thank you brather yoù best ticher
@senpuuxd1032
@senpuuxd1032 3 роки тому
Great video can u make project with arduino uno fake bomb for airsoft/paintball
@bertyjustice4424
@bertyjustice4424 2 роки тому
Your arduino videos are excellent and easy to follow. I have a problem though. I am following a project to build a arduino controlled rotary indexer. I am using the 16 key pad that you are using in the video. My problem is that my stepper motor controller uses pins D2 and D3 So I won't be able to connect my keyboard to D2 and D3. is there a way around this please.
@sz72909
@sz72909 4 роки тому
Thanks for sharing this, Bill. A while back, you talked about using the XOD IDE for the Arduino. I have been learning more and more about XOD. I searched the XOD library, but could not find one for the KEYPAD, although they do have some libraries for the LCD+Buttons, but nothing for a basic matrix keypad. Do you know if there is a way to use this keypad with XOD? Do I have to make my own node with 12 or 16 buttons? Thank you.
@Den_Electro
@Den_Electro Рік тому
Hello friend. Watch my video ukposts.info/have/v-deo/q5JoYZ15qI571Z8.html
@Dekan88
@Dekan88 Рік тому
Hi, Thank you for your videos. I found that I had to switch lcd.backlight(); and lcd.init(); to get my display to work. So lcd.init(); had to go first before lcd.backlight(); in this order.
@mohammedk.h.f3016
@mohammedk.h.f3016 4 роки тому
Thanx alot...
@thomassaook7787
@thomassaook7787 3 роки тому
awesome job, but would you please provide code for the door lock application using the normal 16*2 LCD that is not of type I2C?
@alcanceweb
@alcanceweb 4 роки тому
Nice tutorial, thank you. I don't know, I2C keyboards could be better, couldn't be, right?
@MohamedGamal-mp6kc
@MohamedGamal-mp6kc 3 роки тому
thanks very much its very useful
@puneethkumar703
@puneethkumar703 3 роки тому
Please follow this link for an online Arduino simulation
Using Basic Logic Gates - With & Without Arduino
1:03:51
DroneBot Workshop
Переглядів 548 тис.
74HC595 & 74HC165 Shift Registers with Arduino
40:38
DroneBot Workshop
Переглядів 386 тис.
船长被天使剪成光头了?#天使 #小丑 #超人不会飞
00:28
超人不会飞
Переглядів 26 млн
Arduino MASTERCLASS | Full Programming Workshop in 90 Minutes!
1:25:31
Programming Electronics Academy
Переглядів 2,3 млн
DIY Macro Pad Keyboard Build from Scratch with Custom PCB and Mechanical Switches
14:25
Practical Guide to PCF8574: Adding Extra Pins for Arduino
16:46
Mario's Ideas
Переглядів 2,6 тис.
Instructions - Button Matrix
12:47
Real Robots
Переглядів 49 тис.
How to Set Up Keypads on the Arduino - Ultimate Guide to the Arduino #22
13:49
Introduction to ESP32 - Getting Started
47:57
DroneBot Workshop
Переглядів 1,5 млн
Using LCD Displays with Arduino
46:23
DroneBot Workshop
Переглядів 1,6 млн
LoRa - Long-Range Radio for IoT | Arduino, ESP32, RPI Pico
1:07:58
DroneBot Workshop
Переглядів 278 тис.
Baby plays phonk music for the first time
0:24
jackdoesskits
Переглядів 18 млн
Наушники для улучшения вашего слуха
0:17
WB КОПАТЕЛЬ 2.0
Переглядів 12 млн
Фанаты захейтили девушку😭
0:35
Astronaut-Stories
Переглядів 13 млн
Good teamwork?
0:23
Den Done It
Переглядів 13 млн
комната 2х девочек #трислонамебель #interiordesign
1:01
Три Слона Мебель
Переглядів 4,2 млн