It appears that I have more relays than I planned. Like, twice more. This makes me think about how to better use them...

More relays means the possibility of a more complex system, which remains to be determined. However the current design still must be completed because the critical electrical design elements are studied. I will probably make a smaller design, with 8 or 10 bits maybe... More relays for the larger design !

Any suggestion for the use of more relays ? I have a vague idea but it might still be too ambitious...

Meanwhile, I'll play with some of these relays with the kids, during the workshops :-)

One is a stupid bug : the ring oscillator's output feeds itself and other relays. When the output relay is close, it feeds +Vcc to the capacitor and the other relays. But when it is open, the capacitor has more coils to drive and it empties faster...

A simple diode should solve this.

Now, this diode drops some voltage. I have tested the ring oscillator down to about 3.4V so 4.3V should be OK.

The clock output also feeds the pulse counter and the main CLK output. This last signal must be buffered through another relay, with the coil in series with the first counter's relay. I've added a lamp in series but I'm not sure it will actually change anything, or shine visibly. We'll see.

Fun fact : no freewheel diode is necessary because the overshoot will charge the ring oscillator's first capacitor. The changes are outlined in red.

For a 16×16 bits mulitplication (or division), 32 clock pulses are necessary. In general 2N pulses are required to calculate the product of N-bits operands. What is the most efficient design that creates just the needed number of pulses ?

Shift registers

A cascade of DFF is easy to conceptualize. The operation mode is simple:

Clear all the DFF

Apply the clock pulses to all the DFF, their data input coming from the precedent DFF's data output. Except for the very first input which is tied to logic 1.

When the pulses are sent, the shift register will be progressively filled with 1s

The last DFF will indicate that the counter has expired when the 1 reaches the end of the cascade.

Cost: 2×2N relays, or 64 SPDT in our case...

Johnson counter

This is a great enhancement to the previous system. The propagation of the 1s is recirculated after undergoing a logical inversion, which cuts the number of relays in half.

With 32 relays, 32 pulses can be generated before the state of the shift register is repeated. However the end of the cascade will see a change from 0 to 1 then back to 0. This last front must be detected with a "divide by two" circuit, adding 2 relays... so the total is 34 SPDT. Nicer but still not there...

Synchronous binary counter

In the spirit of Simon Winder's design, we can also use binary coding to create the counter. The number of gates/relays is reduced to O(log2(N)) but multiplying factors appear because there are 2×log2(N) DFF but also more gates to compute the next state, using an incrementer circuit. This circuit is described in the above video/link and in the below illustration coming from the ever useful Relay Trainer project page:

I have had difficulties with the concept of a relay ring oscillator because relays don't behave like transistors. With this kind of inverting gates, you just use odd numbers of gates with capacitors and that's it.

For relays it must be different. The trick is to use only one inverting gate (at the right) which is normally closed (N.C.). The others are non-inverting gates (N.O.) which add more delay.

It's going to be pretty clickety and remove concerns about bounces on the contacts. It can also control frequency and duty cycles easily, by adding more delay gates, making a more efficient overall design. For example it can generate a clock signal with 1/4 duty cycle, so the series lamp gets turned on during less time, consuming less and allowing faster operation.

Update (20160509): it works !

It is difficult to record the sound, I hope you can hear it.

With 3×(3300µF/22Ω), the clock period is around 600ms, or 1.6Hz, which is reasonable (not too fast, not too slow).

I noticed only now some details I didn't see before: these 3V relays are rated for 150V 100mA max. (under which conditions ?)

Given that it takes 60mA to energise one coil, the amplification coefficient is barely 2 and the design expects more.

It was a good idea to connect coils in series wherever possible. Control signals still require a large fanout and I'll probably have to implement a 2-levels signal tree (with repeaters for each nibble or two).

Given the current handling, it would have been wiser to opt for a higher coil voltage, which reduces the required current, thus a better amplification factor.

I replaced the resistor with one of the lamps and the result is pretty interesting, even though less reliable than with 10 Ohms.

The frequency is lower, like 3Hz instead of 13Hz. The lamp slows the charge down as it warms up, but the resistance increases with the temperature. It's a fragile balance and often the system gets stuck in micro-oscillations, due to bouncing.

Using the thermal delay is attractive because it is both "visually explicit" and takes less room. I'll be thinking about it while sleeping ;-)

3300µF was what I had easy access to, I wanted to make a ring oscillator so I looked for 3 identical high-valued electrolytic capacitors and they looked nice.

I get about 12Hz. The frequency is affected by the series resistor, which I had to reduce in order to keep a stable oscillation because it doesn't start up quiclky.

I initially started with a safe value of 47 Ohms because the coil is 35 Ohms but it didn't work well. It was a bit better at 22 but 10 Ohms keeps oscillating at 4V. The inrush current is in the order of 400mA... (coil dropped below 1V, Vcc=5V, I=(5-1)/10=0.4A)

Maybe I should add a lamp in series to keep it running ?

Anyway, with 10 Ohms, the charging pulse lasts about 10ms, with 65ms of discharge.

That's about 1/75ms=13Hz.

Zooming in the charging pulse, I can see strong ringing...

No wonder my frequency meter was confused !

More action on youtube:

20161107: Oh yeah, the inrush current is 4× the rated 100mA current... No wonder it doesn't work well.

I'm about to make a longer ring oscillator usign PBRL to test the endurance, this will limit the current and check the speed up to 50Hz...

I wired one, it clicked once and then nothing. Maybe this is a quality problem so I changed it and made it vibrate a bit without capacitor. It made a little whine and it looked OK. Adding 330µF made it sound a bit weird but it only lasted a few seconds : the relay's contact is shut off now.

Why ?

Maybe this is a problem with current limitation. This hypothesis can be tested by adding a resistor in series with the contact. I have to understand quickly because I've already broken 2 relays...

It seems that a larger capacitor, a 100nF cap across the contacts and a 47 Ohms resistor in series work. However the working voltage is too high (at the very least 5.5V) so I'm changing the design and I start a ring oscillator with 3300µF. This will allow me to tightly control the pulse lengths and sequencing.

So I finally have time to test how a pair of relays behave when in series with one lamp.

There are many things to notice, most obviously that there is a strong hysteresis due to the contacts and the thermal capacity of the filament. Another thing I suspected is that all relays have their own threshold voltage and I'll have to build some "margin"...

Voff

Von

Relay1

6.73

7.47

Relay2

3.63

3.70

I wired the relays in series so I can't actually tell which one turns on, but they need 7.5V to both turn on, and < 3.6V to turn off (that's a ratio of 2).

But these measurements were done at a very low speed, giving the filament time to heat or cool. The relays both turn on at 4.4V when their coils are switched instantaneously. However you need to wait 2 seconds for the filament to cool, before applying another pulse that works again.

A capacitor in parallel with the lamp can increase the frequency but I must see what I have in stock. I don't have enough electrolytics, I hope ceramics will do.

It looks like 5V might be a decent working voltage, a good compromise between speed and availability of the PSU.

I see already that the control pulses must have a low duty cycles. This should reduce the time to heat the filament, so the latch masters' relays should be "normally" connected to the input, and transfer the capacitor's charge to the output during the short pulse. This is because the capacitor will take some time to charge through the resistor. OTOH it will discharge instantly through the coil of the slave relays.