Latching Relay vs Flip Flop

Go To Last Post
36 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all, 

I need some analog design advice. I am designing a circuit that every time a switch is pressed the output latches to the opposite state. 

In regard to reliability, what is the most reliable and easiest to implement circuit, relay or the flipflop latch design. Also could you point me to what is considered the best most reliable configuration and components. 

Thanks, 

Tuurbo46

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Latching switch?

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Where does the analog come into it? Latching relays and flip flops are bistable devices. Do you want to remember state without power?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

perhaps look for "solid state relays"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

This circuit will sit in between a 5V switch in a control board and an ecu module.  This circuit needs to remember its state on power down.

 

Circuit requirements:

--------------------

 

* Vin = 5V

 

* Vout = 5V

 

1) Button press 1, Vout = 5V

 

2) Button press 2, Vout = 0V

 

3) Button press 3, Vout = 5V

 

4) Button press 4, Vout = 0V

 

5) etc etc

 

Flip Flop Circuit
-----------------

 

I have considered modifying the third circuit down (setting the starting state) on the below link, and feeding it with 5v and not 12v, but I am struggling on modifying the output electronics.

 

http://www.pcsilencioso.com/cpem...

 

Latching Relay
--------------

 

I have looked at a switching relay, and I think this part might be suitable but I am not sure.

 

RS Stock No.683-9469

 

I really need clear directing and a bit of help on what is the best/ easiest to implement.

 

Many thanks,

 

Tuurbo46

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tuurbo46 wrote:
I have considered modifying the third circuit down...

But none of them will "remember" state across a power-down

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tuurbo46 wrote:
I am struggling on modifying the output electronics.

So what, exactly, is your "struggle" ?

 

Tuurbo46 wrote:
what is the best/ easiest to implement

A big part of that equation is the capability of the implementor.

 

It sounds like for you the simplest thing is going to be to use a relay.

 

EDIT

 

Actually, Brian's suggestion to use a Latching Switch is simpler.

Last Edited: Mon. Nov 13, 2017 - 11:10 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Tuurbo46 wrote:

1) Button press 1, Vout = 5V

 

2) Button press 2, Vout = 0V

 

3) Button press 3, Vout = 5V

 

4) Button press 4, Vout = 0V

 

5) etc etc

 

Still looks like a latching switch to me.

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Yep... me too.

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

Thanks for all your inputs.

 

I cannot go the latching switch route, because I have already cut the control board interface and fitted a standard on/off push switch - yes my mistake I should of designed the circuit first.

 

So my next option is to go the FF or latching relay route.

 

I have added a picture of a circuit that I have modified, from the above link.  

 

I would like the output to be able to supply 5V @ 100mA, but I think I am only going to get 4.3V (5V - 0.6V) and ~5mA.  Is this correct or have I calculated wrong.

 

How would I go about changing the circuit to supply 5V and the ability to supply 100mA?

 

 

Thanks,

 

Tuurbo46 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But... as Andy has correctly stated in post #6,  none of those will survive a power down. You stated that the solution must remember its state before any power down.  Mistakes happen. Fix the mistake, don't try to make the mistake work.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tuurbo46 wrote:
I cannot go the latching switch route, because I have already cut the control board interface and fitted a standard on/off push switch

Go on - those switches just mount in a standard hole.

 

Almost invariably, manufacturers make a range of switches with models in the various push-on, push-off, push-push options.

 

Unscrew the wrong switch, and screw-in the right one!

 

Job done.

 

 

valusoft wrote:
Fix the mistake, don't try to make the mistake work.

+99

 

Especially as you said simplicity & reliability were key ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Since this is an AVR forum, what about an ATtiny13 storing previous state in EEPROM...

David (aka frog_jr)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Sledge hammer/peanut

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 ... though the hammer might come in handy for removing the "wrong" switch ...

 

wink

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

Sorry to be a pain.  The switch will not physically fit - I would use if i could.

 

OK lets ditch the last know state, just initialise into a default state.

 

I have tried to simulate circuit #10, but the output is zero 0V.  Can you advise what i am doing wrong.  Also i have tried a default pmos and still no operation.

 

Thanks,

 

Tuurbo46

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tuurbo46 wrote:
The switch will not physically fit

like I said, they are not usually unique - there is usually a range of contact & switching options in the same outline.

 

