A new Patchboard for the Maplin 5600 Synthesiser
I received an email from another Maplin 5600 synthesiser enthusiast wondering if it was possible to make a software version of the patchboard. This is
something I considered at the beginning of my project (please read my page on the Maplin 5600) but dismissed it for a couple of reasons, 1) it would
require a ridiculous amount of bi-lateral switches (900), and 2) I didn't think I had the programming skills. I then learned about a single package 16x16 matrix switch which has all the controls, switches and latches on board. Now having just completed my RPi Pico 2 upgrade to my office clocks and had gained a bit of experience in building and creating serial data streams which this IC uses, I thought it might be possible for me to do something with it.
I downloaded the datasheet and did a rough calculation of cost for the final item. First looking up the price for an IC, the AD75019JPZ, from known good suppliers such as Farnell UK are about £50 each then there is a Raspberry Pi, the cheapest is probably the PI3A+ at £24 then there is a screen, £40 - £60 and finally the rest of the PCB and components, £20. A total of roughly £300.
I also looked at Aliexpress to see if the AD75019JPZ was any cheaper which they were at around £10 each. This is a great saving and if they work and are reliable will bring the cost down to about £140 which is much more realistic.
I placed an order for just two devices and set about designing a prototype PCB. The PCB had to have at least two matrix IC's so I can test casscading (passing the data through one device to the next), the I/O and control signals brought out to edge connectors. I also considered how it could be powered. The Maplin Synth has +/-14V and 5V available and the Matrix IC requires +/-12V and 5V so I added a couple regulators to reduce the 14V to 12V..we'll see how that works..
Before I started on the PCB I worked out the configuration of matrix IC's to make up the required 30x30 matrix (it'll actually be a 32x32 matrix) so I scribbled down what I thought might work and transferred that to EasyEDA.

I also had to consider how to build it, surface mount or through hole components. Surface mount might prevent some people from building their own but through hole could make it a larger circuit board. At the moment the board size works out to be 100x100mm but it will likely require a lot more space if I have to add buffering op-amps to the switch I/O. I will need to look through the Maplin circuits to see if this is required and if it does I'll need to use sixteen quad op-amps (I'll need to research to see if I can get more op-amps per package). Through hole versions may be better so they can be easily replaced as there may be at risk of some unwanted voltages being injected.
Anyway a prototype PCB has been ordered and should be with me in a couple of weeks.

The software
There are two parts to the software, the data transmission and the graphical interface. As I said above I programmed a RPi Pico to send serial data to some Train Describer display modules that I use as clocks. That data stream is very similar to what is required for the Matrix IC, Data and a Clock. The Matrix IC requires the data to be sent and latched at a minimum clock rate of 20KHz as the shift registers are dynamic and the data would fade if it was any slower. The RPi Pico GPIO using Micro Python could barely reach 30KHz, I suspect the RPi3A would be much faster but I thought I'd look for a more reliable way to send the matrix data. So I asked AI! (first time for everything) and it pointed me in the direction of the SPI interface and the spidev library. This should get the data transfer rate up to 1Mhz, equivalent to approximately 1ms to send the entire 1024 bits which will make the system very responsive. 1024 bits as I will casscade all four Matrix IC's, each requiring 256 bits.
The graphical interface - I have built a few of these in the past, my sequencer (Python 2.7) and my Midi keyboard (Python 3)..Which one I'll base it on I haven't decided yet.
It would be nice to be able to have a screen that fits and replaces the original patchboard (120mmx120mm) but that may be tricky to find, it also needs to have a resolution that can display a 32x32 button grid clearly on the screen without scrolling and you can touch without interferring with adjacent patches. I think I'll need to do some experimentation to see how everything could fit.
Other ideas are the possibilty of saving and loading patches but that's for further into the future.
First steps with the graphical interface, I've made a small window with just two buttons for testing the new PCB. If that is successful I'll scale it up to 16x16 matrix then on to the full 32x32. Colours may change..

