Jump to content
 

Track sensors to rigger timers/relays - advice


TEAMYAKIMA
 Share

Recommended Posts

Hi

 

I want to fit track sensors that trigger certain special effects on my exhibition layout.

 

For example I want an approaching train to bring down the barriers on my level crossing and for the barrier to go back up after it has passed.

 

I had assumed that this would be some light sensor that would trigger a timer to bring the barrier down and after 20 secs or so the barrier goes back up

 

But now I have thought of a problem.

 

The line is bi-directional. So a train travelling left to right triggers the sensor 10 feet to the left of the crossing, it travels across the crossing, but then 10ft to the right of the crossing it triggers the sensor on the other side.

 

Any thoughts?

 

And also where can I buy such 'kits' - I would prefer a ready made solution or at least a kit of all the parts for me to construct.

 

Thanks

Link to post
Share on other sites

  • RMweb Premium

Can I suggest that you might like to avoid anything that is over-sensitive to light otherwise you could find yourself having to tweak the adjustment setting each time you use the layout. Likewise, you may find something as simple as a viewer leaning over the layout may affect the sensor's ability to work as you wish.

 

You may be able to detect the presence of a loco on a section of DC (controlled) track, less so on DCC track.

 

MERG kit(s) might provide a solution and I suspect one or two of the "electronics gurus" may have a package that might be of use.

Link to post
Share on other sites

I am resigned to the birectional aspect may be the stumbling block.

 

But I have another similar problem but this time not a crossing barrier.  I  want certain locomotives (ie steam locos) to trigger a timer but not diesel locos and so I'm guessing that a magnet hung under the tender. might be the answer.

 

Thoughts please.

Link to post
Share on other sites

Do I assume single track bi- directional ? It is possible to do clever things with a magnet in the side of an item of rolling stock with a reed in a lineside structure. But the magnets have to be strong, and the reed mounted close to the track. It also helps if the train passes slowly, but that at least could be prototypical approaching a level crossing. The advantage is a good solid 'switch', albeit momentary. This can be used to operate latching magnets, 555 timers or whatever. I have just thought of another option whilst typing this. What about if passing the sensor operates the crossing, then passing it a second time resets it. It wouldn't matter which way the train was going, and the sensors would effectively be commoned together.

Link to post
Share on other sites

  • RMweb Premium

Hi

 

I want to fit track sensors that trigger certain special effects on my exhibition layout.

 

For example I want an approaching train to bring down the barriers on my level crossing and for the barrier to go back up after it has passed.

 

I had assumed that this would be some light sensor that would trigger a timer to bring the barrier down and after 20 secs or so the barrier goes back up

 

But now I have thought of a problem.

 

The line is bi-directional. So a train travelling left to right triggers the sensor 10 feet to the left of the crossing, it travels across the crossing, but then 10ft to the right of the crossing it triggers the sensor on the other side.

 

Any thoughts?

 

And also where can I buy such 'kits' - I would prefer a ready made solution or at least a kit of all the parts for me to construct.

 

Thanks

To overcome the bi-direction problem, you will have to devise a method to switch it for direction, to activate/deactivate different sensors by direction (perhaps with your block switch, arrange another pole to power a relay(s) to do the switching).

 

Certainly the effect is well worth the effort IMO. My club layout had it on (since converted to DCC and all gone), but from memory, there were 2 sensors approaching the crossing, one immediately afterwards and a timer, so the crossing didn't stop for short trains, travelling slowly, then start again! Ours was double track.

Link to post
Share on other sites

I have just thought of another option whilst typing this. What about if passing the sensor operates the crossing, then passing it a second time resets it. It wouldn't matter which way the train was going, and the sensors would effectively be commoned together.

 

That sounds the way to go. Thanks for the idea.

Link to post
Share on other sites

Control the crossing with an arduino board or similar. You could write the code to ignore any further inputs of the sensors until the barrier has lowered again. That way you are not resetting the timer on the second pass on the other side.

Link to post
Share on other sites

  • RMweb Premium

Yes Merg have a variety of kits for different solutions, using light sensors, lasers, magnets, etc. They also do a variety of block occupancy detectors (for DCC and analogue) that would detect a loco in a section of track, so you could lower the crossing gates and keep them down until the loco leaves the section.

 

They also do some RFID modules, so that individual locos, fitted with RFID tags, can be detected and then you can do whatever is appropriate for that loco.

 

The Merg journal and forums are also full of ideas and projects that may, or may not, become kits in the future, but can be built and modified nevertheless.

 

Ian (biased Merg member)

Link to post
Share on other sites

  • RMweb Gold

Here is another one:

 

http://www.blocksignalling.co.uk/index.php/level-crossing-module-automated-barriers-sound-lcs6b

 

From the site:

Fully Flexible Controller with Sound and Servo Motors for Barriers or Gates
Automatically detects traction current drawn by scale model trains approaching the level crossing
Suitable for single or multiple tracks on DC or DCC layouts
Operates attached yellow and red leds on level crossing signs (not included)
Plays one selected sound from a choice of 18 pre-recorded levels crossing sounds from around the world
Operates two servos (included) for connection to crossing barriers or gates  across the road
Once train has cleared the track section, the barriers return to their start positions automatically
Built-in programs to cover most UK crossing styles
Fully programmable to suit the modeller's requirements to replicate crossings from around the world

Edited by ianLMS
Link to post
Share on other sites

For the gates my first thought would be  a magnet in the side of a piece of rolling stock and a vertical detector.  For going in one direction the magnet would be on the south side and on the north side for the opposite direction.  Would have to experiment a bit with the size of the magnet to ensure that only the appropriate side is activated.  To control the time I would use a cheap timed 12V relay from China where the time the relay is closed (or open) can be set from about 6 secs to about a 1000 seconds.  For an operation associated one specific form of loco again the simplest would be a magnet under the loco and a reed switch again tied to a timer relay.  Now the buts.  I have found that certain locos (stream and diesel) have their magnets slung quiet low and if you have diesels with this phenomena you will defeat your purpose.  Next i have found that some locos (diesel and steam) have a strong enough magnet that they will activate side positioned reed switches.  Moving the switch back may or may not work because other stock may have weaker magnets that do not activate the reed switch.  My solution to all this is that I have built my sensor circuits such that they are only active as required.   So if trainA is in operation the circuit is not activated but if train B is active the circuit is active.  Very simple because each magnet and reed switch activate a common 12V auto relay.

Now to more complex circuits.  All would involve the use of an Arduino or equivalent.  For the gate operation I think the simplest would be to use an IR detector that activates a circuit to make the gate operate using a servo and a relay to switch off the input voltage to the IR sensor(s) for a defined time so that the sensor is inactive.  You could also, as suggested, use the Arduino as a timer.  It should be possible to input two IR sensors into the same sketch using a Y junction but I do not have any experience with this option.  It should also be possible to build an if else statement but I have had limited success with these.  Depending on just where the magnetic fields are you should be able to use a Hall detector with an Arduino.

pm me if you want to discuss this further.

A very basic question is what sort of mechanical mechanism do you plan to use for the physical operation.  I am (now) a great believer in servo motors but they do require a special electrical input (PWM or pulse width modulation) that requires special equipment to make it function.   

Jim

Edited by Theakerr
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...