1
\$\begingroup\$

I am designing a power control panel for the room of many applicants. In the panel there are several micro switches available for the user to turn the appliances ON/OFF. At the end of the micro-switch there I place relay for controlling load of 220V (AC). I am powering the circuit by 12 volts.

I want to freeze the state of relays either ON or OFF such that; when user presses the micro-switch once, the relay should turn ON until the user presses the switch again.

Which component should I use to maintain the state of relay?

\$\endgroup\$

3 Answers 3

4
\$\begingroup\$

You could use a latching relay for this, they are designed to maintain their state (without constant power applied) once switched. You just need a brief pulse (e.g your 12V for a 12V rated relay) to toggle.

Here is an example part, rated for 250V/3A.
You don't mention what current it needs to handle, but if you search for "12V latching relay" on any of the large suppliers you will get plenty of options from which you can select a suitably rated part.

Bear in mind these are a bit of a pain to drive, as you need to reverse the polarity of the pulse to switch on/off (or have another coil connection for the 2 coil version, which if you only want to use one button would be a problem)
If the extra power consumption isn't too much of an issue I think I would probably go for Abdullah's suggestion of a T flip flop driving a standard relay. They are also a lot cheaper.

\$\endgroup\$
1
  • \$\begingroup\$ Wow, I didn't know they could control that much amperes. I wasn't expecting them to be this expensive, neither! \$\endgroup\$ Dec 23, 2011 at 8:42
2
\$\begingroup\$

One solution is to use a T flip-flop. T flip-flop is a toggler. That means when you feed in a 1 in its input (which is T), it will toggle its state - if it was 0 it will be 1, and vice verse.

However, you should be aware of contact bounce. This will, if not debounced, quickly turn your relay ON and OFF as quickly as it can (if it can). Have a look at the contact bounce and debouncing here.

With the micro switch and flip-flop, you should control an electronic switch (transistor) at the output of the flip-flop which will turn the relay ON and OFF.

\$\endgroup\$
2
\$\begingroup\$

I would have all the button inputs go into a microcontroller, which then drives the relays. The microcontroller can easily do the latching logic, and can also do the debouncing of the buttons. Since each press of the button is supposed to toggle the output, debouncing will be essential. Overall, this is a easy microcontroller program to write.

\$\endgroup\$
4
  • \$\begingroup\$ +1 for microcontroller. Also allows for delay timing circuits, serial control from a remote location, etc. Can easily be reprogrammed for future needs. \$\endgroup\$
    – SteveR
    Dec 23, 2011 at 16:50
  • \$\begingroup\$ Damn, those microcontroller are everywhere! And I think there are microcontrollers that can compare with the price of a T flip-flop + the clock circuitry + the debouncing, right? \$\endgroup\$ Dec 24, 2011 at 10:02
  • 1
    \$\begingroup\$ @abdullah: Microcontrollers are everywhere because they are a cheap and small way to implement complicated logic, as long as really high speeds aren't required. If you really need high speed (you don't in this case), then a FPGA would be the next step up. The tradeoff is that they are more complicated, expensive, power hungry, and large than a microcontroller. \$\endgroup\$ Dec 24, 2011 at 15:49
  • 1
    \$\begingroup\$ @abdullah: Flip-flops are cheap and small too, but you need more than that. Add in the debouncing circuitry and it will be larger than a micro, if not also more expensive. Debouncing in hardware is possible (usually done with one-shots), but you'd need a dedicated circuit for each line. Not requiring latching relays is a huge win. Those are more expensive and the selection vastly smaller than for normal relays. \$\endgroup\$ Dec 24, 2011 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.