Using Keypads with Arduino - Build an Electronic Lock

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • 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!
  • Jak na to + styl

Komentáře • 238

  • @Webendowed
    @Webendowed Před 4 lety +110

    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 Před 4 lety +6

      Exact same story here, this channel really gave me a boost!

  • @Coolarj10
    @Coolarj10 Před 4 lety +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!!

  • @chetanreddy8875
    @chetanreddy8875 Před 3 lety +4

    I watch whole ads without skipping only for his effort! Its easily understandable even by beginners.

  • @electronic7979
    @electronic7979 Před 4 lety +18

    It was a useful and educational video. I watched every second with pleasure.

  • @mattikaki
    @mattikaki Před 6 měsíci +1

    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.

  • @Richardj410
    @Richardj410 Před 4 lety +1

    Thanks, I look forward to your videos. Every time I learn something new.

  • @peterpade6293
    @peterpade6293 Před 3 lety +1

    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.

  • @kirkyd123
    @kirkyd123 Před rokem +1

    Thanks so much for the excellent videos you produce! Just enough information, but not too much. Awesome job!

  • @FoxAndHenForge
    @FoxAndHenForge Před 3 lety +1

    Thank you! I was having issues with entering multiple digits in a row but you answered all my questions there!

  • @bobtail1200
    @bobtail1200 Před 2 lety

    Im so appreciative of you making these vids. Im leaning

  • @tpobrienjr
    @tpobrienjr Před 4 lety

    As always, you have explained well. Thank you.

  • @tubeDude48
    @tubeDude48 Před 4 lety +3

    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.

  • @practicemakesbetter7132

    A very nice and thorough video as usual!

  • @stevetobias4890
    @stevetobias4890 Před 4 lety

    Yet another great video. Thank you for sharing your expertise to newbies like me.

  • @muhammadbilal2000
    @muhammadbilal2000 Před 3 lety

    Thank you so very much for the amazing video with a simple explanation.

  • @tedsykora1858
    @tedsykora1858 Před 4 lety

    Very nice video. I will keep this in the back of my head as something I may use in the future.

  • @MyOwntuahur
    @MyOwntuahur Před 4 lety +1

    Thanks for this useful post.!!!

  • @attilaszep3316
    @attilaszep3316 Před 3 lety

    Thank you very much for your project. Completely clear.

  • @cyprusnz2597
    @cyprusnz2597 Před rokem

    I love your tutorials! Thanks alot

  • @leiflindqvist9095
    @leiflindqvist9095 Před 3 lety

    Excellent tutorial, thanks!

  • @damofx
    @damofx Před 4 lety

    Stay safe too man, you're doing a fantastic job!

  • @tahevol
    @tahevol Před 4 lety

    Great presentation, as always

  • @ze_das_maquinas
    @ze_das_maquinas Před 4 lety

    Congratulations for this vídeo, very good lesson. Thanks!

  • @KommaAchtKommaEins
    @KommaAchtKommaEins Před 3 lety

    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.

  • @hc8714
    @hc8714 Před 3 lety

    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.

  • @riggz7683
    @riggz7683 Před 3 lety

    Thank you. Amazing tutorial

  • @robertb2350
    @robertb2350 Před 4 lety +1

    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.

  • @cyr-il
    @cyr-il Před 8 měsíci

    Your explanation are really perfect !!

  • @NewAgeDIY
    @NewAgeDIY Před 4 lety

    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.

  • @Leroys_Stuff
    @Leroys_Stuff Před 4 lety

    Thank you Bill great video

  • @RandomValueToBe
    @RandomValueToBe Před 4 lety

    Sir please keep going with the good work. I really love your videos

  • @patrickmaartense7772
    @patrickmaartense7772 Před 4 lety +1

    well explained, good content

  • @Headmastar
    @Headmastar Před 2 lety

    Thanks for generous delivery of info. EAZY.

  • @moustaphesy3023
    @moustaphesy3023 Před 4 lety

    I learn much easily through your videos

  • @peters2949
    @peters2949 Před rokem

    Best tutorials on youtube

  • @KwanLowe
    @KwanLowe Před 4 lety +1

    Your website is most excellent. Thanks for this tutorial. I learned a bunch.

    • @cessposter
      @cessposter Před 3 lety +1

      For a single millisecond I thought you said "I learned a book."

  • @nara49veera12
    @nara49veera12 Před 4 lety

    Very good explanation and demonstration

  • @user-hd2iv8jr6n
    @user-hd2iv8jr6n Před 2 lety

    you have great way to explain. thank you

  • @snehashishbanerjee2575

    Your videos are always awesome! Love this one too..!

  • @3dtechcrafts493
    @3dtechcrafts493 Před 3 lety

    good and clear information,thank you

  • @cosmikodes
    @cosmikodes Před 4 lety

    Sir you and your videos are just marvellous

  • @MrWATCHthisWAY
    @MrWATCHthisWAY Před 4 lety +1

    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!!!

  • @siralone3646
    @siralone3646 Před 2 lety

    thanks, best video about keypad :)

  • @avejst
    @avejst Před 4 lety

    Nice projects
    Thanks for sharing 👍😁

  • @anokhautomation4453
    @anokhautomation4453 Před 2 lety

    Very very useful tutorial and project. thanks for sharing.

  • @mikhapichkhadze2885
    @mikhapichkhadze2885 Před 4 lety +1

    Very interesting thank you for this video

  • @G_aaron
    @G_aaron Před 10 měsíci

    Wonderful presentation thanks

  • @stevegoforit.9912
    @stevegoforit.9912 Před 4 lety

    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.

  • @vhieltechhub254
    @vhieltechhub254 Před rokem

    thank you this is is very informative

  • @bluegizmo1983
    @bluegizmo1983 Před 4 lety +34

    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 Před 3 lety +5

      discount james bond

    • @chivainmanfoumbi9026
      @chivainmanfoumbi9026 Před 3 lety

      GREAT idea !!!!

    • @HeWhoIsWhoHeIs
      @HeWhoIsWhoHeIs Před 2 lety +1

      Doing the same thing with my garage door. Building a weather proof box for keypad and display. It's super cool.

  • @ramakrishnatadepalli107
    @ramakrishnatadepalli107 Před 2 lety +1

    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

  • @herok4306
    @herok4306 Před 3 lety

    It was extremely useful to me...Thank You sir..

  • @dennissmithjr.5370
    @dennissmithjr.5370 Před 4 lety

    Cool video, thanks.

  • @alfredsivanzire3552
    @alfredsivanzire3552 Před 4 lety +2

    You're the best.

  • @monkeymanstones1
    @monkeymanstones1 Před 4 lety

    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!

  • @chivainmanfoumbi9026
    @chivainmanfoumbi9026 Před 3 lety

    this video is just GREAT !!!!! thanks a lot.....

  • @francisleesc
    @francisleesc Před 2 lety

    Thank you for the demo!👍👍👍👍👍👏👏👏👏👏👏🙏🙏🙏🙏

  • @kenhchetao1989
    @kenhchetao1989 Před rokem

    thank for your sharing

  • @Thebasicmaker
    @Thebasicmaker Před 2 lety

    I'm going to use this setup with the rotating Lidar that you introduced in a past video!

  • @rmilo
    @rmilo Před 2 lety

    WOW, THANKS!

  • @tonybuckley3905
    @tonybuckley3905 Před 4 měsíci

    excellent video

  • @u-bloxi-parry4042
    @u-bloxi-parry4042 Před 4 lety +18

    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??

  • @jamesgoacher1606
    @jamesgoacher1606 Před 4 lety +1

    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.

  • @abenwinUT
    @abenwinUT Před 2 lety +3

    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'.

    • @alohaonguda8199
      @alohaonguda8199 Před měsícem

      where to find the default address?

    • @alohaonguda8199
      @alohaonguda8199 Před měsícem

      Thank you so much! It didn't work on me either but thanks to you! mine is 0x27 as well

  • @fury4076
    @fury4076 Před 4 lety +54

    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 Před 4 lety +8

      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 CZcamsrs 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 Před 4 lety +6

      @@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 Před 4 lety +3

      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 Před 4 lety +1

      @@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 Před 4 lety

      @@TimEckel Do you know where there's a tutorial on that?

  • @thehappycoder3760
    @thehappycoder3760 Před rokem

    Very clear

  • @muhammadrafiqulislamkhan6994

    You are really good explainer. Your valueable video to teach us to learn Arduino code and make a project. Thank for sharing

  • @wherami
    @wherami Před rokem

    Thank you very much

  • @robertrobert5583
    @robertrobert5583 Před 2 lety

    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.

  • @adadmohamedcherif192
    @adadmohamedcherif192 Před 3 lety

    Great, thanks .

  • @ElectroMentor
    @ElectroMentor Před 3 lety

    Perfect 👍

  • @MohamedGamal-mp6kc
    @MohamedGamal-mp6kc Před 4 lety

    thanks very much its very useful

    • @puneethkumar703
      @puneethkumar703 Před 3 lety

      Please follow this link for an online Arduino simulation

  • @chuckhole
    @chuckhole Před 2 lety

    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.

  • @mrkewi1
    @mrkewi1 Před 9 měsíci

    Thank you.

  • @Waltkat
    @Waltkat Před 4 lety

    Thank you for another great video tutorial. And that CircuitBasics website is a great resource for both Arduino and RasberryPi.

  • @Hamide233
    @Hamide233 Před 2 lety

    Thank you brather yoù best ticher

  • @NortelGeek
    @NortelGeek Před 2 lety

    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.

  • @laythabdulwahab9498
    @laythabdulwahab9498 Před 3 měsíci

    good job

  • @vikgochannelKLT
    @vikgochannelKLT Před 4 lety +1

    Mudah dipahami videonya,dan terimakasih atas programnya

  • @TOMTOM-nh3nl
    @TOMTOM-nh3nl Před 4 lety

    Thank You

  • @abshproelec4537
    @abshproelec4537 Před 3 lety

    Thank you for this crystal clear video. I guess the keypad library includes a debounce routine so multiple keypresses are not detected ?

  • @DRSElectronic
    @DRSElectronic Před 4 lety

    Interesting video

  • @jameswesthoff2410
    @jameswesthoff2410 Před 4 lety +2

    Thanks for the awesome video, Bill.!! Are you planning any more DB1 videos in the near future? Stay safe.!!

  • @TheAvproman
    @TheAvproman Před 4 lety

    This is a great presentation! Have you demonstrated using a RF ID module?

  • @phoenixpiano2233
    @phoenixpiano2233 Před 4 lety +1

    Why can't we use pin 13 for the keypad? It doesn't work when I use it as any of the row or column pins

  • @wishicouldarduino8880
    @wishicouldarduino8880 Před 4 lety

    Cool!

  • @larspeterjensen3913
    @larspeterjensen3913 Před 4 lety

    Great informative video. Just for fun! What happens if the Arduino looses power. Will I be locked out?

  • @2150dalek
    @2150dalek Před rokem

    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.

  • @mohammedk.h.f3016
    @mohammedk.h.f3016 Před 4 lety

    Thanx alot...

  • @SirDzair
    @SirDzair Před 3 lety +1

    I truly appreciate this tutorial !
    but is there a way to implement shift registers with keypads in order to free up some pins ?

  • @seathru1232
    @seathru1232 Před 3 lety

    Hi, thanks for this video. I have a question for you: what if I want to output two digits numbers? If I had for example a 8x8 keypad, and want to output 64 numbers, one for each button press, how could I do? Because it seems that I can define all the possibile values in the key char, but when I press the button associated with number (for ex.) 46, it just outputs the last digit, 6. Is there a way to solve this issue? Thanks a lot!

  • @andreamitchell4758
    @andreamitchell4758 Před 4 lety

    i still don't really understand C so if i wanted to add a piezo electric disc and i wanted to have it emit a tome whenever a key was pressed where would i add that bit of code ? i know there are active and passive "buzzers" not ifa piezo disc is considered active or passive
    i did play around with some sketches for making a piezo disc emit tones before one that made it play SMB theme and i used a converter too to convert some other stuff for it to play, but i am not sure how i would ad code to the sketch to make it beep for every key press and emit tomes for a correct entry and a different tone for an incorrect entry

  • @flyingsalmon
    @flyingsalmon Před 3 lety

    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 CZcams!

  • @RameshKumar-rt8xb
    @RameshKumar-rt8xb Před 4 lety

    WHy is this guy so gud in explaining but still don't have muh views??? But he is doing a great job

  • @darrell2150beta
    @darrell2150beta Před 3 lety

    Can the pins being used by the TFT screen be utilized if using a breakout board? Dual usage on the pins as it were.

  • @ezrabarnes3765
    @ezrabarnes3765 Před 2 lety

    if i dont have a backpack for my LCD is there something else I could use to connect it to the arduino?

  • @ghazal246486
    @ghazal246486 Před 4 lety

    Hi, I'm using an Arduino mega, initially my keypad works fine, then I added 2 shields on top, and keypad didn't work, I diagnosed the problem and found that I should connect the keypad to other pins of arduino, I'm guessing some pins are damaged while I was taking out or inserting shields, no visible damage. But I tested thoes pins to blink LED and they are working. Do you think that sheilds damaged the pins ?

  • @zoltonsuma3281
    @zoltonsuma3281 Před 2 lety

    Hi, im doing my final year project m wondering if it's possible to have two separate pass code to actuate the solenoid?

  • @ghosthuntergr
    @ghosthuntergr Před 2 lety

    Hi if I want to connect an old matrix keyboard from an old pc that has 8x11 matrix what is the best way to do it?

  • @Epic_M.A.S
    @Epic_M.A.S Před 3 měsíci

    thankU