Retro keypad 4-wire salvage + IMU sensor to TouchDesigner (Need some hardware advice!)

Hello everyone! :hammer_and_wrench:

I’m diving into a new project building an interactive controller to drive real-time visuals in TouchDesigner, and I'd love to get your insights to validate my shopping cart before I pull the trigger.

The core idea: I salvaged a super stylish vintage telephone keypad, but it only has 4 wires coming out of it (see attached photos). My goal is to send every keypress over to TouchDesigner via serial communication.

I have a few questions regarding feasibility and hardware choices:

  1. Handling Keypress States: For my visuals, I want to be able to handle two different behaviors. Either a short press (just a quick pulse from 0 to 1), or detecting when I hold the key down (the signal stays at 1 for as long as my finger is on the button). Is this easy to handle on the coding side?

  2. The Decoder: With only 4 wires for 12 keys, I strongly suspect this thing uses DTMF (dual-tone multi-frequency). Is an MT8870 decoder module absolutely necessary to translate this cleanly, or is there a trick I'm missing?

  3. The Microcontroller: I found an ESP32 development board featuring a 1.9" TFT ST7789 LCD screen (135x240) and USB-C. Does this specific board have enough available GPIO pins left for the project, considering the built-in screen already uses quite a few internally? I’m really leaning towards the ESP32 for the zero-latency performance and the built-in Wi-Fi/Bluetooth in case I want to go wireless down the road.

  4. Cabling & Breadboarding: To hook everything up cleanly without breaking out the soldering iron on day one, what type of jumper wires do you recommend (Dupont M-M, M-F?) and what size breadboard should I look for?

  5. The Motion Sensor: On top of the keypad, I want to integrate a sensor to track position in space (X, Y, Z axes) and hopefully rotation, so I can tweak my visual effects when moving the module around. What reliable, precise IMU sensor would you recommend that plays nice with the ESP32? (I've heard a lot about the MPU-6050, does that sound like the right call?).

The ultimate goal is to centralize the keypad + the motion sensor on the ESP32 and stream everything together over USB to TouchDesigner.

Thanks a ton in advance for your feedback and expert advice!

You'll need to know how the keypad works. A web search might turn up someone's efforts to reverse engineer it, or if you are lucky, the original schematic.

The Decoder It's 100% a decimal (pulse) keypad (from an S63). It has a tuning screw on the back marked 500 / 800. Since it's pulse-based, I guess I can skip the MT8870 decoder entirely and read the pulses directly with the ESP32 using interrupts, right?

Let us know what you find out!

  • Is it possible to take it apart to get at the switch matrix ?

because of the onboard facilities (display, touchscreen, SD reader, etc) in general the number of GPIOs available externally on these displays is very limited
check the hardware specification to see what GPIOs are brought out

for example, the Freenove 4inch display has the following external GPIOs

IO
GPIO35    ADC1_CH7
GPIO39    ADC1_CH3 

SPI
MOSI 23
MISO 19
SCK 18
CS 21

I2C
3.3V   red
SDA 32 black
SCL 25 yellow
GND green

UART
RXD
TXD
GND
5V

Thanks for the warning! I actually double-checked the manufacturer's pin mapping for this specific Ideaspark 1.14" board, and it turns out the onboard screen only uses 6 pins: D2, D4, D15, D18, D23, and D32. So I’m in luck there are still plenty of free GPIOs available on the sides.

Also, some good news on the hardware side: I confirmed that my vintage phone keypad is 100% a decimal pulse system (an old French HPE Bonneville unit). Because it just generates raw electrical impulses instead of DTMF tones or a matrix grid, I only need to use 2 basic digital pins to read it (one for counting the pulses via interrupts and one for the key-down state).

For the motion sensor, I can just use the standard, completely free ESP32 hardware I2C pins (GPIO 21 for SDA and GPIO 22 for SCL).

looks like the ideaspark ESP32 Development Board with 1.9-inch TFT LCD Display has plenty of GPIOs available

you could use attachInterrupt() function to generate interrupts on rising/falling edges etc and use timers or even micros() function to time events between pulses

do you have an oscilloscope to look at the signal outputs and the relationship to each other?

Counting pulses is not the issue, but how do you intend to do the key-down ?

Regardless of that, the pulse keypad is very slow. You press the key and nearly a second can pass before it has determined what key you pressed.

I would take the keypad apart a bit to see if there is a better way to hack into it.