11

There are a lot of designs out there of modern home made relay computers (not just ALUs but real computers -let's call them Turing complete, although Turing complete is not enough for having an operational usable machine nowadays-)

I'm looking for the absolute minimum modern/hobby/home-made relay computer in the relay retro computers known uniserse. I will be as specific as I can, since my project is very specific:

  • By "pure" I mean no cheating with modern RAM chips, nor transistors. LEDs are acceptable (most of the designs I've seen use LEDs for output) but diode logic should be avoided. No modern oscillators.
  • At least 4-bits as the size of its data words.
  • I don't care about program word size if it's a Harvard architecture.
  • If its a machine with very small amount of data memory it does not matter (a lot of microcontrollers a few years ago used to have 32 bytes of RAM and that was enough for some applications).
  • It can even have a motorized clock (like old Harvard Mark computers, for example).
  • By minimum, I'm measuring it in relay-count.

For example, the following computers are awesome, but look at their relay counts:

  1. https://hackaday.io/project/18599-brainfuckpc-relay-computer: 800 relays, but using a RAM IC (so it doesn't count).
  2. https://hackaday.com/2012/01/16/the-tim-8-is-the-smallest-8-bit-relay-computer-ever/: 152 relays
  3. http://web.cecs.pdx.edu/~harry/Relay/: 415 relays, although also using SRAM chip.

One more thing: I don't care about the amount of poles in the relays.

So does anyone know of the smallest one of this kind of machine? (I want to build it!). Thanks!

  • 2
    Note that the first computers (no matter if they had relays, tubes, or other elements) generally used some other ways of storage (CRT tubes, mercury delay lines, drums, ...); so replacing this by SRAM instead of trying to replicate the storage method is probably fair game. Of course, you can implement storage with relays, and add this storage to all of the designs you mentioned, and the "smallest machine" would be the one with the least amount of storage, but I'm not sure if this helps... – dirkt Aug 24 '18 at 11:32
  • 1
    I don't know any historic computer that ever implemented "RAM" using relays. Most historic computers considered "RAM" equivalent to "external storage" and used punched tape, film, or magnetic devices. The first "RAM" in modern sense was implemented using magnentic core memory. On "lack of magic" in a relay: Modern relays are just black boxes, I understand your argument, but to kids, a modern encapsulated relay and a 7400 doesn't look very different. – tofro Aug 24 '18 at 11:46
  • 3
    @tofro Zuse's machines did use relais for Storage. – Raffzahn Aug 24 '18 at 12:09
  • 1
    Comments are not for extended discussion; this conversation has been moved to chat. – Matt Lacey Aug 25 '18 at 10:42
  • 1
    People are voting to close as Primarily Opinion Based. I think that there's an objective answer to this; it's well-defined. What's in question, as far as I'm concerned, is the on-topicness of this question, i.e. is it really retro? Anyone know why Primarily Opinion Based is the close reason of choice? – wizzwizz4 Aug 25 '18 at 11:56
10

How about a Turing machine implemented with relays? If I didn't miscount, there are 8 relays plus 1 relay for each bit of the state (for a total of 12 with 4-bit state).

Let's see your conditions:

  • It's Turing complete (obviously).
  • No transistors, no RAM.
  • Has small amount of memory (on the tape, no SRAM)
  • Has a motorized clock.
  • Will be hard to get below that in terms of relay count.
  • Program storage is on a punch card.

It's not a register-based machine, so the 4-bit word width applies to the state, not to some register width.

  • I marked as correct answer because I don't know of any other machine with less relays. I will double check anyway if everything works, since my intention is to build. Although it does not fit the 4-bits goal, it is looks like a good place to start. Thanks! – nbloqs Aug 24 '18 at 13:08
  • It may not be Turing complete. Only a universal Turing machine is Turing complete and it's not obvious to me that you could program a universal Turing machine with this hardware. – JeremyP Oct 31 '18 at 10:52
  • Also, technically to be Turing complete, a computer has to have limitless RAM (or an infinite tape for a real Turing machine). We tend to ignore that with modern computers, because the storage they have is large enough not to hit the limit most of the time, but this machine has a tape that is only 100 characters long, so it's really just a finite state automaton. – JeremyP Oct 31 '18 at 11:00
8

I just found this discussion and I wanted to correct a few mistakes by Jules about one of my projects, the YGREC8 (I'm the YG of YGREC).

There are many relay-based projects, look at https://hackaday.io/project/11798-relay-based-projects (but it's not exhaustive). Every project uses relays in a particular way, and by far the best choice is DPDT relays (2 coil pins and 6 signal/switch pins). YGREC8 uses SPDT and it has its own challenges, but it's still way better than SPST ! (some lost souls on Hackaday are trying and are forced to use diodes). More poles, more flexibility and creative design !

I have experimented with "CC-PBRL" : Capacitively-Coupled Pre-Biased Relay Logic : there is no diode there :-) In fact a SPDT relay acts as a multiplexer, which is one of the most powerful simple logic functions and it can emulate many other functions. This is the basis of the Actel A1xxx series of FPGA, which didn't use LUT : all the functions are implemented with MUX :-)

So far I have used diodes (old russian point-contact germanium style) only for the decoding arrays of the 7-segments hexadecimal display modules. The rest of the YGREC8 should use almost no diode, though they are necessary for certain circuits of the memory (data and program). In my experience, diodes are life-savers and they have been discovered at the end of the 18th century :-)

YGREC8 is not pipelined, though it could eventually be implemented with a 4-phases clock (thus requiring buffers at 4 stages in the datapath). It would work nicely with a single clock cycle per instruction on a FPGA (another target).

The relay count is dominated by the register set : 64 bits of data to store, with hysteretic latching (1 relay per bit), and 1 relay per port (1 write and 2 reads). That's in the ballpark of 256 relays for the whole register set, though it's more subtle than that (memory is register-mapped). The instructions are straight-forward to decode (no diode rom there ! only some ANDs to detect corner cases) and the execution units are basic so the total number would be around 700 relays, as much as the gates count of the first FPGA tests. I/O will need more and I plan a well-featured debug system.

Relays are slow and power-hungry but very fun to use and design with, they force you to think "out of the box" :-D However I doubt a 4-bits architecture would go anywhere, I have found that 8 is the first sweet spot. Early "minicomputers" such as the CDC160, used 6 and 12-bits wide data, but this might not be really convenient...

nbloqs : I hope you'll share your own design and I'd be happy to add your link to the list I mentioned in the beginning :-)

