12

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!

12
  • 3
    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, 2018 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, 2018 at 11:46
  • 1
    When I was 12, I was making my own relays for building my computer. That' why I want to know if there is a very small design already there. Regarding storage, in a Harvard architecture you are right: there was no RAM for the program. But for internal calculations (data) there registers were all relay-based. Mark I and II were using this system as far as I know (I may be wrong anyway), where Mark III started to use vacuum tubes (and primitive crystal diodes) plus drum memory. Anyway, this question is only to avoid reinventing the wheel, in case there is a design that maches my goals out there.
    – nbloqs
    Aug 24, 2018 at 11:54
  • 3
    @tofro Zuse's machines did use relais for Storage.
    – Raffzahn
    Aug 24, 2018 at 12:09
  • 1
    Comments are not for extended discussion; this conversation has been moved to chat.
    – Matt Lacey
    Aug 25, 2018 at 10:42

4 Answers 4

12

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.

6
  • 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, 2018 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, 2018 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, 2018 at 11:00
  • @JeremyP: One wouldn't need very many bits of state to implement a universal Turing machine. Having more bits, or two tapes, would massively improve efficiency, but wouldn't be strictly necessary. If the machine is designed to work with arbitrary amounts of tape stored on platter reels, it could qualify as a genuine Turing machine if there were a factory that could manufacture additional platter reels of tape and splice them in as fast as the machine could process them.
    – supercat
    Nov 17, 2019 at 3:25
  • 1
    @JeremyP: According to the Wikipedia article on Universal Turing Machines, 15 states (not fifteen bits of state) would suffice to construct a Universal Turing Machine that uses a tape with two symbols, and three states would suffice for a tape that uses nine symbols (and could be encoded using four bits per symbol). In either case, a 32x6 PROM would suffice to hold the Universal Turing Machine program.
    – supercat
    Nov 18, 2019 at 16:59
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

2
  • 1
    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, 2018 at 12:18
  • A lot of pinball machines used relays with a lot more than two poles, as well as stepping and cammed timing motors. Such things are less common today than DPDT relays which have remained widely available, but if one were designing a major computer they'd be useful. Also, FYI, most 20th-Century electro-pneumatic pipe organs have many 61-pole relays in them, so even relays with large numbers of poles exist (though interestingly enough, pipe organ ones often used a tiny solenoid to switch an air valve that operated a bellows that pulled the 61 contacts.)
    – supercat
    Nov 17, 2019 at 3:32
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).

4
  • 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, 2018 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? Aug 24, 2018 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. Aug 25, 2018 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, 2018 at 2:03
1

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 ?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .