Reversing DC polarity with 2 latching relays

crutschow

Joined Mar 14, 2008
34,462
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.

..............................
You could do that but it wouldn't guarantee that the first wouldn't oscillate. You would still need a properly timed pulse. For a 2 second delay you would need two 555's (or one 556), one for the 2 second delay and the other for the 4ms pulse.

Actually since the relay only requires 4ms to operate you wouldn't need a delay longer than about 10ms for the first one-shot.

Note that you need a reverse biased diode across all relay coils to suppress the coil transient spike that could zap the 555.
 

JMW

Joined Nov 21, 2011
137
Again, why not use a single DPDT latching relay? Coils A and B are activated by a momentary SPDT switch. Even simpler is a DPDT switch of suitable current rating, this of course means running more and larger gauge wire.
 

crutschow

Joined Mar 14, 2008
34,462
Again, why not use a single DPDT latching relay? Coils A and B are activated by a momentary SPDT switch. Even simpler is a DPDT switch of suitable current rating, this of course means running more and larger gauge wire.
Because he wants to alternate the relays' positions with a single pulse. That's not readily done with only one DPDT relay.
 

Thread Starter

Jeauxm

Joined May 8, 2013
32
You could do that but it wouldn't guarantee that the first wouldn't oscillate. You would still need a properly timed pulse. For a 2 second delay you would need two 555's (or one 556), one for the 2 second delay and the other for the 4ms pulse.

Actually since the relay only requires 4ms to operate you wouldn't need a delay longer than about 10ms for the first one-shot.

Note that you need a reverse biased diode across all relay coils to suppress the coil transient spike that could zap the 555.
Thanks again for the help. I think you are right in that I need two one-shots. In the light of the bigger picture I may have a 555 sending the initial trigger so I really only need a 2nd one to delay setting of the Latching relay #1 after the initial trigger fires the #2 relay.

Earlier I said this was part of a bigger circuit. I actually posted the entire thing before this post. I think I overwhelmed everyone and they concentrated on one part.

You have given my the correct direction with the one-shot for the delay.

See my orignial post at http://forum.allaboutcircuits.com/showthread.php?p=610249#post610249 and things may make more sense.

I got some breadboarding to do this weekend if I can get out of doing yard work !!! :rolleyes:
 

JMW

Joined Nov 21, 2011
137
I'm missing something. If you have a momentary SPDT, connected to a DPDT latching relay, it is a momentary pulse. Move the rocker in one position it activates coil A then returns to neutral, moving the switch to the other position activates the other coil. No delay circuits, no oscillating relays.
 

crutschow

Joined Mar 14, 2008
34,462
You are missing that he intends to have no switch in the actual system, but is generating a pulse from another circuit to reverse the power polarity.
 

JMW

Joined Nov 21, 2011
137
Thanks:
OK, the only way I see to do this is with a J-K triggered by the pulse. The J-K output drives two 1 shots that drive the respective coils.
 

Thread Starter

Jeauxm

Joined May 8, 2013
32
Thanks:
OK, the only way I see to do this is with a J-K triggered by the pulse. The J-K output drives two 1 shots that drive the respective coils.
I am not sure what a "J-K" is but I will research it.

QUESTION : does this "J-K" have the property of persistence ? IE - It's in the same state when removing power and reapplying power. If not - it will not match my requirements. The Latching relay has that property.
 

crutschow

Joined Mar 14, 2008
34,462
I am not sure what a "J-K" is but I will research it.

QUESTION : does this "J-K" have the property of persistence ? IE - It's in the same state when removing power and reapplying power. If not - it will not match my requirements. The Latching relay has that property.
Only if you continuously apply power to it from a battery. But CMOS digital circuits require such a small amount of current (no more then a few microamps) that even a button cell battery will last for years (essentially its self life) for this purpose. Typical devices would be a CD4027 J-K flip-flop or a CD4013 D flip-flip (which will also work for your purpose).

I believe the proposed idea of using two one-shots to trigger the two relays will work, but using a flip-flop would be a better engineering approach. That would also require only one relay (the second one).
 

JMW

Joined Nov 21, 2011
137
Is anyone else familiar with the phrase Rube Goldberg? I hope the OP takes the time to post some videos of his layout. I had O gauge growing up, this is obviously HO or maybe N. For all intents and purposes it is how I got started in electronics.
 

Thread Starter

Jeauxm