Why not post the manufacturer & part number &, preferably, a link - then we can see if we can find something compatible ...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you would still like to have a set of contacts alternately open and close with each switch cycle, and have them stay in their last set state while the power is off, I bet I could dig up a circuit I once built for someone that uses a dual-coil, magnetically latching relay and about a half dozen, very to pretty inexpensive, passive parts.

- John

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can get bistable relays. I remember them being referred to as "Carpenter relays", but Google doesn't find much under that name. Search for "bistable relay".

Quebracho seems to be the hardest wood.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In America, they are often called stepper or sequence relays. The aforementioned relay-plus-cheap-passives circuit replaced a stepper relay that was considerably bigger than a 35 mm film canister.

 

Oh, they are also called impulse relays.

- John

Last Edited: Mon. Nov 13, 2017 - 03:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This, and replace one of the LEDs with a relay...

 

 

Or this...

 

 

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think that's what (s)he's referring to as a "latching" relay.

 

The RS 683-9469 part referenced is: http://uk.rs-online.com/web/p/la...

 

Last Edited: Mon. Nov 13, 2017 - 03:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have some that are about 3x5 mm and about 4 mm high. It really confuse people when they try to debug/reverse engineering :D

  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The OP's relay just latches. You have to pulse first one coil and then the other, and back again, to get it to alternately open and close, impulse by impulse. You can do that with a few cheap passives and dedicating a set of contacts.

- John

Last Edited: Mon. Nov 13, 2017 - 03:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi jfiresto,

 

Is this the type of relay you mean?

 

RS components: 683-9469

 

Thanks,

 

Tuurbo46

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A discussion of "latching" and "impulse" relays: http://www.mouser.com/ds/2/357/1...

 

EDIT

 

Sounds like what you want is the "impulse" relay, by this terminology

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tuurbo46 wrote:
Is this the type of relay you mean?

 

RS components: 683-9469

That one also just latches, but you can turn it into an alternating-action, impulse relay (as defined by the above Mouser link), by adding a few diodes, resistors and capacitors.

 

SORRY: Strike that. That 683-9469 is SPDT; you many want or need a DPDT relay (what I used) to steer the impulses.

- John

Last Edited: Mon. Nov 13, 2017 - 04:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is the circuit for a momentary switch giving 12V pulses, with a 12V DPDT latching relay and a couple more parts to deal with automotive transients (unclamped load dumps, etc.):

 

alternate action relay

 

It is from a 15 year old Eagle project which still opens with Eagle 6.6.

- John

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tuurbo,  You have ~ 200 posts on a microcontroller Forum, so presumably you have some experience with micros...

 

So why not consider a Tiny with a push button switch and a small NFet transistor, (2N7000) driving a small relay.

 

The micro can save the last value in EEPROM as well, so it will power up in the last state it was in in prior to shut down.

 

Reading, (and debouncing), an input push button switch is straightforward, as is turning an I/O pin high or low to drive the transistor which drives the relay.

 

Reading the EEPROM on power up, and storing a new value when it changes, is another couple lines of code.

 

A clean power supply for a vehicular environment is needed.

 

JC

 

Edit: Typo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

See #13 - and the reply at #14

 

cheeky

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had ignored #14, but since you bring it up...

When you have access to a $0.50 (38p) sledgehammer, it starts looking like the right tool for the job!wink

David (aka frog_jr)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

laugh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I actually considered using an AT90LS2343 before quickly designing the circuit of post #28. Using an MCU would have used at least as many parts and I would still have to program it. For two installations, laziness triumphed over high-tech hotness.

- John

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It takes a bit of work to build reliability into a microcontroller. There’s always the 555 -
http://www.talkingelectronics.com/projects/555/Page3-555.html

Output is good for 200mA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

Thanks for all your input.  Very helpful forum as always.

 

I will have a good read and come back if I get stuck.

 

Thanks,

 

Tuurbo46.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:

perhaps look for "solid state relays"

 

Now I'm oddly curious.  I've never seen a solid-state latching relay.  Presumably one could make one out of the feedback circuit in #28, but I've never heard of one with that built in.  Still, I don't think it would stick in position very long after a power outage.

 

Personally, for a similar application I used a latching relay, an Omron G5RL-K1-E*, and instead of driving the set and reset coils directly from the AVR I buffered them through a couple of 2N2222 transistors.

 

S.

 

* DPDT, 16A, 250VAC, 1" long, 0.4" wide, 0.5" high (dimensions approximate).