I am building a simple engage/bypass switch for musical (e.g. electric guitar) effects. The signal switching will be done by a single coil (bistable) latching relay, such as the Panasonic TQ2-L-5V. The user interface is a momentary SPST footswitch. Between the footswitch and the relay is small microcontroller (e.g. ATtiny13), which is responsible for recognizing the switch press, and in turn toggling the relay state (and a status indicator LED).
The single coil (bistable) latching relay works by applying a short current pulse (e.g. 3ms) at a specified voltage (e.g. 5v in the case of the TQ2-L-5V). The direction of the pulse is used to distinguish desired relay state (i.e. if the relay is "on" or "off").
There are examples of this available on the web, e.g:
My concern with these kinds of circuits is that the microcontroller's IO pins are direct-connected to the relay coil. Here is a simplified schematic:
+------------------+
| microcontroller |
+------------------+
| |
gpio-1 gpio-2
| |
| |
+--[relay coil]--+
Basically, to set the relay to one state, gpio-1 goes high, and gpio-2 goes low for a short duration. And vice-versa to set the other state.
The question is, should additional circuitry be added to protect the MCU from effects of the relay coil's collapsing field? For example, an H-Bridge?
This circuit certainly works. I have successfully implemented it for several microcontrollers; not to mention the examples above and countless others. But I am concerned about long-term reliability/longevity. Might the (theoretical) infinite voltage temporarily seen by the MCU pins after relay state change (due to the coil's collapsing field) shorten the lifespan of the MCU?