Vintage Phone MIDI Controller

I happened across a pretty dirty Doro x20 push-button phone in some very 70s colours in my garage as part of a clear out and thought it might make a fun MIDI controller.  My first experiment uses a Raspberry Pi Pico (in “sawn-off” mode – see later!).

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

These are the key tutorials for the main concepts used in this project:

If you are new to microcontrollers, see the Getting Started pages.

Parts list

The Circuit

As the main aim of this project is to decode the keypad and use it to send out MIDI, the circuit will totally depend on the phone you have (and are willing to take apart).  I have a Doro X20 wired landline phone, which looks like it was probably from the 70s or 80s or thereabouts.

2021-03-29 10.18.08

The basic steps are as follows:

  • Dismantle the phone and find the keypad.
  • Work out how the keypad is wired.
  • Attach the keypad to your microcontroller (in my case a Raspberry Pi Pico).
  • Work out how to read the keypad.

I took some photos of the circuit board for my phone and then followed the tracks through to the edge connector.  Once they were traced out it was relatively straight forward to see that they mapped onto a “matrix” style set-up which means I could pretty much use my Pi Pico MIDI Matrix Decode or one of the follow-ups as my starting point.

Dismantling the Phone

My phone has all the circuitry on a single circuit board attached to the keypad via a ribbon cable, making it very easy to detach.  This hopefully means that should I change my mind I can re-attach it and get it back to being a working phone (I know it worked before I started all this, as I tried it!).

Leaving the circuit board out of the phone should mean there is plenty of space for a microcontroller.  I’m not doing anything with the handset at present, I’m just focusing on the keypad.

I’ve annotated the following photo of the keypad circuit board to help me work out how its wired up.  Here are the connections all mapped out.

Phone Keypad Decoded

You can see from the “matrix” on the right that there is some inefficiency in the pin-mapping. In fact if I connected pins 2 and 5 together, I could lose a whole row in the matrix, free up an IO pin and remove some of the spaces in the mapping.  I’ve kept it simple for now and wired it up with a one-to-one link of pins on the keypad to IO pins.

Finally, all that is needed is a way to hook something up to the keypad, so I’ve added in some jumper wires terminating in female headers as shown below.

2021-04-01 10.05.43

Adding the Pi Pico

I could have chosen any microcontroller for this one, but I have a few spare Raspberry Pi Picos so thought it would make a fun thing to do to put one inside the phone. I had everything up and running and working, but when it came to re-assemble the phone with the Pico inside, I found it was just a fraction too long to really fit.

Now at this point I had several options:

  • Break out my Pimoroni Tiny 2040, which is basically a smaller version of the Pico.
  • Try my new Adafruit Feather 2040, which is a Pico in Adafruit’s feather format.
  • Switch over to the Trinket M0 or its bigger brother the ItsyBitsy.
  • Switch over to an Arduino Pro mini or nano.

But I didn’t want to tie up one of the other 2040 boards on this, I still have plans for them; the smallest boards probably don’t have enough IO anyway; my ItsyBitsy is the more powerful M4, so again I want that for other projects; I wanted to use my MicroPython code for this first experiment, so didn’t want to jump over to Arduino straight away; and finally, I have a few spare Picos already, as they are so cheap, I can just add one on to any order I make from those that sell them…

So, as I’d just seen this article in hackaday about a neat “hack” to hack(saw) the Pico down slightly… (and confirmed it was posted on April 2nd, not April 1st) I had a look myself and thought I’d give it a go.  Sure enough, you can literally hacksaw off the last cm or so of the board and as long as you check you haven’t shorted any tracks, it works!

2021-04-02 15.28.37

I cut it off at the 5th pins up from the bottom as this still leaves me with the same “2 GPIO then GND” pattern as the original, leaving me with 8 GPIOs and two GNDs less.  The cut-point and resulting pin-out is shown below.

SawnOffPico

Phone Reassembly with Pico-Inside

It is still a bit of a squash and I’m routing power and RX/TX outside to an external MIDI module for now, but you can see it going back together below. I tried to get the LED on the Pico to line up with the hole left from the “handset button” so I get some kind of visual indication from the Pico on the outside of the phone.

I’ve hooked it up to my Hobbytronics Ready-Made MIDI Module for simplicity to give me my MIDI out.

The Code

The main code is the same as for the Pi Pico MIDI Matrix Decode but it needs adjusting to the GPIO pins associated with the keypad and then the keypad presses translated into either MIDI note events for the digits 0-9, * and #, or into MIDI controller events in the case of the other buttons.

Here is the function for the buttons:

  • Vol Up – change octave up
  • Vol Down – change octave down
  • R/Flash – change voice up or down
  • Mem/Store – change voice set up or down

Four of the buttons will send a program change MIDI message.  Two of them change the “voice sets” – in General MIDI voice terms this means changing between (for example) the Piano series to Chromatic Percussion then to Organs and so on.  Two of them select which voice in the set to select.

To get the mapping between buttons and MIDI commands I maintain a list of buttons, the contents of which can be used in a Python dictionary, for the case of the MIDI notes, and a set of if/elif statements in the case of the MIDI commands.  This can all be seen in the code for the notelist [] and midinote(x) list and dictionary.

There are now keypadOn and keypadOff functions which will eventually call the midiNoteOn, midiNoteOff or midiProgramChange functions to actually generate MIDI messages as required.

It is all detailed in the code.

Find it on GitHub here.

Closing Thoughts

This has presented the basics of getting the keypad running.  It needs some physical tidying up as having wires hanging out of the base is a little inelegant.

The next phase will be to look at the following:

  • Consider a MIDI USB set up rather than 5-pin DIN MIDI, then everything could use a single USB link.  This will probably need a switch over to Circuitpython, which has excellent USB support.
  • Incorporate the handset into the controller. It would make an excellent “wand” style interface if it can be equipped with a gyro or accelerometer or similar sensor that can determine relative position.

Kevin

One thought on “Vintage Phone MIDI Controller

  1. This blew my mind. Wish the pandemic were to go away soon to get my hands on some vintage cheap phones to fry trying to recreate this! thanks for sharing!!

    Like

Leave a comment