I need to have a relay turn on/off power to a circuit, with the push of a button.
The way this will work is, when the button is pressed, power will be stopped to the circuit.
If it is pressed again, power will be restored.
I am new to relays, and I am not sure what a circuit like that should look. Seeing similar projects online, I saw projects where power can be enabled when the button is pressed.
However, in projects like these the power was on, only when the button was being pressed. There was no memory involved.
What I want is the button to enable the power on/off.
Also, is a diode always required when using relays in the circuit?
The power is 12 V. The circuit indeed runs at 12 V. I get the 12 V from a transformer. The output of the transformer is fed to a barrel jack switch (like the big black one the Arduino has). There I have my 12 V. Then the 12 V should go into this board. But I have a button that when pressed will shut down power to the board, in order to turn off the servos immediately - in case of an emergency.
This is why I have to have a latching relay, so that it retains memory (when button is pressed once - the circuit is powered on/off). However, since this is the first time working with relays, I am not sure how I should wire the whole thing. Also, I am not sure if a diode should be used - or if it is not needed and is implemented inside the relay.