Joined May 8, 2013
32
Is anyone else familiar with the phrase Rube Goldberg? I hope the OP takes the time to post some videos of his layout. I had O gauge growing up, this is obviously HO or maybe N. For all intents and purposes it is how I got started in electronics.
I looked up Rube Goldberg - I will take that as a complement :rolleyes:. Actually my first post (http://forum.allaboutcircuits.com/showthread.php?p=610249#post610249) is more like that. I went full blown on my first post.

My railroad collection is HO scale. I don't have a layout yet. It is in the "design" phase. I did post pictures of a test track to prove the back and forth part of this circuit in my other post. The reason for all of the flip flopping is that my railroad design will have a single main line that will run trains in both directions (not at the same time though). Trains in other blocks will "control" the advancement of trains into the next block. Most of this will happen in turn around loops. If you are interested I can post some URLs of this methodology.

The biggest reason for this post is to get track reversal working. The simplest form of this (like my test track) is a trolley going back and forth (no loops). This track could "snake" around the house and could be any length. Common uses of this is Christmas village layouts.

BTW - I am NOT doing DCC - just DC - hence the need to control the layout by train detecting and triggering advancement (and turnout control) and track direction.
 

JMW

Joined Nov 21, 2011
137
It is a compliment, all of his "inventions" worked, just sort of a round a bout way of doing something. IIRC Stanford Engineering Dept has a course where this is required.
At any rate, may I review the parameters.
1)There is a switch,sensor, device, that when activated will reverse the polarity of the track.
2) Each time the device is activated the polarity will be reversed.
3) You desire the circuit to hold its state during power down.
Anything else?
 

Thread Starter

Jeauxm

Joined May 8, 2013
32
It is a compliment, all of his "inventions" worked, just sort of a round a bout way of doing something. IIRC Stanford Engineering Dept has a course where this is required.
At any rate, may I review the parameters.
1)There is a switch,sensor, device, that when activated will reverse the polarity of the track.
2) Each time the device is activated the polarity will be reversed.
3) You desire the circuit to hold its state during power down.
Anything else?
Actually the "parameters" which I called Requirements totaled 9 and were listed in my other post.
But here's the overview - the track (or block in this instance) has a single 2 wire connection. When a train is running - the current is detected (see my other post - the Rube Goldberg part). When the train leaves the block - the absence of the current is detected - this triggers the "event".
Answers:
1) No extra sensors running to the track other then the supply lines (see overview)
2) For the back and forth - YES - when the trolley leaves the block - the absence of current is sensed and starts the process of reversal.
3) YES - for the simple trolley back and forth it not as critical but in the ultimate layout, trains may be staged in certain blocks - I need things to be as they were when I shut down the layout for the night. We don't want trains going in reverse, etc when I start it back up.
 

JMW

Joined Nov 21, 2011
137
I'm still ruminating, I have not forgotten you.
Follow me on this. The "trolley sensor" detects a trolley and triggers a device to send power in one direction, when the "trolley sensor" detects no trolley, the device changes states and reverses power. When you power down for the day, you want the state to be "remembered" so that either forward or reverse power is applied.
Good so far?
 

Thread Starter

Jeauxm

Joined May 8, 2013
32
I'm still ruminating, I have not forgotten you.
Follow me on this. The "trolley sensor" detects a trolley and triggers a device to send power in one direction, when the "trolley sensor" detects no trolley, the device changes states and reverses power. When you power down for the day, you want the state to be "remembered" so that either forward or reverse power is applied.
Good so far?
Yes - all of the "sensing" will be a box black which has 12 volts input and 12 volts output which is connected to the track. I do not want other sensor lines running to track (which may be rather long). So a single connection to the track. That's why I designed it to "detect" the absence of current - when the trolley goes past the diode'd gap in the track at one end or the other.

Thanks for all of your interest and help on my pet project. I didn't work on it at all this weekend. The "Boss" wanted yard work done ........:rolleyes:
 

JMW

Joined Nov 21, 2011
137
I know all about honey do weekends.
getting back to the 'portant" stuff. Is the "trolley sensor" Hi when the block is occupied and switch low when empty? Or does it go lo then hi when the block changes states? (These conditions could be reversed, meaning output could go Lo when occupied and Hi when empty?
 

Thread Starter

Jeauxm

Joined May 8, 2013
32
I know all about honey do weekends.
getting back to the 'portant" stuff. Is the "trolley sensor" Hi when the block is occupied and switch low when empty? Or does it go lo then hi when the block changes states? (These conditions could be reversed, meaning output could go Lo when occupied and Hi when empty?
That's an excellent question ! Originally I designed the complete circuit to use 2 LEDs connected to a Bridge Rectifier and have them facing a PhotoCell which would.......... I have a bunch of OptoIsolators that I want to use in place of the leds/photocell. So the short answer is as follows : As the trolley runs - the current is detected and the OptoIsolator will send a "high" signal. It is the absence of that Signal that should cause the relays to reverse. That should happen when the trolley rolls past the dioded gap (I made that term up btw).

I did some research and was wondering if a Schmit Trigger would do the trick here ?
 

crutschow

Joined Mar 14, 2008
34,462
The purpose of a Schmitt Trigger is to have hysteresis on the logic level trigger point so it will not oscillate with slow moving or noisy inputs. Not sure if you need one but it couldn't hurt.
 

Thread Starter

Jeauxm

Joined May 8, 2013
32
The purpose of a Schmitt Trigger is to have hysteresis on the logic level trigger point so it will not oscillate with slow moving or noisy inputs. Not sure if you need one but it couldn't hurt.
I was thinking that the Schmitt Trigger would do the inverting of my circuit from the OptoIsolator (absence of the current). Would this tie into the delay to the latching relay ? Could it provide the delay or does it have to be a separate 555 ?
 
Top