For most of the relays it doesn't matter much: they need to have 12V coil, 720 - 960 ohms, 2A contacts. The main risk is whether or not they all work (in case these cheap relays don't have a good final test).
For the 13 holding relays, the main criteria is manufacturing consitency, so that the holding current is consistent. Take a look at the end of this:
Just to be exact which relays are the 13 holding relays? I believe they are: K1, 2, 4, 5, 7, 8, 10, 11, 70, 78, 79, 80, 81. I just want to make sure, so that I can install my 13 "sorted/tested" relays in the correct locations.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Joe, have you done further experimenting on holding resistance for other batches of relays?
By "drop-out voltage", do you mean the "Release Voltage" given on the spec sheets?
Why do you suspect that 1.2v release voltage parts are likelier to fit your design? Because they are maybe built to tighter tolerances in the spring part, or because the voltage range is better somehow, or because the different relays at different bit positions in the register wind up having more consistent on/off times?
I am thinking of experimenting with a reduced version of your relaysbc design, on 2 large breadboards. I wonder if using 5-volt-coil relays could interface directly with the semiconductor shift registers with fewer buffers. Would using 5-volt-coil parts be harder to apply in this design for flipflops? Lots of parameters in the relays seem to directly scale with their rated voltage, so most things may scale without overall change. But the diodes' voltage drop would not change, and take away relatively more of the 5v swing than in the 12v design.
I also wonder about using reed relays, for a 10x faster cpu, or ice-cube relays for louder clickety noise and visual appeal. Or maybe mixtures of types.
At Mouser, some parts are described as having DIP pins (maybe with pre-applied solder-friendly finish?). Other parts are described as being plug-in with the same mechanical dimensions. I wonder if both variants are equally useful in a solderless breadboard, or in dip sockets, or in direct soldered connections.
Thanks for sharing such a neat design!
Last edit: Duane Sand 2018-11-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Pull-in and Release (Drop out) voltage on relays' datasheets are really wide to cover every relay produced in a family over all operating conditions. These specs are not really useful when implementing Joe's latches... Binning relays to work with a specific hold resistor for the latches and then using the rest for the other logic seems like a good strategy and to that end I built a relay tester yesterday that uses a programable current sink to measure all of the relay timing and current parameters.
Reed relays will be a tough go as there are not a lot of DPDT reed relays and they can be quite expensive, i.e. on the order of $10+ per unit. As far as speed goes, you could probably only double the speed over the traditional relays: Axicom DPDT On/Off = 5/3mS, typical reed On/Off = 2/2mS. Another problem with reed relays that does not show up (Obviously) in the datasheets is that an impulse current through the contacts can actually counteract the coil generated magnetic field causing them to chatter.
DIP relays (Dual InLine Package) typically have tin plated leads and are sized to fit in DIP IC sockets. These are the same footprint as a 16 pin DIP IC.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was intrigued by reed relays by their speed and small size. But as you say, almost all are SPST and so not practical for computer logic. And it is expensive to get ones that are shielded against magnetic perturbations from nearby relays. Also, I guess any computer running faster than 20 cycles/sec would be too blurred to visually appreciate.
The current generation of signal relays are all fully sealed in an ugly opaque housing. Good for keeping contacts clean and running a long while. But as something to show to kids, I want visible mechanical movement, not just the noise and LEDs. I also want to avoid soldering or PCBs as long as possible, so I wanted ice cube "semi sealed" relays that fit into breadboards without sockets. That narrowed down the candidates quite a bit.
On EBay I came across a sale of Omron G5A-237P relays, $25 for a likely-virgin 25-pc lot, from someone in USA. These fit into a 6 x 4 footprint on 0.1" grid breadboard, and straddle the 0.3" gap on breadboards. These are 5v, 125ohm, 200mW coils. That part# is obsolete and was dropped by Omron and major distributors long ago. I don't know if this is leftover stock or is zombie counterfeit. Doesn't look like rejects, they come in a proper fitted tray. I hadn't decided yet between 5v and 12v. This looked like a good but transient opportunity. So I've ordered two lots, 50 relays total.
I don't yet have an oscilloscope or other ways of doing timing measurements. But from your binning experiments it looks like I'll merely need to manually find on/off resistance via a pot in a test circuit, then measure the pot with a meter.
If this ever gets as far as being in some museum display, It would be fun to generate the clock pulse train via a hand crank.
Last edit: Duane Sand 2018-11-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know what you mean by the visual appeal. I was 5 or 6 when my family went to Disneyland and there was a relay computer there that you could play against in a game of Tic-Tac-Toe. They built it with big open relays in a clear enclosure where you could actually see (And hear) the computer working out its next move. I think this was a Bell Labs installation in tomorrowland.
😄
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The carry flag latch on my second board would not work at room temp (~22C) but would work at about 10C warmer: The board would not reliably run code where the carry flag was tested when first switched on but would be OK after a while. I eventually just wrote a 3 line program that would set and clear the flag and then loop so that I could observe the change in behaviour real time. You can see the failure begin in the video when the cary lamp pulses shortly vs being on for the entire clock period. (For the video I warmed the relay with a lighter and then let it cool down.)
The problem is that the holding current with a 2K hold resistor was not high enough when cold to latch the relay in the energized state.
The coils of the relays I have have a 5ohm/DegC tempco which would imply higher holding current supplied by the holding resistor with lower temperatures but the holding current required actually increases faster than the resistance change can supply which I suspect is due to the increased stiffness of the return spring at lower temperatures. I don't suspect the permeability as the issue as this usually has a negative tempco. I'll be able to verify this when I run an opened relay where I can change the temperature of the spring vs cooling/heating the entire relay body which changes many variable at once.
So that I can tune the relays for my unit I built a tool that measures relays quickly for the following characteristics: Pull-in time, Release time, Pull-in current, Release current and resistance. I should be able to tune the flip flops individually in about 5 seconds per unit once I plug in an expected performance vs temperature function.
Just ran through my relays with the new tester and put the first ones that were 2.25mA hold current or below in the latch positions and only had to go through about 2/5 of the 83 to fill those 13 slots. Total test time was about 5 minutes.
Re-ran the carry flag test and the computer runs reliably with the carry relay down to 0C and up to 50C (Didn't want to go lower or higher than that).
There is a definite correlation to winding resistance vs pull in current which makes perfect sense: The current lost by having a higher resitance coil is more than made up for by the increased magnetic flux produced by the extra turns. The selection criteria then can be either high resistance or low current, but current is the best choice as that relates directly to the ability of the holding resistor to do it's job.
Just got 91 relays from MPJA for $0.99 per unit. These are 200mW 720 ohm coil relays. By using my relay tester to sort them by holding current I was able to replace all the axicom relays with the new parts and run the computer without changing the 2K holding resistors. No change in performance over 25C +/-25C temperature range.
I can get these down to $0.30 per unit with very little effort.
That is great, that you found a way to bin the parts, and an attractive alternative, and it now works at full room temp range.
I was interested in the very cheap Hui Ke relays on EBay, until I saw that nearly every product photo showed bent pins, and a review saying the sealing was incomplete and some DOA. So likely all factory rejects, and maybe just as inconsistent inside. Your MPJA supplier is likely getting parts the factory believed were good. It will be fun to also see your tester results on a $0.30 batch.
I am surprised that the source of (non-temperature) variability in the Axicom and Hui Ke relays was in the coil windings, not the spring. I assumed that the coils were wound by a fully-automatic machine with a precise count of # turns. So it was plausible that the spring tension was less controlled than that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I really think the variability is a result of all of the factors so I still want to do some testing on opened up relays where I can measure each aspect individually.
For instance, if you look at the graph which is sorted by holding current, the release time is inversely proportional to holding current which points directly to spring tension as the variable for this population. Note that pull-in current is shown to be less dependent on spring tension because in the open position the tension will be minimal and the start of the closing will depend on the more easily controlled armature air gap with and exponentially increasing (Posistive feedback) magnetic force as the armature moves toward the pole piece.
As far as the MPJA relays go, they were 100% operational: Even though they deal in surplus I have had a very good experience with the quality of their parts.
The $0.30 units are not surplus but factory production product from one of my Chinese suppliers.
In case anyone wants to do their own analysis, I have attached the source data collected from the fixture.
The spreadsheet's calculated coil resistance values are all within 5-6% of each other, within the margin of measurement error. Maybe the coil windings are very consistently made. Whereas the differences between min and max Pull-in V or I is 30%, and the differences betwen min and max Release V or I is 85%.
If spring tension is the issue, I would expect Pullin and Release volts to be positively correlated. Ie a stronger spring would make work work for the coil magnet to pull against, leading to the pull-in connection happening later at a HIGHER voltage, AND also the release de-connection happening earlier at a HIGHER point in the falling voltage. But I don't see evidence of that yet. I'm trying to make a scatter plot showing both voltages for each relay, but I have no Excel skills.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Pullin current is not expected to be as clearly correlated to spring tension as would be release current because the spring in the off state is at its minimum tension and the current to attract the armature is so high relative to what is required to hold the contacts closed that once the armature starts to move the magnetic force is multipled by an ever decreasing distance. Release current however measures the balancing act between armature magnetic holding force and the contact spring trying to pull the contacts open.
Note that where pullin and release current are tested as shown in the attachment using a programmable current sink, timing is tested using an on/off switch to ground with a 100uS timing loop.
You'll note there are the added components over the link provided: The 10K from the sense resistor to the negative input and the 10nF cap from the output to the negative input. The 10K increases the impedance of the feedback path to allow the capacitor to provide AC negative feedback. This is especially useful when driving an inductive load to prevent the output (At the relay) from oscillating.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I haven't tried either of the two relays. It is possible they could work, but you would potentially need to do some testing/sorting of them to get a reasonably matched set of them for the 13 holding relays. It is possible that you would need a different value holding resistor for them. John Taylor sent me a small testing fixture and software to screen relays, it definately helps in selecting and verifying relays. Unfortunately I haven't been able to communicate with John Taylor since January 2019, I don't know why. John has done a lot of testing of various relays.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
EEVBLOG had an episode on a Chinese distributor LCSC.COM. I notice they have ultra cheap DIP relays, would be interesting to try them:
https://lcsc.com/product-detail/Relays_HFD27-012-S_C13466.html
What are the design criteria around the relays? Can we characterize a relay in a breadboard before trying it on the trainer?
For most of the relays it doesn't matter much: they need to have 12V coil, 720 - 960 ohms, 2A contacts. The main risk is whether or not they all work (in case these cheap relays don't have a good final test).
For the 13 holding relays, the main criteria is manufacturing consitency, so that the holding current is consistent. Take a look at the end of this:
http://relaysbc.sourceforge.net/devlog.html
The holding resistors can be adjusted to match the relays, but the relays need to be consistent.
Just to be exact which relays are the 13 holding relays? I believe they are: K1, 2, 4, 5, 7, 8, 10, 11, 70, 78, 79, 80, 81. I just want to make sure, so that I can install my 13 "sorted/tested" relays in the correct locations.
Joe, have you done further experimenting on holding resistance for other batches of relays?
By "drop-out voltage", do you mean the "Release Voltage" given on the spec sheets?
Why do you suspect that 1.2v release voltage parts are likelier to fit your design? Because they are maybe built to tighter tolerances in the spring part, or because the voltage range is better somehow, or because the different relays at different bit positions in the register wind up having more consistent on/off times?
I am thinking of experimenting with a reduced version of your relaysbc design, on 2 large breadboards. I wonder if using 5-volt-coil relays could interface directly with the semiconductor shift registers with fewer buffers. Would using 5-volt-coil parts be harder to apply in this design for flipflops? Lots of parameters in the relays seem to directly scale with their rated voltage, so most things may scale without overall change. But the diodes' voltage drop would not change, and take away relatively more of the 5v swing than in the 12v design.
I also wonder about using reed relays, for a 10x faster cpu, or ice-cube relays for louder clickety noise and visual appeal. Or maybe mixtures of types.
At Mouser, some parts are described as having DIP pins (maybe with pre-applied solder-friendly finish?). Other parts are described as being plug-in with the same mechanical dimensions. I wonder if both variants are equally useful in a solderless breadboard, or in dip sockets, or in direct soldered connections.
Thanks for sharing such a neat design!
Last edit: Duane Sand 2018-11-17
Pull-in and Release (Drop out) voltage on relays' datasheets are really wide to cover every relay produced in a family over all operating conditions. These specs are not really useful when implementing Joe's latches... Binning relays to work with a specific hold resistor for the latches and then using the rest for the other logic seems like a good strategy and to that end I built a relay tester yesterday that uses a programable current sink to measure all of the relay timing and current parameters.
Reed relays will be a tough go as there are not a lot of DPDT reed relays and they can be quite expensive, i.e. on the order of $10+ per unit. As far as speed goes, you could probably only double the speed over the traditional relays: Axicom DPDT On/Off = 5/3mS, typical reed On/Off = 2/2mS. Another problem with reed relays that does not show up (Obviously) in the datasheets is that an impulse current through the contacts can actually counteract the coil generated magnetic field causing them to chatter.
DIP relays (Dual InLine Package) typically have tin plated leads and are sized to fit in DIP IC sockets. These are the same footprint as a 16 pin DIP IC.
Thanks John!
I was intrigued by reed relays by their speed and small size. But as you say, almost all are SPST and so not practical for computer logic. And it is expensive to get ones that are shielded against magnetic perturbations from nearby relays. Also, I guess any computer running faster than 20 cycles/sec would be too blurred to visually appreciate.
The current generation of signal relays are all fully sealed in an ugly opaque housing. Good for keeping contacts clean and running a long while. But as something to show to kids, I want visible mechanical movement, not just the noise and LEDs. I also want to avoid soldering or PCBs as long as possible, so I wanted ice cube "semi sealed" relays that fit into breadboards without sockets. That narrowed down the candidates quite a bit.
On EBay I came across a sale of Omron G5A-237P relays, $25 for a likely-virgin 25-pc lot, from someone in USA. These fit into a 6 x 4 footprint on 0.1" grid breadboard, and straddle the 0.3" gap on breadboards. These are 5v, 125ohm, 200mW coils. That part# is obsolete and was dropped by Omron and major distributors long ago. I don't know if this is leftover stock or is zombie counterfeit. Doesn't look like rejects, they come in a proper fitted tray. I hadn't decided yet between 5v and 12v. This looked like a good but transient opportunity. So I've ordered two lots, 50 relays total.
I don't yet have an oscilloscope or other ways of doing timing measurements. But from your binning experiments it looks like I'll merely need to manually find on/off resistance via a pot in a test circuit, then measure the pot with a meter.
If this ever gets as far as being in some museum display, It would be fun to generate the clock pulse train via a hand crank.
Last edit: Duane Sand 2018-11-26
I know what you mean by the visual appeal. I was 5 or 6 when my family went to Disneyland and there was a relay computer there that you could play against in a game of Tic-Tac-Toe. They built it with big open relays in a clear enclosure where you could actually see (And hear) the computer working out its next move. I think this was a Bell Labs installation in tomorrowland.
The carry flag latch on my second board would not work at room temp (~22C) but would work at about 10C warmer: The board would not reliably run code where the carry flag was tested when first switched on but would be OK after a while. I eventually just wrote a 3 line program that would set and clear the flag and then loop so that I could observe the change in behaviour real time. You can see the failure begin in the video when the cary lamp pulses shortly vs being on for the entire clock period. (For the video I warmed the relay with a lighter and then let it cool down.)
The problem is that the holding current with a 2K hold resistor was not high enough when cold to latch the relay in the energized state.
The coils of the relays I have have a 5ohm/DegC tempco which would imply higher holding current supplied by the holding resistor with lower temperatures but the holding current required actually increases faster than the resistance change can supply which I suspect is due to the increased stiffness of the return spring at lower temperatures. I don't suspect the permeability as the issue as this usually has a negative tempco. I'll be able to verify this when I run an opened relay where I can change the temperature of the spring vs cooling/heating the entire relay body which changes many variable at once.
So that I can tune the relays for my unit I built a tool that measures relays quickly for the following characteristics: Pull-in time, Release time, Pull-in current, Release current and resistance. I should be able to tune the flip flops individually in about 5 seconds per unit once I plug in an expected performance vs temperature function.
Well that was easy...
Just ran through my relays with the new tester and put the first ones that were 2.25mA hold current or below in the latch positions and only had to go through about 2/5 of the 83 to fill those 13 slots. Total test time was about 5 minutes.
Re-ran the carry flag test and the computer runs reliably with the carry relay down to 0C and up to 50C (Didn't want to go lower or higher than that).
There is a definite correlation to winding resistance vs pull in current which makes perfect sense: The current lost by having a higher resitance coil is more than made up for by the increased magnetic flux produced by the extra turns. The selection criteria then can be either high resistance or low current, but current is the best choice as that relates directly to the ability of the holding resistor to do it's job.
After selecting out the relays with the tester, I put the whole thing in my freezer: It runs perfectly when crusted with frost!
Just got 91 relays from MPJA for $0.99 per unit. These are 200mW 720 ohm coil relays. By using my relay tester to sort them by holding current I was able to replace all the axicom relays with the new parts and run the computer without changing the 2K holding resistors. No change in performance over 25C +/-25C temperature range.
I can get these down to $0.30 per unit with very little effort.
Cool, this is great. What are the part number of the relays you found?
Nevermind, I see the part number in the PDF
Last edit: Francis Bauer 2018-11-25
That is great, that you found a way to bin the parts, and an attractive alternative, and it now works at full room temp range.
I was interested in the very cheap Hui Ke relays on EBay, until I saw that nearly every product photo showed bent pins, and a review saying the sealing was incomplete and some DOA. So likely all factory rejects, and maybe just as inconsistent inside. Your MPJA supplier is likely getting parts the factory believed were good. It will be fun to also see your tester results on a $0.30 batch.
I am surprised that the source of (non-temperature) variability in the Axicom and Hui Ke relays was in the coil windings, not the spring. I assumed that the coils were wound by a fully-automatic machine with a precise count of # turns. So it was plausible that the spring tension was less controlled than that.
I really think the variability is a result of all of the factors so I still want to do some testing on opened up relays where I can measure each aspect individually.
For instance, if you look at the graph which is sorted by holding current, the release time is inversely proportional to holding current which points directly to spring tension as the variable for this population. Note that pull-in current is shown to be less dependent on spring tension because in the open position the tension will be minimal and the start of the closing will depend on the more easily controlled armature air gap with and exponentially increasing (Posistive feedback) magnetic force as the armature moves toward the pole piece.
As far as the MPJA relays go, they were 100% operational: Even though they deal in surplus I have had a very good experience with the quality of their parts.
The $0.30 units are not surplus but factory production product from one of my Chinese suppliers.
In case anyone wants to do their own analysis, I have attached the source data collected from the fixture.
The spreadsheet's calculated coil resistance values are all within 5-6% of each other, within the margin of measurement error. Maybe the coil windings are very consistently made. Whereas the differences between min and max Pull-in V or I is 30%, and the differences betwen min and max Release V or I is 85%.
If spring tension is the issue, I would expect Pullin and Release volts to be positively correlated. Ie a stronger spring would make work work for the coil magnet to pull against, leading to the pull-in connection happening later at a HIGHER voltage, AND also the release de-connection happening earlier at a HIGHER point in the falling voltage. But I don't see evidence of that yet. I'm trying to make a scatter plot showing both voltages for each relay, but I have no Excel skills.
Pullin current is not expected to be as clearly correlated to spring tension as would be release current because the spring in the off state is at its minimum tension and the current to attract the armature is so high relative to what is required to hold the contacts closed that once the armature starts to move the magnetic force is multipled by an ever decreasing distance. Release current however measures the balancing act between armature magnetic holding force and the contact spring trying to pull the contacts open.
Note that where pullin and release current are tested as shown in the attachment using a programmable current sink, timing is tested using an on/off switch to ground with a 100uS timing loop.
Thanks
The op-amp portion of your tester was black magic to me, then found a nice explanation of "programmable current sink" at https://electronics.stackexchange.com/questions/144285/programmable-current-sink
You'll note there are the added components over the link provided: The 10K from the sense resistor to the negative input and the 10nF cap from the output to the negative input. The 10K increases the impedance of the feedback path to allow the capacitor to provide AC negative feedback. This is especially useful when driving an inductive load to prevent the output (At the relay) from oscillating.
Has anyone tried the cheap relays Joe mentioned at the top of this discussion?
https://lcsc.com/product-detail/Relays_HFD27-012-S_C13466.html
Here is another really cheap relay which may be suitable:
https://lcsc.com/product-detail/Relays_HRS2H-S-DC12V-N_C60087.html
I haven't tried either of the two relays. It is possible they could work, but you would potentially need to do some testing/sorting of them to get a reasonably matched set of them for the 13 holding relays. It is possible that you would need a different value holding resistor for them. John Taylor sent me a small testing fixture and software to screen relays, it definately helps in selecting and verifying relays. Unfortunately I haven't been able to communicate with John Taylor since January 2019, I don't know why. John has done a lot of testing of various relays.