Go Down

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

planck66

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

LarryD

Show us a schematic how you wired things up.
Show us your sketch.
The way you have it in your schematic isn't the same as how you have it wired up!

planck66

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

LarryD

Do you have a link to the keypad.
Also a picture of the keypad might be of some use.
The way you have it in your schematic isn't the same as how you have it wired up!

planck66

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

LarryD

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

The way you have it in your schematic isn't the same as how you have it wired up!

planck66

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?

LarryD

If you have the pins you can use your Arduino
The way you have it in your schematic isn't the same as how you have it wired up!

marteln

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) ;)

EA3BIL

Hi,

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

Ciao,
Rafa.

Go Up