Shop OBEX P1 Docs P2 Docs Learn Events
Matrix Keypad Conversion — Parallax Forums

Matrix Keypad Conversion

Eric REric R Posts: 225
edited 2005-04-12 06:20 in BASIC Stamp
I've been looking to interface a BS2 with a piece of equipment containing a matrix keypad. My intentions are to disconnect the keypad and automate the button sequence. Has anyone done this before? I first thought that a simple transistor would work but found that it would hang the matrix. My next step is reed relays, I think this will work but they are fairly big and probably not the most reliable. Is there anything else on the market that would work?

Comments

  • edited 2005-04-11 22:22
    Hello,
    ··········· The easiest way would be to simulate the signal. Which should be a high or a·low? Once that is found you could use a few 74595 to simulate that signal. With this setup you would need to have common ground to the circuit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Stephen Swanson

    Technical Support
    Parallax, Inc.
    sswanson@parallax.com

  • Eric REric R Posts: 225
    edited 2005-04-12 00:23
    Upon key contact the signal to the CPU goes high (+5vdc)

    Are there any BS2 specific documents using the 74HC595? I see they are sold on this site.

    Took a quick look at the Nuts and Volts section but turned up nothing.

    I googled the datasheet but have yet to figure out exactly what all is involved.



    BTW, I should add that this matrix has a total of five keys. Four of these are on one matrix and the fifth is on its own. The reason for the fifth key being alone is due to a feature that requires two buttons to be pressed at the same time.

    """"""" Found the 595 thread at the bottom of the page. Thanks for your help! I will get a couple ordered and go from there """"""""



    Post Edited (Eric R) : 4/12/2005 12:42:04 AM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-12 00:53
    Code for the 74HC595 is as close as the online help file -- checkout the example for SHIFTOUT.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-12 01:42
    Eric,

    ·· Not sure how much of a matrix you have with 5 keys, one being isolated, but if you know how many lines there are, and which lines are shorted together for each keypress, it shouldn't be too hard.· With so few keys I can't help but wonder if another solution might be in order.· How many wires attach to the keypad again?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Eric REric R Posts: 225
    edited 2005-04-12 03:35
    Thanks Jon,

    This IC was new to me, I should have consulted the help file first.



    Chris,

    There are six wires total



    Power (two wires total)

    1,2,3 and 4 share the same +5vdc

    5 has its own·+5vdc



    Return (Four wires total)

    1,2 and 3 have their own return line

    4 and 5 share a common return··line





    I assume this follows the matrix system. I know for a fact that at least 1 and 5 can be pressed at the same time. This should also hold true for 1 and 5, 2 and 5, and 3 and 5.

    If a transistor is installed in place of a key it will work, however, if two or more transistors are installed the system locks and will not allow entry. I should mention that this keypad has a rubber front with either a conductive rubber pad or carbon contact pad much like a nintendo controller. I mention this since there may be a impedance or maybe a capacitance issue? I don't know. This is why my next step was reed relays so there was no "drag" on the bus. There must be a better solution that I am not aware of and the 595 may work.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-04-12 06:20
    Eric -

    I tried to draw a picture of your 2 matrices, and everything was fine until I ran into the following: "4 and 5 share a common return line". That seems a bit odd, as either a 4 or 5 would be able to act as the "shift" key. This may be unique to this installtion however, and a pre-planned part of the circuit. I guess you could say it's just not ordinary or usual in my experience.

    It DOES fit with your additional comment from above: "I assume this follows the matrix system. I know for a fact that at least 1 and 5 can be pressed at the same time. This should also hold true for 1 and 5, 2 and 5, and 3 and 5." so you may well be correct in your analysis.

    The following is purely a guess, but it may have some merit. I suspect you will continue to have a problem with "hanging the matrix" until you use a method which provides a very momentary keypress "pulse" of the activated keys. I mean that in terms of fast duration and not anything frequency oriented. In the industry this is called make-then-break action, as opposed to momentary action. You may be able to simulate this with a latch IC rather than a serial to parallel register ('595). With an appropriate latch, the outputs can be set ahead of time, and then you can pulse ("blip") the output bus enable line. Just a thought if the '595 appears to cause the same "hang" problem as the transistor solution.

    Regards,

    Bruce Bates
Sign In or Register to comment.