Using TQ2-L2 relays

From HBRC WIki

Jump to: navigation, search

Contents

What's a latching relay, and why would I want one?

An ordinary relay has two positions, energized and unenergized. When there is no current flowing in the relay coil, the unenergized relay goes to it's default position. Normally Open (N.O.) contacts will be open, and Normally Closed (N.C.) contacts will be closed. To throw the relay, it must be energized by a continuous flow of current through the control coil.

A latching relay has a mechanical memory. It mechanically "latches" into either the open or closed position. This means that you only need to pulse the coil to throw the relay to the opposite position, and it will latch there. While latched, the coil consumes no power whatsoever -- so you can see how this can be a great way to save battery life in situations that call for a relay.

Latching relays come in two flavors: single coil and dual coil. A single coil relay has one coil that must be directionally energized with a voltage of the appropriate polarity to throw the relay. A positive pulse will latch the relay in one position, and a negative pulse will latch it in another position.

Dual coil relays have two (supposedly) independent coils. One coil latches the relay in one position, and the other coil latches the relay in the other position. We'll see how the NAIS dual coil relays almost, but don't quite, follow this simplified description.

The NAIS TQ2 series relays

If you go to Digi-Key and search on "TQ2" a whole bunch of relays will come up. You can reach the data sheet .pdf from any of them, I've been using the TQ2-L2-4.5V relay so if you want to simplify things just go there and download the data sheet. You can have a look at the product photo, too, while you are there.

The TQ2 comes in various flavors, non-latching, latching, DPDT, 4PDT, single- and dual-coil, and with various coil voltages. TQ2-L2-4.5V means: Latching, dual coil, 4.5V nominal coil voltage.

Using the TQ2-L2 dual-coil latching relay

So, now the fun part starts. The NAIS (Panasonic) TQ2-L2 has two coils. You might assume they are completely independent. You would be wrong. You might assume that the polarity of the applied coil voltage doesn't matter. Again, *bzzzzzt*, thank you for playing.

It turns out that the polarity of the coil matters. In fact, you can use the TQ2-L2 as a single coil latching relay if you like. Simply use a single coil as the control coil, and pulse with correctly polarized current pulses. In any case, if you use the relay as a dual coil relay, make sure the pulses use congruent polarity.

For the TQ2-L2, pins 1 and 10 are marked '+' and pins 5 and 6 are marked '-'. The N.O. and N.C. outputs of the relay will only give you what you expect if you follow that polarity. Otherwise, the sense of the relay will be reversed.

According to my experiments, the relay functions perfectly fine if you use pins 1 and 10 as the '-' end of your control pulses, just remember than N.O. and N.C. outputs will be reversed. Do NOT mix polarities. The relay simply sits and quivers. If Pin 1 is the positive end of coil one, make sure pin 10 is the positive end of coil two.

According to my Ohmmeter, the coils appear isolated. In theory, you would expect to be able to energize the two coils of a dual-coil latching relay from drivers in different ground regimes (a.k.a. different power supply domains). I have not yet conducted an experiment to see how far apart the voltage of the ground end of the two coils can be before something bad happens.

To be continued....

Armature is Magnetized

The coils probably are electrically not connected to one another. However, the armature inside the relay is probably permanently magnetized at the factory. Thus, running current in correct direction through coil1 attracts the armature and running it in the other direction repells the armature. Likewise for coil2.

The advantage of a 2 coil relay is that it only needs two clamping diodes rather than 4 clamping diodes to operate.

For a 1 coil relay, two bits from an output port are connected to each side of the coil. Setting both bits high or both bits low corresponds to no current flow. Setting one bit high and the other bit low corresponds to current flow. When current is turned off, the inductive nature of the coil causes a voltage spike that will eventually kill the controlling microcontroller. This spike is clipped using two diodes on each side of the coil. For a given side, one diode is hooked to ground to nuke negative voltage spikes and another is hooked to the positive power supply to nuke positive voltage spikes.

For a 2 coil relay, two bits from an output port are connected to each coil. The other end of the coil is connected to ground. Two activate the coil, the pin is strobed high; otherwise, the pin is left low to keep the current off. In order, to prevent the coil inductance from producing a voltage spike that will kill the the microcontroller, a diode is hooked across the coil pins.

A 2 coil relay allows for independent activation and deactivation of of the relay from more than one source. Thus, one coil can be turned on (or off) from a manual on/off switch and the other can be controlled from a microcontroller.

Personal tools