Connect A 4x4 Keypad To One Arduino Input
HTML-код
- Опубликовано: 13 сен 2024
- In this Tutorial video, I'm going to be showing you how to connect a 4x4 keypad to a single Arduino analogue input. A 4x4 keypad is a really useful Arduino project component, particularly for security access projects or projects requiring code inputs. These keypads typically require 8 IO pins in order to function. This tutorial only uses one, enabling you to free up more of your IO for sensors, displays, motors and servos and allowing you to build more complex projects.
Written Tutorial With Code & Circuits - www.the-diy-li...
Similar Tutorial For Multiple Pushbuttons - www.the-diy-li...
Components Required
Arduino Uno - amzn.to/3abhNNG
4x4 Keypad - amzn.to/3e3EGoq
LCD Shield - amzn.to/3aTRgov
Breadboard & Jumpers - amzn.to/2QC3BW4
7 Resistors (6 Different) - amzn.to/2Ve4fuj
If you've got any Tutorial requests or suggestions, let me know in the comments section below. I'm always looking for suggestions.
Yes 4 years ago when you made this video. This year I’m making an MFD Multi Function Display with 28 buttons on it. This is for an aircraft F/A18 Fighting Falcon. Keeping the pin out small is the way forward. I need to repeat this 3 times. I think that is 84 buttons using 3 inputs. Thanks for the help.
I am using this and the PWM code to control the raising/lowering of doors on my 18 bay carshop for my model train. The object is to enter the door number and then the % open. Using the I2C for the PWM boards and the one analog connection for the keyboard will make it all work....wiring was easy. Now to do the coding, mechanical tweaking, and troubleshooting.
This sounds like a great application for this sort of arrangement.
Wow this is awesome!
Great video, thank you for this explanation
great explanation keep up the great work
Thank you!
thank you for this explanation but how use it in a code
Hi Michael, great video - thank you.
Would this work when sensors and motors are connected to the same live source, or would this interfere with the button read values?
Great video. I’d like to expand functionality to record the keypad data onto an Sd card. Would you have an instructional video on that process?
I don’t have one at the moment, but that would be fairly easy to do. You get sd card shields which would integrate nicely with it.
I'm a little confused by your setup of the resistors. In the initial setup, it seems like you will be inserting resistors into an 8x8, but in the actual implementation, I see 8 resistors in a row, then a bunch of wires, and one resistor at the bottom. What exactly is that setup?
It is an 8x8 setup but they need to be arrange in a voltage divider circuit to generate a reference voltage for the Arduino to measure. The single resistor at the bottom is one half of the divider and the other 8 resistors make up the second half of the divider.
Nice way to save D pins!
That particular keypad, how does it mount on a project case/box?
I don't see any screw holes in the corners.
I'm about to order a keypad and I see a deal on 4 of these for a good price, or 1 of the push keys for about the same price.
How much pressure on a button do you need to make contact? Meaning, do you have to press pretty hard or a very light touch will make contact?
Thanks in advance.
You'd probably need to stick it onto a case or box with adhesive or double sided tape etc..
The buttons don't require much pressure to push- it's not like a touch display, they're still buttons, but they're relatively easy to press
why circuit and your project board different?
Quick question , what are the specific values of the resistors you used in your project ?
Hi Celi, I used the resistors show in the resistor check table in the video - 82, 100, 150,180, 330, 390, 510 and 680 ohm resistors.
@@MichaelKlements Thank you!!!
What do you call that black thing on the breadboard, is that a potentiometer?
I'm not sure which one you are referring to, the two at the end are a transistor and a buzzer. The transistor works as a "switch" to turn the buzzer on or off.
At 2:34 there is a potentiometer for the LCD brightness which is outside of the scope of this project. BTW the black thing from schematic is blue in reality - see top left corner of the LCD shield 3 seconds earlier.
Potencialmeter not important. Step 1) repair source code: keyIn = analogRead(A0); step 2 lcd.print (keyIn), step3 repair keyVals the values obtained, step 4 lcd.print(temp). Wooow!!!!!!