YG/whygee

  • Many many thanks for your contribution (and welcome to Retrocomputing!). My design will take time, but I will certainly share it. The HAD link looks very useful also. – nbloqs Oct 28 '18 at 12:18
7

Neither of these are quite what you're looking for, but I'm including them because I think they're worth looking at nonetheless, and I think both are more interesting than the designs you've linked already:

http://relaysbc.sourceforge.net/arch.html is a single-board computer whose CPU is implemented using 83 relays (it does have some semiconductors for interfacing and to provide RAM, however). It's 8 bits, rather than 4, so presumably could easily be beaten, and is a modified von Neumann architecture, which also makes it more complex than an equivalent Harvard architecture system would be, but with 83 relays it's very understandable.

A more capable but not-yet-finished 8 bit system is Yann Guidon's YGREC8 8-bit pipelined RISC architecture. It'll be interesting to see what it's capable of when he's finished it, but it's a very interesting project, particularly as he's designing it using a bitslice architecture ... which means that it should be possible to produce a 4-bit variant of it very simply. I'm not sure how many relay's he's expecting to use, but his estimate of the 16-bit variant was 3,000... he decided to shelve that in order to get a simpler system up and running first. It also uses semiconductor diodes in the control paths (he's effectively using the relay equivalent of diode-transistor logic) and for memory (he's building an interesting variant of DRAM that uses diodes rather than transistors in the cells).

  • Got me wondering about 'dram' made with tantalum caps and high sensitivity bipolar latching relays for the readout amplifier? It would be gloriously silly. – Dan Mills Aug 24 '18 at 21:04
  • @DanMills Now you've got me wondering--since I have always had a thing for mechanical and electro-mechanical computing machinery--how big would a capacitor have to be in order to deliver enough of a pulse of current to reliably latch the relays that you are thinking of? – Solomon Slow Aug 24 '18 at 21:51
  • 2
    The memory of the Iowa State College ABC computer (John Atanasoff and Clifford Berry, 1942) was a capacitor array wrapped around a rotating drum. It used one capacitor per bit, and the rotation brought the rows of memory sequentially into contact with the refresh (and read-write) circuitry. - To replace the ABC's vacuum tubes with relays would require a larger drum to accommodate larger capacitors, and a slower drum rotation to accommodate the relay speed. The clattering and sparking of such a contraption would be worthy of a featured appearance in a Fritz Lang movie. – A. I. Breveleri Aug 25 '18 at 1:15
  • 2
    @jameslarge: good question, perhaps ask that as a separate standalone question? Meanwhile, TIM-8 and MERCIA Relay Computer and Clicks relay computer apparently (?) use 100 uF capacitors (quite likely far larger than necessary). – David Cary Aug 25 '18 at 2:03
0

I am sorry if this message goes here (it doesn't answer your question directly) but I am totally new here and I might have misconfigured something. I have now registered this (apparently different) account. You can downvote or I can erase later :-)

We seem to be aiming in the same direction (technology-wise). The YGREC8 in SPDT version is aimed at showing kids (of all ages ;-) ) how computers work without using any software, and so they can get a "physical feeling" of what things mean. They'll love the clicking and the unusual aspect but I aim first at a VHDL/FPGA version to debug the ISA then a relay version for a large version (more expensive so I don't want to respin boards all the time).

I also work on the User Interface with the most convenient inputs and outputs that 50s technology affords. I don't want people to be scared of binary codes, so instead of toggle switches and blinking bulbs, I chose Numitron displays and rotary encoders. Look at https://www.youtube.com/watch?v=TT664Mcjypk for a short presentation of the display modules. Maybe you'll want to use them for your own system (despite the ROM made of germanium diodes, which were quite common in the 40s, for example in radar receivers on both sides). Numitrons look really cool !

I don't know if all my technical choices interest you (I don't go the the absolute minimum possible number of relays because programming would be a nightmare, like with the PIC16F family, and that would scare people) but I'd be more than happy to discuss with you and throw ideas at each others ! For example we could discuss the merits of the clock sources, either mains-derived (stable and strong, through a transformer, but often requires a frequency divider, which is another interesting type of relay circuit) or relay-based (I have played with relay-based ring oscillators).

Where do you intend to share your design ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.