Reversing DC polarity with 2 latching relays

Discussion in 'General Electronics Chat' started by Jeauxm, May 20, 2013.

  1. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    I am having trouble getting this to work. I have two 2 coil latching relays. My intent is to have a momentary normally open switch which will "flip-flop" the voltage sent to a track (model railroad).

    I have built the circuit like shown in the attached PDF. When I hit the button the two relays oscillate super fast.

    I think I may need some components to create a delay between relay #1 and #2

    The voltage is 12 volts and so are the latching relays.

    Can anyone help ?
    Thanks
     
  2. JMW

    Member

    Nov 21, 2011
    88
    8
    Why are you using two relays? The second is redundant. Are you looking for a delay between pushing the switch and activating the relay?
     
  3. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
  4. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    That was my first post and I attempted to put way too much at one time. This thread is strictly for solving the flip flop of the polarity. So I isolated this one component.

    Also, I didn't mention this but I need to the circuit state to be persistent. When the power is removed from the layout (model railroad) and the next day it is fired up - I need the state (directions) to be the same since I have trains going in a certain direction. That is why I can't use the H-Bridge you suggested in the other thread. Once I figure this latching relay problem - I will post that back in the other circuit as an update.
     
    Last edited: May 21, 2013
  5. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    I am using a single Positive voltage control line via the push button switch to reverse the final voltage to the track. The reason for the two relays is because the directions stay set even if the power is removed to the latching relays in the circuit. I do not want to keep the relays energized - only when switching (power will still flow through the bottom relay to the tracks).

    Do you have a way of doing that with only one relay and one switch ?

    The only reason I mentioned a delay is because when I hooked these up they sound like an electric razor as long as I push the button. IE - they are cycling back and forth more than once (really fast).
     
  6. JMW

    Member

    Nov 21, 2011
    88
    8
    I will have to ruminate on the single switch. Would a momentary SPDT be acceptable?
    If not, you will need to build a J-K flip flop. 1st press drives coil A, 2nd press, coil B. It will take two transistors of suitable capacity to drive the coils, and a couple or resistors. You may need to add a "debounce" circuit after the switch, this can be an R/C circuit with a time delay of .5 seconds to prevent falsing.
     
  7. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    I appreciate your feedback and suggestions.

    I didn't mention that I need the state to be persistent (same when power is removed and put back on) so I am trying to still away from having transistors control this.

    I am using this circuit to control "things" on a model railroad layout. So when trains are going in certain direction within a "block" and the power is killed - when the power is fired back up (like the next day) everything is set for the same direction. That's the reason I figured this out with the latching relays. The first relay causes the second relay to switch and then the 2nd relay needs to cause the first to switch (for the next pulse).

    I am not trying to replace the latching relays - I am just trying to get them to function the way I designed the circuit.

    So I have two wires coming from somewhere that will be a 12 volt "+" and "-". It will energize momentarily and I need to relays to flip-flop the track polarity. That's why I have drawn the switch. It's just a voltage coming from a "black box" - it's off most of the time and then it is on.
     
  8. JMW

    Member

    Nov 21, 2011
    88
    8
    The circuit will remain in whatever state you leave it until you press the button a second time. You will have to add a "power start" circuit if you want it to start in a certain state. Otherwise a J-K Flip Flop is stable until you change an input.
     
  9. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,221
    It's apparent why the relays are buzzing. When you push the button the top relay changes states, which applies voltage to the opposite coil, causing the relay to change states again. This continues back and forth as long as the button is pushed. In essence you have built an astable multivibrator.

    You need some sort of delay in the circuit to prevent this. If you post the coil resistance and operating time of the relay I will give it some thought.
     
  10. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    Thanks Crutschow!! That's the feedback I have been looking for. The relays are Digikey #225-2854-ND (part # TX2-LT-12V-TH).

    Nominal operating current: 11.7mA (both set and reset coils)
    Coil resistance : 1,028Ω

    From http://pewa.panasonic.com/assets/pcsd/catalog/tx-th-catalog.pdf
     
  11. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,221
    Below is a modification that should work. The capacitor is charged through the resistor, which is then discharged through the coil to switch the first relay when the button is pushed. There isn't enough energy left in the capacitor to operate the alternate coil after the relay switches. And the current through the resistor is not enough to switch the relay after the capacitor discharges.

    Note that the power to the second relay is derived directly from the 12V.

    You may have to experiment with the value of the capacitor to get the correct value. Too small a value and it won't switch the relay. Too large and it will switch back.

    Edit: I just noticed you don't want the relays powered all the time. In that case you can wire both from the capacitor, but you would need to double the size of the cap.

    Latching Relay.gif
     
    Last edited: May 21, 2013
  12. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    That is awesome! Thanks so much for suggesting that. It seems so simple that I missed that but I understand the principle and it makes sense.

    I will try to breadboard this in the next few nights - I will have to search for some capacitors first.

    If I get this working then my next step is to add a 555 timer to drive the input. This latching relay set was part of a bigger circuit that I was attempting. I think DodgyDave pointed that out in one of the earlier posts.
     
  13. JMW

    Member

    Nov 21, 2011
    88
    8
    That is a nice drawing, but I don't see how either coil A or B on relay 1 is activated.
    The only way I see is to have a momentary SPDT switch connected to one relay. The JK will work, but the coil(s) will remain energized defeating the purpose of the latch.
     
  14. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    I adjusted the circuit to include the new resistor and capacitor.

    Note : I changed the position of where the switch is located. It now ahead of the Resistor.

    Crutschow does it still look correct ?
     
  15. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,221
    The energy to momentarily power the relay coil and trip it to the opposite state is from the energy stored in the capacitor. The coils are alternately selected by the "A" and "B" connections from one of the DT contact outputs to its respective coil.
     
  16. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,221
    No, that won't work. The capacitor will never charge since the charging current from the resistor will be shunted through the relay coil. The resistor and capacitor must be on the other side of the switch. You will need to power both relay coils from the capacitor.
     
  17. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    See the new circuit that I posted - I updated it based on Crutschow's suggestion.

    Here's how the relays are activated - upon pushing button, the voltage is sent through relay #1 down to one of relay #2's coils. This will cause relay#2 to switch (flip-flop). After the new capacitor is charged and the push button is released - it will discharge and send a voltage through "A" or "B" (depending on setting) and will cause relay #1 to switch (flip-flop).

    The fact that relay #2 is switched the "output" to the track is now flipped.

    I assume you know how a latching relay functions. If not please let me know.

    Does my explanation make sense ?
     
  18. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    Hummm - the 12 volt trigger (positive) comes from a black box (there isn't really a switch). It's an output from another module.

    So the real requirement is there is a wire that is off but then "pulsed" with 12 volts (positive).

    How about if I were to add a 555 timer (monostable circuit) that would be connected to the relay that switches to "A" and "B". The input to the 555 would also go straight to the left side of relay #1 that passes to relay #2.

    Would this work ?
     
    Last edited: May 21, 2013
  19. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,221
    OK, so it isn't a real switch. In that case you should be able to use a 555 as a one-shot (such as this) to trigger the relays. You would set the one-shot period to be about equal to the relay operate time of 4ms, but use a pot for the timing resistor so you can optimize the time.

    The 555 output has more than enough current capability to drive the two relays directly so it would just replace the switch in your original circuit.

    Note that the 555 triggers at the end of the positive pulse (when it is negative going). Would that be a problem?
     
  20. Jeauxm

    Thread Starter Member

    May 8, 2013
    32
    0
    Question : Could I put the one-shot to control the delayed operation (2 sec) of the first relay AFTER the second relay is switched directly (no delay) ? This would seem like a safer way to guarantee that they don't vibrate and the timing would not be so critical.

    That would make this circuit more reliable since it is a building block for another bigger circuit. It seems that I may have to do some inverting (I see Schmidt Trigger). I will go back to the drawing board and post the design for this part this weekend.

    Thanks for all of your help - it is greatly appreciated - I have been designing this in a vacuum for way too long. It's great to have at least a 2nd pair of eyes......:cool:
     
Loading...