user41872: I'm trying to use a 2-Coil Latching Relay like TXS2SA-L2-3V for  powering up a ESP8266. My idea is to activate the relay by setting the first coil to high and deactivate the coil by setting the second coil to high. In my circuit i will set the second coil to high at the end of the code by the esp8266. I need the latching (holding the power) function of it. Because when somebody activtes the Deep Sleep function to early, I have no electricity to power the esp8266.
My question is:
What kind of circuit I must use? I have no idea where I can start. 
I have a regulator that can be enabled via de EN signal.
Thanks in advance!


user4143: You use a latching relay of this form in the exact same way as a normal relay - it's just there's two of them.
One coil you want to control with a button (power on) and the other with a transistor (and possibly an "off" button as well).

simulate this circuit – Schematic created using CircuitLab
Press ON to latch the relay into the ON position (NO -> COM). Activate M1 or press OFF to latch the relay into the OFF position (NC -> COM).

41872: <p>I'm trying to use a 2-Coil Latching Relay like <a href="https://www.digikey.com/products/en?keywords=255-2347-5-ND" rel="nofollow noreferrer">TXS2SA-L2-3V</a> for  powering up a ESP8266. My idea is to activate the relay by setting the first coil to high and deactivate the coil by setting the second coil to high. In my circuit i will set the second coil to high at the end of the code by the esp8266. I need the latching (holding the power) function of it. Because when somebody activtes the Deep Sleep function to early, I have no electricity to power the esp8266.</p>

<p>My question is:</p>

<p>What kind of circuit I must use? I have no idea where I can start. </p>

<p>I have a regulator that can be enabled via de EN signal.</p>

<p>Thanks in advance!</p>

<p><a href="https://i.stack.imgur.com/ZIiOe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZIiOe.png" alt="TPS61200 regulator"></a></p>
 4143: <p>You use a latching relay of this form in the exact same way as a normal relay - it's just there's two of them.</p>

<p>One coil you want to control with a button (power on) and the other with a transistor (and possibly an "off" button as well).</p>



<p><img src="https://i.stack.imgur.com/YlxPM.png" alt="schematic"></p>



<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fYlxPM.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="nofollow">CircuitLab</a></sup></p>

<p>Press ON to latch the relay into the ON position (NO -> COM). Activate M1 or press OFF to latch the relay into the OFF position (NC -> COM).</p>
