Driving a latching relais doesn’t sound all that complicated, and it isn’t, still, some thought is needed to get it working properly. This is what the circuit should do
(1) Accept one 5 V TTL input signal, LO signal will result in the relais switched to the rest position, HI signal to the activited position (“dash” position), the switching signals are called A and A’, for relais A.
(2) There should be an output-enable signal for all relais, to be able to de-energize the relais, because otherwise, the circuit can suffer if the relais is disconnected while powered; these latching relais only need a few 10s of Milliseconds to switch, power will be turned off, by the ATmega32L, 1 sec or so, after each switching event, just to avoid any unintentional short circuit or spike, and the positive supply line will carry a fuse.
(3) The circuit should be able to handle any common relais voltage, 5, 12, 15, 18, 24 and 28 V. The relais I am using here are 24 V rated, but work fine at 18-20 V, and up to 28 V.
(4) It must be avoided, at all cost that both the A and A’ signals are active at the same time. This can cause nasty relais oscillation, and damage/wear of the expensive relais. We don’t want to rely on software control here, because things can go wrong, during startup, program freeze, and so on.
The circuit is almost self-explanatory. The LS04 generates the complementary control signals, from the digital input. The LS373 is configured as a transparent latch, in fact, the latch function is not used, but the output control function is. If the OC input goes LO (and thus, the neg_OC high), the outputs of the LS373 will tri-state High-Z.
The output driver, a Toshiba ULN2803APG is used. These are very reliable circuits, Darlington transistor arrays with build-in diodes.
Make sure to put a good quality capacitor close to the COM pin, the return path for the snubber diodes, otherwise, the inductance of the traces will deteriorate the action of the diodes. Actually, the HP coax relais have build-in diodes, so I don’t expect and issues with voltage spikes here.
Note that the inputs of the ULN2803 have adequate resistors to ensure LO state when connected to a High-Z output; if other transistor arrays are used, the circuit might need some ~10 kOhm pull-down resistors to ensure noise immunity and defined signal levels.
The 15 kOhm input resistors serve the same purpose, they keep the relais de-energized if no logic input is connected.
This is the little board, with all space well used. Sure the logic could build using more modern devices, and I would definitely do so for a commercial device, or anything build in series, but LS logic is still popular, and it is cheap, at hand, and reliable.
That’s the setup, with the two 8673B transfer switches, and a 0.3 Hz test signal fed to the digital inputs by the brown wire shown above (removed for the picture below).
The signal at one of the contacts, 24 V drive level, 1 V per vertical DIV, 10 ms per horizontal DIV. No spikes, high voltages, or similar undesirable features are present.
After about 2000 switching events, two events per 3.3 seconds, everything is still working well, and all circuits, in particular, the ULN2803 stays cool.
As I said, not a very complex circuit, but may be useful for other purposes, and is a very cost-effective, reliable solution.