Pages: [1]   Go Down
Author Topic: Controlling membrane keypad with a CD4021 shifter  (Read 2303 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: July 28, 2013, 03:00:09 pm by planck66 » Logged

Offline Offline
Edison Member
*
Karma: 64
Posts: 2484
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Show us a schematic how you wired things up.
Show us your sketch.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: July 28, 2013, 02:17:14 pm by planck66 » Logged

Offline Offline
Edison Member
*
Karma: 64
Posts: 2484
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the 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
Logged

Offline Offline
Edison Member
*
Karma: 64
Posts: 2484
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 64
Posts: 2484
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have the pins you can use your Arduino


* 7-28-2013 2-32-34 PM.jpg (182.32 KB, 767x504 - viewed 134 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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) smiley-wink


* 4021-keypad.jpg (126.17 KB, 972x672 - viewed 40 times.)
Logged

Pages: [1]   Go Up
Jump to: