Shop OBEX P1 Docs P2 Docs Learn Events
Keypad emulator — Parallax Forums

Keypad emulator

Don MDon M Posts: 1,653
edited 2011-05-16 17:10 in General Discussion
I want to emulate a 4 X 5 keypad input to another control board using a basic stamp controller. I am having a difficult time figuring out how I might accomplish this. Is there a chip made that would work for this? I would feed it a BCD input and get 1 of the 20 possible combination outputs. My problem is thinking how the ouputs would energize any possible 2 lines of the combination without using a whole bunch of transistors. Any ideas out there?

Thanks.
Don

Comments

  • Mike2545Mike2545 Posts: 433
    edited 2009-07-24 01:31
    I made a keypad encoder easily with only a few parts.

    See it here http://forums.parallax.com/showthread.php?p=790241

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike2545

    This message sent to you on 100% recycled electrons.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-24 05:09
    Mike, if I interpet Don"s post correctly he wants to do almost the opposite. It sounds like he wants to connect a micro to another board and fool it into thinking there is a keypad there.

    Don, most keypads are scanned by a micro of some kind. A 4x5 keypad will usually have 4 rows by 5 columns or 5 rows by 4 columns. Either the rows or colums will will be scanned by placing a voltage on each one in turn. If the rows are scanned then the column lines are read in to see if one (or more) of the keys connected to that row line has been closed. A microcontroller can be used to output to the appropriate column data for a keypress when the associated row is active.

    An alternative is to use a cmos analog switch (such as a cd4066) for each row/column intersection. programming it is simpler, but you would need 20 I/O pins and 5 cd4066 chips.

    The simplest would be a crosspoint chip or an eeprom. Once programmed all you would need for the eeprom would be 5 bits to tell it what character you want.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-07-24 06:15
    For anything below or equal to a 4x4 keypad, You can do it using only 2 cd4066 ic's ...

    A 3rd cd4066 could be used for a 4x5 keypad with the same sort of idea, handling up to a 4x8 keypad.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 7/24/2009 6:21:48 AM GMT
    1097 x 575 - 222K
  • Don MDon M Posts: 1,653
    edited 2009-07-24 11:46
    Beau / kwinn,

    I was working with some 4066's last night thinking this may be the way to go. Beau's idea is much simpler than what I was doing. I understand how the lines are scanned and how that all works. Just looking for an idea as you say "a reverse" of a keypad decoder. I was thinking of just using the 4066's and dedicating a simple stamp to it and just send it a serial command to let it interpret the simulated keystrokes.

    A PLD also came to mind but I have never worked with one of those. Memeory type addressing scheme also fits into this type of application.

    Thanks for your suggestions. If anyone else has any more to add please don't hesitate.

    Thanks again.

    Don
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-07-24 15:46
    Don M,

    I don't know why I didn't think of it, but you could also use just two 4051B's (8-channel analogue
    multiplexer/demultiplexer) in the same manor as I described with the 4066's above. Each 4051B is essentially two 4066's with control logic, so you could emulate up to an 8x8 keypad using only 6-I/O pins.

    The only thing that I see that could be a hang-up is the "ON" resistance of the 4051B's. While the data sheet wasn't incredibly clear, I think that between two of them your talking about 700 Ohms if powered with 5V.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-24 16:36
    Great ideas Beau, wish I had thought of them. So much simpler than what I suggested. Added them to my "circuit idea" folder.

    PS- I took a look at my data sheets and the 74HC4051 has a maximum on resistance of 150 ohms at 5V, and the typical resistances are lower. It will also operate from 2-6V. Probably the best bet for this application.

    If you needed an emulator for a really big keyboard there is also the 4067 16 channel analog mux.

    Post Edited (kwinn) : 7/24/2009 5:51:21 PM GMT
  • Don MDon M Posts: 1,653
    edited 2011-05-16 17:10
    I started playing with this again today using the '4051 chips. I am connecting the keypad side to a machine that utilizes +5VDC logic levels and my device with a prop uses +3.3VDC levels. My device only has available a +3.3VDC regulator.

    My problem is that when I power the VCC of the 4051's with +3.3VDC it isn't enough to make the "resistance" low enough to complete the keypad circuit. If I connect the VCC to +5VDC it works. The machine and my device share a common ground.

    Anyone have any other ideas for different chips / circuit? This design utilizes 6 prop pins which is fine. I don't want to use any more than this if I can help it.

    Edit: If I separate VEE from the logic +3.3VDC ground and connect it only to the machine +5VDC logic ground and then separate the +3.3VDC ground from the +5VDC ground then the 4051 will work at +3.3VDC. But in actual use I won't be able to separate the grounds as they will be common. I just did this as an experiment to see if it would work.

    Thanks.
    Don
    908 x 577 - 58K
Sign In or Register to comment.