Jump to content
 

Track Position Sensors - June 2015


davepallant

130 views

Once I had built some signals and was able to control them from my JMRI computer through the NCE system I was using, I needed a way of triggering the signals to change. Since the track layout was finished and relatively stable I did not want to cut a lot of rails to create blocks in the track so that I could detect using current sensors. I tried out some magnetic sensors and found a magnetic triggered transistor that I could embed in the track and which created a pulse when a magnet went over it. This could then be fed into the NCE system to then feed into JMRI.

 

IMG_20150818_211225.jpg.cdb413b268d218866485dfc608bd6642.jpg

 

I think the part is the Honeywell 2SS52M which will respond to both N and S pole magnets. The device needs a 5V dc supply and the third leg is the output which pulls low. I drilled holes between the tracks. The sensors fit neatly between sleepers and I painted the top of the sensor to blend in with the ballast.

 

IMG_20150818_211443.jpg.1486b0c0474d47f4b8000d0de33c3874.jpg

 

IMG_20150818_211240.jpg.5f1d3555b86ac944eb197cf90f1c694b.jpg

 

This was my test wagon with a magnet attached.

 

IMG_20150819_015119.jpg.05bd11c977b89da9691b979e8ee5da61.jpg

 

The main problem I found with these sensors is that the short pulse I got as a magnet went over was too short for the NCE input board to register. The NCE system scans the input board a few times a second and if the sensor is only triggered between scans then the NCE system does not see the pulse and does not pass it back to the JMRI controller. I ended up having to make the sensor lines longer using Arduinos. Nice and cheap Arduinos from China but annoying and time consuming to have to do.

 

The control system for the layout is now using Lenz and Lenz input modules so it is quite possible that the pulse stretchers might not be needed any more.

 

This is the NCE input board with pulse stretchers.

 

IMG_20150816_212606.jpg.995f77ea7f54f7371360f1380a21b04f.jpg

 

What this gave me was a trigger when a train went over a specific point on the track. That meant that I could set a signal to red as a train passed it but because I did not have any block information I could not know when a long train had finished passing and so set the signal before the local one to single yellow. In the end the local signal is triggered by the sensor and all other signals that are linked to that signal change on timers. I also have timers running once the train leaves the front of the layout so signals on the exit step from red to yellow to double yellow to green over a period of time.

Edited by davepallant

0 Comments


Recommended Comments

There are no comments to display.

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
×
×
  • Create New...