Go Down

Topic: Controlling membrane keypad with a CD4021 shifter (Read 4149 times) previous topic - next topic


Jul 28, 2013, 08:20 pm Last Edit: Jul 28, 2013, 10:00 pm by planck66 Reason: 1
Hi, I just bought my first arduino yesterday and managed to set up LCD on it, but now I am out of pins to connect my 4x4 matrix keypad. After doing some search, I decided to try Arduino ShiftIn example. http://www.arduino.cc/en/Tutorial/ShiftIn. I produced the exact circuitry using a CD4021B 8 bit shifter (without VCC and GND as matrix keypad does not require them). However, when I check out the results all I am seeing is 11111111, pressing buttons does not change this output. I am new to electronics, I come from a software development background. Can anyone guide me to right direction on how to make my matrix keypad work with shift in method?  

PS: My keypad: http://www.ebay.co.uk/itm/New-4-x-4-Matrix-Array-16-Key-DIY-Membrane-Switch-Keypad-Keyboard-Touch-Pad-3M-/321064830673?_trksid=p3284.m263&_trkparms=algo%3DSIC%26its%3DI%26itu%3DUCI%252BIA%252BUA%252BFICS%252BUFI%26otn%3D21%26pmod%3D321167207388%26ps%3D54


Show us a schematic how you wired things up.
Show us your sketch.
Always blame yourself.


Jul 28, 2013, 09:09 pm Last Edit: Jul 28, 2013, 09:17 pm by planck66 Reason: 1
I am using 8x10kOhm resistors with CD4021B shifter. Keypad only has data out pins. No VCC or GND required. But I connected GND as shown in the example on ardouino's official tutorial.


Do you have a link to the keypad.
Also a picture of the keypad might be of some use.
Always blame yourself.


This is the keypad:


This is a 4X4 keypad which has to be read by placing a High on a given row then reading the 4 columns to see if a switch is being pressed. Then the next Row ....

Always blame yourself.


So I guess, it wont be able to achieve this with a shifter because I won't be able to set specific row high? I need to use an IO extender?


If you have the pins you can use your Arduino
Always blame yourself.


You need no  IO extender. You have to change your circuit a little. The three gates in up part is not necessary, but when you connect it to interrupt, you got event (any_key_pressed) ;)



...And what about dealing with 5 x 4 ??


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131