How to drive РЭС15 relays with a computer ?

A project log for YGREC-РЭС15-bis

YG's 16bits Relay Electric Computer, rebooted

yann-guidon-ygdesYann Guidon / YGDES 04/13/2017 at 07:187 Comments

The last log 10. Electromechanical User Interface : the Assembler board raises an interesting and important question : how can I control the relay-based computer with something like a Raspberry Pi ?

I'd like to control and spy on the machine with a modern computer, replace the DRAM and the PROM with user-controlled modules that emulate them with SRAM, write or read registers, see the result of instructions, upload and save programs...

I need to interface hundreds of signals from a 3-6-12-24V system (requiring 60mA drive currents) with the meek 3.3V CMOS GPIOs of today's generation.

The last log implied that the instruction bus would "switch the high side". I already have the signal distribution paths figured out but I didn't think too much about the most favorable direction of the data signals. I just assumed the sense coils to be wired to 0V and the data coming from +Vcc. Simple.


Then the building of the Assembler board made me reconsider my assumptions because I would like to "upgrade" the board to add a shift register that takes over the switches.

All the practical electronic/IC solutions I could find are referenced to GND and "switch the low side". The sense relays require some significant current (60mA without prebias). In particular, this part is very well suited to the task:


This obsolete chip is a 16-channel constant-current sink LED driver in 24-pin DIP. It runs up to 20MHz with 3V-5.5V logic supply but can sink up to 80mA per channel (20V maximum on the pins). I need 1 and half to drive the instruction sense relays... From the lower side.

I have already wired the diodes of the switches for high-side, I can change them. But the ROM and PROM boards already have some parts in stock, that are meant for high-side switching !

The solution comes again from exdwh's store !

Isn't this cute ? Inside the KOA DN5Q24T, you'll find 36 diodes !

DN5 diode network

That's a big jump from the previous 2 diodes per package...

The even funnier thing is that you can configure it however you want, with low side or high side: just connect the appropriate common rail to the proper voltage. The circuit is also (almost) symmetrical so a single footprint/PCB can accomodate both uses, just solder the package in the appropriate direction ! (ooooops I realise now it's a miroring and not a rotational symmetry)

The leakage is too high and the voltage rating too low to help with DRAM. But if the voltage is kept low enough (less than 7V) this is totally suitable for the PROM boards, as the current is just enough and the spikes shouldn't last long enough to damage the diodes.

Now, I must find a way to increase the sense coils' sensitivity...

The current and voltage can be reduced with a switched capacitor cell which is almost the same circuit as the typical latch.

The sense coils become "instruction register" (using no less than 3 caps, 3 relays, 3 resistors).


This is interesting because the capacitor switching can be controlled by the same clock as the register set (when enabled). This creates some pipelining, which makes scheduling more interesting... there is a fetch during exectution.

Very interesting.


K.C. Lee wrote 04/16/2017 at 12:56 point

 "SPI high side driver" is probably what you'll need.  SPI is high bandwidth enough for the high I/O, and yet few enough pins that reduces the number of level shifting.  Also consider running the relays at negative supplies if you want to avoid level shifting the SPI.  This also let you use NMOS.  I built a VFD driver that way using CPLD for large I/O count.

I was laying out a discrete one with HC595, 8 SOT23 PMOS and passive pull down on a SIP, but lost motivation.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 04/16/2017 at 17:23 point

I wanted to reduce the parts count, and I hadn't planned for the external digital control from the beginning, it came a bit late in the game... I didn't want to solder 24+ discrete transistors and cram them like crazy. An integrated circuit made more sense.

For the negative voltage, well that's an idea worth considering, thanks ! however it might just confuse me even more as I have the voltage scheme in my head already with 0-3.3-6.6-12V and changing this increases the risks of errors.

So I just inverted the current flow on the instruction bus.

I need to sketch more diagrams and write more logs...

  Are you sure? yes | no

K.C. Lee wrote 04/17/2017 at 01:27 point

If you are using proper high side driver chips with built-in level shifting, then It is kind of moot to consider negative rails.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 04/17/2017 at 02:11 point

I haven't found high side drivers. I have a few MOSFET drivers but they are one or two outputs per 8-pins chips, so I'd need 12 or 24 of them. 

I have PMOS but no suitable IC with open collector output (only global output enable).

The STP16DP05 is a convenient solution that I have adopted. I don't know PMOS versions of this, and now it's pointless anyway :-)

  Are you sure? yes | no

K.C. Lee wrote 04/17/2017 at 03:14 point

  Are you sure? yes | no

Eric Hertz wrote 04/16/2017 at 11:19 point

Very interesting.

  Are you sure? yes | no