3

I'm rebuilding my label printer to become an Internet service using an ESP8266. It's a fun project, never mind the usefulness. The keypad will be removed and instead my MCU emulates keypresses.

The keypad has:

  • 8 pins that always have 3.2V (red cables on the picture)
  • 7 pins that have 2.6V (black cables, faint LEDs)

When a key is pressed it connects one of the 8 pins with one or more of the 7 pins. I can verify this by connecting them (see picture for writing "ABC").

  • "A" is red cable number 2 connected to black cable number 3.
  • "B" is red cable number 3 connected to black cable number 3.

.... and so on. Plenty of combinations.

I could achieve my goal by replacing each of the buttons with a transistor. That would require 50 pins (because there are 50 buttons). Simple stupid, I can do that with a bunch of 545's. However, I'd like to see if it's possible to find a more clever solution.

How does this device know what pin I'm drawing current from? I can make six letters by adding voltage to each of the black pins. But I need the combination of red+black to get all combinations.

Would it work to somehow simulate drawing current from each red pin individually and at the same time add voltage to the black pins? Then I only need 15 pins, way fewer components.

Letra with intestines out

mikabytes
  • 173
  • 1
  • 4

1 Answers1

3

It is a keyboard matrix, and it could be active scanned matrix.

To connect any "row" wire to any "column" wire, you could just use two 8-to-1 analog multiplexers to connect any two wires together.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • So I still have to connect the red wire to the black wire? I was hoping of finding a way around that. If I were to use your suggested approach, wouldn't I then need 1 multiplexer and 1 demultiplexer? – mikabytes Dec 28 '21 at 16:42
  • 1
    If it is a matrix and you don't know how it is scanned then this is the safest way. Analog multiplexer is analog. It is both a multiplexer and demultiplexer. – Justme Dec 28 '21 at 17:04
  • Alright. Just ordered a bunch of cd4051B :) – mikabytes Dec 28 '21 at 17:06
  • @mikabytes I wanted to do the same... Did you get a chance to try the multiplexer? Was the cd4051B suitable? – NaN_am_i_5447015 Aug 05 '23 at 09:57
  • @NaN_am_i_5447015 Yes! I built it as described, using CD4051B. It worked on my first try. This LetraTag has since been printing a thousand labels, and it's still working. I have a script that generates the labels on my computer and sends them over HTTP. The only manual step is to cut the label as this is a mechanical part, and can't be automated. – mikabytes Aug 09 '23 at 07:48