The prototype PCB arrived so I built it up with the power supply regulators and one AD75019 socket. I checked that the power supply voltages were correct and on the correct pins of the matrix IC.
Adding the IC I tested the switch with my small test program and then with a 2 row, 16 column version.

Amongst my untidy desk is the prototype board connected a temporary power supply and a Raspberry Pi 4. I set up 3.3V flying lead to test each input with my multimeter measuring the output. The screen shows the 2x16 test matrix display.
Next is to alter the test program to a 2 x 32 matrix so I can test the data cascading ..
And that is done!

A lot of work still to do..that is only 64 buttons, the full array is 1024 buttons - a lot of copy & paste and editing..
I also have to redesign the PCB to include op-amp buffers - 16 quad op-amps! At the moment I have changed the through-hole decoupling capacitors to surface mount as it saves a lot of space but I have kept the op-amps as through-hole so they can be put in sockets for serviceability.

The first 512 buttons programmed and tested. That's all I'm going to do with this prototype board, I'll be concentrating on the next board to get it ordered. Once that's in production I'll use the two week wait for the delivery to bring the program up to the full 1024 buttons.
I increased the PCB from 100x100mm to 120x120mm to allow for the op-amp buffers. The matrix switches on the prototype board were bi-directional but now with the buffer IC's they become directional - the signals go into the H1-32 and V1-32 are the outputs from the matrix to the synth control and signal inputs, it's easy to get mixed up here!


Back to the software..

This is my first full program. It has a 32x32 grid of pins, only a 30x30 grid is required for the synth but the new patchboard hardware is capable of a bit more so I've included the extra rows/columns for now. I've added options to save/load patches and to clear all pins.
I still have to consider labelling if any.. I could colour code either the columns or the rows to make it easier to locate patch points.
Which Raspberry Pi to use..
When I built the sequencer in 2018 (8 years ago) the Pi 3A+ and 3B+ were the top of the product line so my choice then was the 3A+ basically because it was the lite version at a lower price. Now of course there are a few more options including the Pi 4, 5 and the Pi Zero 2.
This program is probably the 'heaviest' I've written as it has to track over a thousand variables so I thought I'd see how it runs on a range of Raspberry Pi's.
The Pi's I tried are the Zero 2, 3B, 3B+, 4 and 5. It run successfully on all of them but responsiveness varies in the same order.
The Pi Zero 2 was the slowest at starting the program at 11 seconds but once loaded it performed the same at the 3B and 3B+. I used the patch screen above (an unrealistic and complex patch) to load and clear and these three Pi's all took about 4 seconds to load. The 3B and 3B+ took around 8 seconds to start the program. The Pi 4 would start the program in 3 seconds and 2 seconds to load the patch. The Pi 5 starts in less than a second and loads the patch in under 2 seconds. Just clicking a Pin is as good as 'instant on' for all them so any of these computers would do the job, for me the choice will be down to the easiest to passively cool.
From these results I still think the Pi3A+ would be the best option, it takes less power than the 3B's, 4 and 5 and therefore it'll run a lot cooler and at just £24, affordable. No heatsink required. I have just been reading that the 3A+ production was due to stop in January 2026 but has been extended until January 2030, what would be ideal is a Pi4A or 5A with 1 or 2Gb ram - I would have thought at least a 4A would have materialised in the last six or seven years!.
I just looked at the price of the Pi4 I was using and it is a staggering £158! so I've packed that away for use on another project.. the prices are a bit high for the Pi4 and 5 to be recommended. At the moment I don't have a 3A+ so I am going to recycle my 3B+ from my now defunct Pi-Top laptop so here it is running happily with just a tiny heatsink.


And a few days later I have a P3A+ to try. Even with just 512MB of RAM the timings match the 3B+ but it runs 5 degrees cooler at 28 Degrees C with no heatsink so I'm happy with that.

waiting on PCB's....