To automate my layout I've been investigating sensors to accurately locate the trains so that I can run realistic operations without user intervention. I will update this post with photos when I get my camera out at the weekend.
I've been experimenting with using hall effect sensors for detecting train position on my N gauge layout. In particular I've been trying this sensor:
Honeywell Latching Hall sensor
As I see it these sensors have a number of advantages over other sensor systems.
- Not susceptible to ambient light conditions like optical sensors
- Don't require dividing the track into electrical blocks like current sensors
- Much more sensitive than reed switches (so smaller magnets)
- Can differentiate N from S poles - unlike a reed switch
- very localised effect (initial testing suggests better than 5mm resolution - easily good enough to detect when a train is clear of a set of points for example
- Can be completely concealed below ballast
- Very cheap (~80p per sensor)
- Virtually no additional circuitry needed
The other option that I considered was RFID, but other people report problems caused by accidentally triggering tags on adjacent, parallel tracks (of which I will have a few). I'm sure that this could be overcome with a bit of optimised antenna design to reduce the transverse axis sensitivity - but RFID tag antenna design is a complex area and I'm not all that keen to get into it just for this project. Finally, RFID is usually designed to be omnidirectional - not what you want from a positioning system!
You can get Hall effect sensors without a latching effect as well. I went for the latching effect because this means that I will be able to detect both the start and the end of each loco/coach or wagon by placing a magnet of opposite polarity at each end of the car - very useful if I want to position a specific coupling over a decoupler automatically.
The magnets that I'm using are 4mm diameter, 1mm thick NeBFe rare earth magnets, available from many suppliers such as:
I found that Ebay was the cheapest source - with a pack of 50 magnets costing ~£2.50 - so you can kit out each member of your rolling stock for just 10p. The ones I have are N48 grade. (Higer grade magnets have higher surface flux densities). The difference in the range between N42 and N50 isn't all that great, so I would imagine that any of these would work ok - but I've not tested any other grades.
For my first tests I just placed the magnets on the ends of the steel screws which hold the chassis of my test loco together. I put the sensor on a little bit of stripboard (PCB prototyping board) and glued it to the underside of the sleepers, with the sensor between two sleepers. With this arrangement the top of the sensor was just below the level of the top of the sleepers. Passing the loco back and forth over the sensor showed it working perfectly first time (much to my surprise!).
With just two magnets the sensor is 'set' when the front of the loco passes over it and 'reset' when the back passes over it. With my current arrangement it only works with the loco travelling forward over the sensor - but I have some ideas for different arrangements of magnets on the underside of the rolling stock to overcome this.
Watch this space - if you find this at all interesting that is , otherwise I'll be making some posts about the more normal bits of my modelling soon!
4 Comments
Recommended Comments
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