Track Position Sensors - June 2015
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.
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.
This was my test wagon with a magnet attached.
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.
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 accountSign in
Already have an account? Sign in here.
Sign In Now