Connect with us

3x4 Matrix Keypad Decoder

Discussion in 'Electronic Components' started by [email protected], Aug 6, 2007.

Scroll to continue with content
  1. Guest

    I know this has been discussed before but the solutions provided are
    not what is needed for this project, so here it is.

    What I have is a matrix keypad (3x4).

    What I need is when a key is pressed _one pin_ of the decoder is
    connected to ground. The ideal solution would be a series of logic
    gates or similar basic circuitry.

    Thanks for your time,
  2. Gary Tait

    Gary Tait Guest

    Microcontroller would be electroniclly simple, but coding is required.

    If there is a common on the keypad, it could be easier.

    In logic, conceptually:

    You have an oscillator (1) feeding a two bit binary generator (2).
    That feeds a binary decoder (3), going to the rows of the keypad (4),
    The columns (pulled high) go to a 4 to 2 encoder (5), and a 4 input NAND
    gate (6). Two bits from the binary gnerator (2) and the 4 to 2 encoder
    (4) got to a 4 to 16 decoder. (7) Its output is enabled by the NAND
    output (6) which also inhibits the clock (1).
  3. So you have that 3x4 matrix (7 wires) and that decoder (12 wires + GND). A
    solution for a conversion is not half as easy as it looks like, especially
    when using basic building blocks like gates. Problem is the matrix keypad
    which cannot be read out using combinatorial logic only. You will need some
    clock and a shift register or similar to put signals on the rows (or
    columns). When correctly designed, the signals on all seven lines determine
    which key was pressed (if any). This code is not continuously available
    however as other keys also needs to be scanned. So you will need to build in
    some timing for validation of the key pressed. Another method is to stop
    scanning as long as a key is presed. Conversion from the 7 bits code to the
    12 bits one is straightforward using combinatorial logic, although you will
    need a lot of gates.

    This type of circuits has been build and I still can build them if I really
    need to. Otherwise I won't. Using a simple, cheap, 28 pins micro or similar,
    will be far easier and faster to design and requires much less components
    and so board space.

    petrus bitbyter
  4. Must it reject multiple key-presses? (Not all keypad decoders do that
    anyway). If not, use series resistors. 0,1,2 K on one buss, 0,3,6,9 K on
    the other. Using a constant current source, the voltage across the
    resistance can be fed to a linear dot/bar driver IC like the LM3914 which
    drives 10 outputs but can be chained to get more. Use dot mode to get
    single output at once. No timing circuits needed, no oscillators, just a
    scale and offset adjust which can be fixed resistors once you know what
    they must be.

    Siemens UAA180 has 12 outputs and is linear. Getting one might be awkward.
  5. clifto

    clifto Guest

    A statement like that suddenly makes me want several, and I don't even know
    what I'd do with them.
  6. Me too. I never really thought of them much until I wanted to solve that
    question just posted. The ability to take a voltage and put out an
    appropriate signal on a unique pin makes them way useful, for much more
    than the original intent. That might be why they stayed around for 20
    years. The standard ten segment ones, anyway. What could be nice is a
    single IC with 16 outs.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day