1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Latching relays circuit

Discussion in 'Automotive Electronics' started by UKenGB, Apr 9, 2018.

  1. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    I need a circuit that will enable me to switch headlights on and off with a single button that will provide 12v when pushed. So after vehicle is turned on at the Ignition switch, the first 12v 'pulse' will turn the H/L on and the next push of the same button will turn the lights off etc. and when car is turned off and power to the circuit is removed, it will return to its default state of lights off.

    I have studied several circuits, but either the button required is connect to ground, or it has to accept current in either direction (neither of which is possible) or it contains electronic components that I want to avoid in this instance.

    Can anyone suggest a circuit using the minimum number of relays that will do this?

    I've often seen a circuit posted by John DeRosa (Hotwaterwizard - see below) that would appear to do what I need, except I cannot see that it works. However I look at it, it doesn't do what it purports to do. Maybe I'm just not understanding it, in which case can someone please explain how it does work. Otherwise, any other solutions?
     

    Attached Files:

  2. JimB

    JimB Super Moderator Most Helpful Member

    Joined:
    Sep 11, 2004
    Messages:
    6,597
    Likes:
    636
    Location:
    Peterhead, Scotland
    ONLINE
    I just spent 10 minutes drawing out the various stages of operation of that circuit, and I have come to the conclusion that it is rather flaky.

    When pressing the push button to get it to toggle on, it looks as though you could end up with the relays buzzing and chattering while the button is pressed.
    When you take your finger off the button, what state you are left with is down to chance, it may be latched or it may not.

    It should be possible to make a simple circuit to do what you want using relays, but at the moment my stomach says that it is tea time!

    JimB
     
  3. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    7,351
    Likes:
    144
    Only relays? Because you could do this with one relay, two diodes, and momentary, normally closed button.
     
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  5. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    OK, please expound on that. A couple of diodes would be acceptable.
     
  6. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    That's the conclusion I came too. Just not viable as far as I could make out and I've not been able to think of a way to make it actually work.
     
  7. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    7,351
    Likes:
    144
    Hold on...it might take some extra trickery to be able to turn the circuit off. I was thinking of a latching pushbutton, rather than a momentary one. But latching wouldn't reset the state on power-off.
     
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  9. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    7,351
    Likes:
    144
    At work right now so don't think I can put more time into this. See the attached circuit. This circuit only turns off while the normally closed momentary pushbutton is held down so you will have to add in a second relay into the path of the horizontal diode. Probably a normally closed relay so that when turned off but ignition on, battery power keeps the relay open. But when off, it resets to the closed position to allow the circuit to self-turn on.

    The horizontal diode is the one that boots the circuit on power-up but at the moment does not allow the circuit to be turned off without holding down the button. I'm thinking somewhere in the path of the main relay but out of the way of the bulb or main relay feed-forward for the coil so that when the lamp relay finishes energizing, it energizes the the other relay to disconnect the horizontal diode.
     

    Attached Files:

    Last edited: Apr 9, 2018
  10. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    The immediate problem I see is that the momentary action trigger button is to ground and as stated, I need this circuit to work from a 12v pulse and not a connection to ground. I'll examine it some more.
     
  11. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    7,351
    Likes:
    144
    Actually, with that second relay, you can remove all diodes. How big and sustained is this pulse? Is this a human time-scale pulse? If the pulse is there, then it could be enough to disconnect the startup "horizontal diode" bit without extra work.

    Still working on the circuit...
     
  12. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    My requirement is quite specific. This circuit HAS to work from a 12v positive trigger because that's what is in the vehicle and it's not practically changeable to anything else.
     
  13. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    7,351
    Likes:
    144
    But how long is this pulse? It's just a pulse? Not sustained? If that's the case, the fact that the pulse doesn't last forever does the work of the extra bit I'm trying to figure out right now. Instead of the horizontal diode connecting to +12V supply, connect it to the pulse source. So it turns on momentarily to switch the relay on and then removes itself from the circuit. Just two diodes, a normally closed pushbutton and one NO relay. Done.
     
  14. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    The pulse will be as short or as long as I hold down the button. :)
     
  15. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    One more requirement. It has to use no power in the default/off state. So only when you first press the button does it use power to hold the latch, but the second press of the button unlatches it and no more power is used until it is latched again.
     
  16. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    7,351
    Likes:
    144
    There is miscommunication here. The bolded part...is this from the first button button press after ignition? Or from something else? I took it to mean a pulse from something else (like turning the ignition).

    Basically, I interpreted this as something that would auto-on the headlights upon ignition but then afterwards would allow you to toggle on/off with a button. Was I mistaken? Were you just looking for something that would allow you to toggle on/off without auto-on upon ignition? Because if that's the case, forget the relays and just finding a latching pushbutton for the lamp. Because if that's the case then why not just use a latching pushbutton?

    Or is it that you did not want auto-on, but you wanted the circuit to reset it's state to off whenever power was cut so a latching pushbutton would not work?
     
    Last edited: Apr 9, 2018
  17. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    Ok, not a complicated requirement. Turning the ignition on just powers the vehicle and anything that needs it. I then have a button that for each press needs to toggle the headlights on and then off etc. That button will supply 12v while pressed. It is an existing button and its function cannot be altered. 12v while pressed, that's it. While the headlights are off, the circuit should use no power. So the relays are in their default state.

    It seems like a simple problem. A relay circuit that will toggle from a 12v trigger. But I've never been able to work out a solution with 2 relays, even DPDT types. Maybe with 3, but I'd prefer to keep the item count and the size down.
     
  18. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    7,351
    Likes:
    144
    Ah okay. So you must use a momentary non-latching normally open pushbutton and all you want is to connect it to a toggling, latching circuit that resets to off state on power down.

    That does sound simple but when I think about it for more than 5 seconds it starts to seem quite tricky due to the fact that you can hold the pushbutton for any amount of time (and the pushbutton is a dirty signal that has bounce). This is a problem because you only have level triggered devices and switches but you want edge triggered behaviour so doing it with just relays and diodes feels like it won't work... It means that you could hold down the button and the circuit could go crazy toggling states and the state it just happens to be in when you release is the state you get which obviously is not ideal.

    Is this circuit unacceptable?
    https://www.eeweb.com/extreme-circuits/momentary-switch-teamed-with-latching-relay
     
  19. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    Interesting but 2 problems occur to me. One is that again the momentary action switch is connecting to ground and not supplying a 12v pulse and the other is that as far as I can tell, it remembers its state due to the latching nature of the relay and in my case on first start up, the lights must be off. I already worked out my own circuit with just 2 relays (1 latching) that is simple and works perfectly as long as you want it to remember (or don't mind it doing so) its state for next power on time.

    There is a very clever 2 relay design (see below) that I believe does work perfectly. Its problem for me is that the button cannot be a 12v supply trigger. I am coming to the conclusion I'd be better off simply adding a third relay just to provide the button trigger action that is needed for this circuit to work.

    As I said, on the face of it, this seems like a very simple problem, but so far no-one seems to have actually cracked it - apart from the one in the diagram but which is not quite right for my needs. But maybe 3 relays is not so bad. :grumpy:
     

    Attached Files:

  20. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    7,351
    Likes:
    144
    Oh, yeah, that one is a latching relay.

    But if you find a suitable circuit except for a pushbutton to ground, you could just replace the pusbutton to ground in any circuit you see with the primary contacts of a NO relay, and connect the coils of that relay to your existing pushbutton. That turns your existing push button into a push button that can switch anything, anywhere, in any circuit.
     
    Last edited: Apr 9, 2018
  21. Gaudeamos

    Gaudeamos New Member

    Joined:
    Mar 23, 2018
    Messages:
    19
    Likes:
    0
    Location:
    British Columbia
    This electronic solution looks like it might come pretty close to satisfying your requirements:
    - initial reset
    - positive pulse trigger; doesn't specify rising/falling edge
    - version A has no driver, probably requires a transistor to drive a relay coil
    - version B requires <= 12V; maybe tolerates 15V; 7812 regulator or a diode string to drop the supply voltage a bit?
    - debounce timing seems to be ~0.5 sec; this might be a trigger delay

    At that price order a couple of each and see what happens!
    These would be helpful for connections.

    Edit:
    The same source offers this "New Version".
    It combines a higher supply voltage range with drive capabilities.
    The schematic implies that it's negative pulse triggered.
    However being edge-triggered may imply that it will also work with positive pulses, as you require.
     
    Last edited: Apr 9, 2018
  22. UKenGB

    UKenGB New Member

    Joined:
    Apr 9, 2018
    Messages:
    18
    Likes:
    0
    I actually already ordered the first one as I think it does what I want. I guess I'll find out when it gets here and I try it :)
     

Share This Page