I would like to automate a section of the layout so that a mine switcher takes different routes each time it passes through a turnout. Here is the situation, there is a 12 foot switchback up to a mine location. There is a gargraves 042 turnout at the tail end of the switchback. The route is already automated with a Pocono Mountain lines (a defunct company) reversing board. What I would like to accomplish is have the switcher descend from the mine into the tail end of the track (think the bottom of a "Y", have the turnout throw and have the switcher take the diverging route down until it hits the stop section, then reverse the process climbing back up the grade taking the diverging route again after reversing direction. What kind of relay, trigger, wiring would I need to accomplish that?
Replies sorted oldest to newest
If I understand correctly, you want a the switch to throw each time the train comes to the bottom of the "Y" so that when it reverses it will go up the other side of the "Y". I'm also gathering that the train is already reversing with things you have in place, so you only need a device to throw the switch.
There are a few ways to do this. you could build a relay "flip-flop", which is not nearly as easy as one would first think. Here is a video on the theory. https://www.youtube.com/watch?v=ElUkfpfF_Hw
Cost guess: apx $10-20 depending on where you get your relays.
You could also use a IC Flip-flop and a few relays to handle the current. This is probably the most straight forward method , on the surface of things, but requires a bit more research on my end of exactly how to follow through, and will require a flip-flop IC only available from electronic part suppliers.
Cost guess: about $10-15
The method I would actually use, just because it is the easiest one to execute is to use a (very) cheap micro-controler and prebuilt relay board for it. This would take about 10 minutes to put together, on a bad day, and everything is on the shelf if you have a micro-center near by. Other hobby electronics stores will have these parts as well, but may charge much more for "name brand" parts.
Cost: ( based on prices I paid last week) $9 Plus a relay or other device to detect the train at the end of the line.
Let me know which option sounds most appealing to you and I'll try to help with more information.
It would be much easier to just use a 101-3 mechanical E-unit tripped by the last car hitting an insulated rail at the tail end of the wye.
As an after thought, depending on the type of switch/switch machine you will also likely need a timer of some sort to only apply power long enough to throw the switch if you go with a relay or IC flip flop. with the micro-controler you can program it to apply power for however long you want with no added parts.
It would be much easier to just use a 101-3 mechanical E-unit tripped by the last car hitting an insulated rail at the tail end of the wye.
You know, I sat there looking at this problem for 20 minutes thinking a rotating relay was an easy solution, but that they tend to be too expensive to bother mentioning... then there's the e unit...
The e unit still suffers from the timer problem, as it would apply constant power to the switch motor.
It depends on the switch machine. The good ones shut off the coils once thrown(022, K-Line, etc.)
If it's something other, then you can just use the same insulated section(ground) you are using to trip the 101-3 as the common to the E-unit (now switch instead of field wire) contacts and the turnout coils will power down when the train leaves that section.
JohnGaltline, you have my issue figured out. The Switch machine would be something that works with a gargraves switch. The turnout I have is a gargraves 042 currently with a caboose industries ground throw. I have a spare DZ switch machine that I would use for this application but how to wire it escapes me. I understand Z-Stuff makes a newer version of the switch machine (numbered in the 2XXX) range that will throw in the opposite direction each time the button is pushed but I still need a way to make this happen and if I decide, not make it happen (lock out the circuit) if only for operational variation. ADCX Rob, I am really stumped on how to work an E unit into this. Relays, if they are the option seem to be best alternative.
It's a two-position (SPDT) latching relay - the two positions for your application would be through/out. There is no center "off" position with this type. The DZ Switch Machines feature a power cutoff to prevent burnout if power is left on(like the Lionel 022), so this simplifies your application quite a bit.
I would use a single coil latch relay. Discharge a capacitor into its coil with another relay activated by an outside insulted rail.With this method the route would alternate. With a repeat cycle timer and a twin coiled latch relay, you could also make a random circuit and even set probability of diverging routes.
Dale H
Dale H, Clearly you have far more knowledge about electrical things than I. One of the fun things about this hobby is the ability to learn new things outside ones comfort zone. Can you point me in a direction where I can see what that wiring scheme would look like?
I would have to draw something specifically for what you are doing. . In the mean time here is a version of an automated passing siding where the turnouts are thrown alternatively. The 3rd diagram throws the turnouts.
I do this in a more complex version since I run 4 train on a long passing siding, 2 each in opposite directions and they run one at a time.
With what you are doing I think a single coil latch realty would alternate each time a train crosses the approach point. A single coil latch relay is mechanical memory pulse,on,pulse,off etc. it has a set of contacts that can throw turnouts. Every thine a train approaches you can pulse the relay with an insulated rail. It will stay in that state until it is pulsed again.The contacts can throw the turnouts. This assumes the turnouts thrown in pairs or whatever for the route can take continuous voltage,(not Atlas). With atlas you can throw them with capacitor discharge. I also need to know if they are also hooked up for anti derail. Would need more info on the transformers used and the routing.
I also automate station stops where the trains stop randomly but this same circuit could be used to throw turnouts. This is a bit more complex and uses a twin coiled latch relay and some timers along with the insulated rail. . I actually did this in my head without a schematic so I would have to draw that too.
Dale H
...A single coil latch relay is mechanical memory pulse,on,pulse,off etc. it has a set of contacts that can throw turnouts. Every thine a train approaches you can pulse the relay with an insulated rail. It will stay in that state until it is pulsed again.The contacts can throw the turnouts...
The 101-3 will do this with the DZ switch machine as described above.
Dale, this is a single 042 GG turnout, anti derail is not installed currently but could be easily adapted. The power to this track comes from a MRC 270 watt transformer 14 v fixed terminal that can be varied a MTH z-500 controller. (I had an extra one) This location is about 25 feet away from the transformer so the z-500 provides a means to vary the speed from this location. The tail end of the track is sufficiently long enough to hold a single weaver hopper and a K-line plymouth loco, mth 0-4-0 or a new williams 44 ton loco. Reversing the loco is accomplished with a pocono mountain lines board that is actuated from the center rail. The outer rails of this stub can easily be isolated but are both wired to the layout ground wire at this time.
NECrails
Not sure I have your loop right but here is a diagram. Parts needed
1 standard relay SPDT 10 amp 24VDC coil
1 single coil latch relay 24VDC or 24VAC SPDT
2, 4 amp bridge rectifiers.
1, 1000uf capacitor 35 volt
1, 220 uf capacitor 35 volt
2, 33 ohm half watt resistors. One is not shown but can be put in series with the relay capacitor to reduce wheel arcing.
1 1n4001 or similar diode. Across relay coil for spike suppression.
1 barrier strip
click to enlarge,shown hooked to PWZW. The block relay on right pulses the single coil latch relay shown sideways on the left using capacitor discharge. If anti derail circuit is needed on the turnout we may have to change things a bit. The other capacitor across the relay coil is anti chatter. It should also keep the relay from double clicking during occupancy and pulsing the relay multiple times as the train enters. This block should be at least 1 car long where both trucks occupy the insulated rail. Adding a repeat cycle timer and relay would give random 50-50 chance routing,(not shown).
Dale H
Attachments
Attachments
He's already got the train control. This is a simple wye for a switchback, all he wants to do is alternate the switch direction each time a short train comes in to the tail.
Thank you John
Rob,
my circuit does not reverse the train. it merely alternates the switches.I wrote that on the diagram to explain the route as I understand it.
he already has a device that does that. My method for auto reversing a 3 position E unit is shown here if we needed to accomplish that also.
Dale H
He's already got the train control. This is a simple wye for a switchback, all he wants to do is alternate the switch direction each time a short train comes in to the tail.
That's how I read it too. Here's a bi-stable switch module on eBay about $5 shipped. Every time you "ground" the switch input pin, the SPDT relay toggles to the other position. This input could be triggered by the isolated-rail "ground" every time the train enters the tail of the wye. Obviously details must be worked out, but perhaps a module like this can play a role.
Attachments
Attachments
http://store.justtrains.com/10...ion-E-Unit_p_26.html
Not many Google hits. Above was first I got - says $34.95. Didn't find one on eBay. What's a typical price for these?
Having done something similar on my trolley layout to control a Lionel #1122 switch, I think Rob’s idea of using an insulated rail to trigger the action and a Lionel 2-position e-unit as a “stepper” relay to change the position of the switch motor will work well and is relatively simple.
Re the concern about the coil being activated too long, the insulated rail would be at the very end of that siding and only needs to be long enough so that the last axle on the end car will be in contact with it. If using Gargraves, that’s easy to cut a narrow slot in one outside rail about 4 inches from the end and insert a wire into the underside using a spade connector. The wheels will close the circuit to provide the power to cycle the reverse unit to the next step while also sending power to just the correct terminal (through or out) on the DZ switch motor.
In addition, assuming this is a single-track switch-back layout running only one train, then the switch doesn’t need to be non-derailing either because it will always be set to the correct position when the train is approaching either branch.
HTH,
Bill
Re the concern about the coil being activated too long,
The DZ Switch Machines feature a power cutoff to prevent burnout if power is left on(like the Lionel 022).
A couple of observations:
First, Stan, the module you posted will do half the job, but still require a relay(or other device) to use an insulated rail to trigger. Looks like a good pre-made IC Flip-Flop control. I think you also need a DC power supply to power the module.
Rob. I think you are mostly spot on with the e-unit being the simplest, straight forward, solution, however there are two concerns with this approach. First, cost. with the $35 retail for the part it is, by far, the most expensive solution. even at half that it is more expensive than any other. The second problem that the e-unit may cycle multiple times if the insulated rail connection is not perfectly conductive. given wheels, and small engines, I would not count on the connection to be bounce free.
Dale, your solution appears to be quite good. I think folks should start calling you 'The wizard of relays' or some such. My only concerns here are trivial, at best. Firstly, parts almost certainly have to be ordered online, for both cost effectiveness and availability. Not a big deal in the grand scheme of things, but could be a deterrent to some. The second thing is that I'm curious why the 4A bridge rectifiers? Even the worst relay couldn't need more than an amp, and the ones I found on DigiKey were rated with 20-50mA coils. ($1.37 SPDT 24v relay, and $3.36 SPDT single coil latching 24v)
For consideration:
Rob's method: apx. $35 (maybe $15 at a show or if someone has in stock somewhere?)
Dale's Method: apx. $7... if you order parts online.
Stan's with the Bi-stable module: about $10-12 with a triggering relay+ power supply
...there are two concerns with this approach. First, cost. with the $35 retail for the part it is, by far, the most expensive solution. even at half that it is more expensive than any other.
You are thinking 3 position prices. These should be kicking around all over for a few dollars at any show or in a parts bin.
...there are two concerns with this approach. First, cost. with the $35 retail for the part it is, by far, the most expensive solution. even at half that it is more expensive than any other.
You are thinking 3 position prices. These should be kicking around all over for a few dollars at any show or in a parts bin.
I think I was pretty fair if you quote all of what I said here. Yes, if someone has an old one lying around it will do on the cheap. I based the $35 on the price for a new one quoted by Stan above. Your link to a google search shows $25 for a new one, and $10.59 the lowest price used. Stan also mentioned that there were none currently available on the auction site. In any case "even at half that it is more expensive than any other" will gets us in the middle range at $17. I know every e-unit in the case at the one local hobby shop that actually sells parts is marked $20 or above. A show parts bin may get you for a few bucks, but I tend to see that as an exceptional deal, rather than the average cost.
A couple of observations:
First, Stan, the module you posted will do half the job, but still require a relay(or other device) to use an insulated rail to trigger. Looks like a good pre-made IC Flip-Flop control. I think you also need a DC power supply to power the module.
Rob. I think you are mostly spot on with the e-unit being the simplest, straight forward, solution, however there are two concerns with this approach. First, cost. with the $35 retail for the part it is, by far, the most expensive solution. even at half that it is more expensive than any other. The second problem that the e-unit may cycle multiple times if the insulated rail connection is not perfectly conductive. given wheels, and small engines, I would not count on the connection to be bounce free.
Dale, your solution appears to be quite good. I think folks should start calling you 'The wizard of relays' or some such. My only concerns here are trivial, at best. Firstly, parts almost certainly have to be ordered online, for both cost effectiveness and availability. Not a big deal in the grand scheme of things, but could be a deterrent to some. The second thing is that I'm curious why the 4A bridge rectifiers? Even the worst relay couldn't need more than an amp, and the ones I found on DigiKey were rated with 20-50mA coils. ($1.37 SPDT 24v relay, and $3.36 SPDT single coil latching 24v)
For consideration:
Rob's method: apx. $35 (maybe $15 at a show or if someone has in stock somewhere?)
Dale's Method: apx. $7... if you order parts online.
Stan's with the Bi-stable module: about $10-12 with a triggering relay+ power supply
Hello George
I use 4 amp bridges because they are larger and easier hook up. Also one of rectifiers is subject to a bit of current inrush charging the capacitor. I use 1 amp ones where size is a concern. The 4 amp bridges cost maybe 50 cents. allelectronics.com is a good source. You could use 1 amp ones as you mention.
I have a few old style P&B single coil latch relays in my parts drawer. They are DPDT with 24 VAC coils. You can use them as is with an insulated rail,just like the E unit and they are not SPST. . However, when the train enters the section,the coil is left on and does not go off until the train leaves. This is not a problem as it is still a pulse ( a long duration one) which changes relay state. The coil can take continuous voltage just like the E unit. However ,there is an issue of double clicking, or chatter as the train enters or leaves the insulated rail just like using AC coil standard relays for block detection. This is why I added the second relay and capacitor discharge. I know this happens because I have used this circuit,not to throw switches,but to alternate station stops. The contacts can be made to do different things but the coil circuit is the same. Been there done that with the problem. It worked fine when I added capacitor discharge.
I later removed these relays and went to a random stop circuit,where the probability of stopping is set by a repeat cycle timer.The same could be done with the routing. This is a different but similar type circuit but more complex.
As far as Rob"s E unit solution,you can get a RT33 type relay SPST for about $8 to do the same thing. I have some 12 VDC ones in my parts drawer. I would still throw them with capacitor discharge for the reasons mentioned. The coils will withstand constant voltage, although they are not usually circuited that way. I learned this from bench testing. Here is a 24VDC version
As far as Stan's circuit it could be made to work,I think. You would need added components,the Chinese explanation of them on the Bay is not too enlightening. I am not familiar with the boards. It could run into the same issues being double pulsed by the insulated rail directly. These boards I think are designed for a logic controller system and hysteresis is usually in the design to prevent that. Using the board directly you might end up adding a DC relay with a capacitor to smooth out operation,much in the same way I added capacitor discharge with a relay..
Lots of ways to do things,no one is right or wrong. I share my experiences here like everyone else and add my 2 cents. Perhaps it is not worth that much
Dale H
I'll admit my perspective is off since I have so many of these things floating around my shop that I don't put much of a value on them.
It's just a simple solution to a simple problem.
I'll admit my perspective is off since I have so many of these things floating around my shop that I don't put much of a value on them.
It's just a simple solution to a simple problem.
Rob
I have the same problem. Lots of things floating around in my shop and in my head I enjoy reading your posts
Dale H
A couple of observations:
(edited quote) Blah, blah, blah.
Hello George
I use 4 amp bridges because they are larger and easier hook up. Also one of rectifiers is subject to a bit of current inrush charging the capacitor. I use 1 amp ones where size is a concern. The 4 amp bridges cost maybe 50 cents. allelectronics.com is a good source. You could use 1 amp ones as you mention.
...
Dale H
I didn't think about that huge cap in there. And yea, I've got a huge bag of 8 Amp Bridge rectifiers I'd end up using, Not because you need 8 amps, but because I paid like 20 cents each for them. ... Then again, I've also got 1n4001's I paid a tenth of a penny for...
As JGL suggested in an earlier approach, one method is to use a flip-flop circuit which as the name suggests toggles back and forth between the two turnout positions on each trigger.
For fun I wired such a circuit using components I had from the parts stash. This is waaay too complicated for anyone but an obsessive DIY enthusiast...but it might be the cheapest approach in terms of out-of-pocket cost. Time has no value when it comes to doing something you enjoy such as a hobby. So the major components are:
1) A custom flip-flop circuit - about $2 in components (ICs, resistors, capacitors)
2) 12V DC SPDT relay module - about $1.50 on eBay with free-shipping
3) 12V DC adapter (wall-wart) - about $2 on eBay with free-shipping or possibly from a surplus cell-phone charger
There is nothing magic about a flip-flop circuit...it just takes a LOT of wiring compared to a simple electromechanical E-unit as Rob suggests or one of Dale's relay recipes. I'd be glad to elaborate on how it works but I don't see anyone actually building this so I'll leave it at that. The only "trick" to this circuit is I installed a so-called hold-off circuit so that the toggling can only occur once every 10 seconds. As Dale points out, you need to think about multiple/intermittent triggers from to dirty track/wheels. In the OP's application, if it's the mine car that trips the isolated-rail trigger, this might not be as heavy as a loco and hence you can't depend on a solid definitive off-on or on-off trigger. Hence the circuit I concocted has a time delay (about 10 sec) so that once triggered to toggle from straight-to-diverge or diverge-to-straight, the turnout will not toggle for 10 seconds (adjustable by changing the value of a 5 cent capacitor).
Here's a close-up of the custom flip-flot circuit. I used a solderless prototyping board but obviously for a permanent layout accessory one would solder up the circuit. Note there are a boat-load of connections making this impractical relative to some of the proposed solutions.
And here it is in action. I used a Realtrax turnout which has the 'burnout' protection capability in that you can apply "power" to the straight or diverge control wires indefinitely. Hence, an SPDT relay is all that's needed to drive the turnout. I figure this is a reasonable proxy for the switch mechanism that the OP has.
Some other thoughts about this application. I was musing over the various proposed solutions with respect to the simple task of remembering the last position.
The electromechanical E-unit (I do not have one) apparently uses a position of a mechanical lever to remember where it is. Each trigger toggles the lever to the alternative stable slot. The relay method uses the position of a relay arm. The flip-flop circuit uses the charge or state of a semiconductor device. The eBay bi-stable switch module shown earlier uses a programmed microprocessor chip and hence a "bit" of memory in an IC chip. Very interesting how things change over time!
I also found another bistable switch and relay module on eBay for less than $5. Hard to tell from the photos but I think it also uses a microprocessor chip.
http://www.ebay.com/itm/12V-To...;hash=item418bbd777d
So as with the other eBay module, as JGL points out you indeed need a 12V DC wall-wart adapter to provide 12V and such adapters are about $2 shipped on eBay. I hasten to add that 12V DC is not such a bad thing to have around on a layout. Many accessories such as LED lighting now use DC power rather than AC. The ubiquitous LED lighting strips use 12V DC. And many of the insanely priced and clever eBay timer or cycle-timing modules require 12V DC to operate.
In general, while the OP proposes a specific application I can see this as a general need - that is to alternate a turnout on each trigger to add interest or variety to an operating layout. It doesn't have to be an isolated-rail trigger but for 2-rail operation the trigger can be from an optical sensor. Or with a magnet on a specific consist, a magnetic reed switch on the layout can activate the turnout only when a specific consist rolls by.
I think Dale said it best:
Attachments
Very nice work, Stan. Pretty much what I had in mind with the Flip-Flop.
I'm curious about the trigger method. It appears you have the ground of the DC supply connected to the rail, such that it sends a low to the circuit when toggled by the wheels. Will this work correctly with AC live on the rails? It may, I just don't know. Also, will it cause any problems with tmcc/dcs signals? As this topic has gone on, I always assumed the rail would power a relay which, in turn, would trigger the circuit.
Thanks to all who have responded. Stan2004 seems to have captured what I was attempting to explain with his fastrack setup. I need some time to read and digest all of the responses and then decide how to proceed.
I'm curious about the trigger method. It appears you have the ground of the DC supply connected to the rail, such that it sends a low to the circuit when toggled by the wheels. Will this work correctly with AC live on the rails? It may, I just don't know. Also, will it cause any problems with tmcc/dcs signals? As this topic has gone on, I always assumed the rail would power a relay which, in turn, would trigger the circuit.
Well, there was AC live on the rails in the video powering the turnout solenoid mechanism and the lamps for the turnout and track lockon. But the key point is for the DC supply to be electrically isolated from the AC supply. This is accomplished by using a wall-wart. The two "circuits" therefore operate independently and what one voltage is doing does not affect the other. For example, I could have put +12V DC on the outer-rail and had the axles switch +12V to the trigger circuit; there are applications where you want a Positive-trigger or control signal.
To be precise, there are interactions between the circuits. For example, both circuits share the outer-rail as a conductor so that rail must be able to handle the combined current of the two circuits. But in this case the current of the trigger signal is less than 1 mA so I don't think that's going to be a problem! And I suppose you can never achieve true electrical isolation since there is capacitance between any co-located wires. But in this case one signal is DC so there is negligible interaction with an AC signal including those of the higher frequency command control signals.
There have been other threads on the using an electrically-isolated DC supply to power DC relays via isolated-rail triggering. Here's a recent one:
https://ogrforum.com/topic/relay
I'll repeat what I think Dale first mentioned and is probably the tricky part of this application. That is to reject multiple triggers from intermittent wheel-to-track contact. Whether it be a mechanical E-unit or a programmed microprocessor, you need to insure the turnout toggles only once per pass.
With a microprocessor, debouncing isn't an issue, that's a pretty basic task. I use debounce routines for any switch, relay contact, or other discrete circuit closure. Extending the time is a matter of changing one variable as a rule.
Stan
Your flip-flop circuit schematic shows polarity symbols on capacitors, but on your bread board they don't appear to be polarized caps. What type did you use or recommend?
The schematic shows 1uF and 10uF caps. 25V (or higher) will work fine. Photo shows one of the 1uF caps (blue one on left) of the non-polarized ceramic type but probably easier to find a 1uF/25V electrolytic polarized type (the kind with the minus "- - -" stripe on one side. It was whatever I had handy in the capacitor bin. The yellow caps are actually polarized but happen to be of the tantalum variety which are typically tear-drop shaped so hard to print the stripe and they just put a "+" symbol nearer the positive lead as shown below (a 10uF on left, a 1uF on right):
You're going to give it a go?! I'm impressed!
Parts cost should be just a few bucks total so if anything seems unusually high priced or hard to find just ask as there are alternatives.
Attachments
Stan
Yes I think I might give the circuit a try. I'm familiar with electronic components, but as you can tell I'm no guru like you or GRJ.
I also wanted to ask about your statement about the "10 second timing being "adjustable by changing the value of one of the capacitors". Well the novice that I am, which cap?
You and GRJ and others are trying to bring guys like me up to speed but I haven't got that R x C thing down yet, let alone find the which components in a schematic affect timing.
Thanks for your help and sharing your knowledge .
GerryG
The 10uF one. In round numbers the time-delay is the product of the resistor value (in Ohms) and the capacitor value (in Farads). In this particular circuit you have a 1M resistor and a 10uF capacitor. 1M = 1,000,000 ohms. 10uF = 0.00001 Farads. So multiply the R and C values and you get 10 seconds. So, for example, if you use a 1uF capacitor the time-delay would be about 1 second (which is probably too short to be useful). Or, so that you don't have to buy too many different components, you could take two 10uF capacitor and put them in parallel to "make" a 20uF capacitor which would double the time-delay to about 20 seconds.
If learning more about the electronic aspect of the hobby is interesting to you, then by all means ask your questions!
Stan
You explanation helps a lot. So often comments like change this or that to do something are OK for the initiated but for us guys who are trying use solutions found on the forum it just creates more questions. I guess that's how we learn.
Thanx again for all your help.
Gerry G