Jump to content
 

A very whacky idea for determining train position


AndyID
 Share

Recommended Posts

OK - did I mention it's whacky? Good, I thought so.

 

I have nothing against DCC. It does some really excellent things, but in its current form it's not for me. I have little interest in driving the trains (except perhaps for shunting). I'd like the signalman to direct train movements, just like the real thing.

 

It's not terribly difficult to direct train movements with a computer, but it is not so simple for the computer to determine precisely where the trains are, but it may not be as difficult as we might think. The following is more than a bit bizarre (you have been warned).

 

-----------------------------

 

The rail we use on our model railways has some resistance. Not too much, but it is resistive just the same. As the distance between a locomotive and the power feed increases, the resistance increases too and that resistance is quite linear with distance (I'm assuming there is negligible resistance at the rail joiners.) But rail resistance can be a problem with DC because it makes trains slow down when they are not supposed to.

 

If we had some way of measuring the resistance as a train rolls along the track we would have a reasonably accurate way of determining where the locomotive is, perhaps to within six inches? Maybe a foot would be more realistic?

 

It turns out there might be a way of doing that although it may not be practical. Here goes anyway:

 

The main controller does not apply a controlled voltage to the track. It controls the current sent down the track and it adjusts the voltage to maintain the desired current. The current represents the speed that the model's motor is supposed to rotate at. The model has an on-board electronic controller that monitors the current and uses it as a sort of signal to determine what speed to run the motor at. It uses as much current as it needs to do that and spills any unwanted current past the motor and back onto the track. (It's basically what is know as a "shunt regulator".)

 

So far so good, I hope :)

 

The on-board controller also does something else. It maintains a voltage on the track that is proportional to the current supplied to the track by the main controller. Eh? Yes, it regulates a voltage at that track position that is determined by the current supplied by the main controller.

 

So, as the distance between the power feed and the on-board controller increases the main controller tries to maintain the desired current but as the distance increases the main controller has to increase the voltage to compensate for the resistance in the rails, but it also "knows" the voltage on the track where the train is. That is proportional to the current the main controller is feeding to the track.

 

The difference between the voltage at the main controller and the voltage at the on-board controller (represented by the current the main controller is supplying) is proportional to the distance between the main controller and the on-board controller. I think.

 

Phew!

 

  • Like 2
Link to post
Share on other sites

  • RMweb Gold

Knowing here is a linear voltage difference is one thing, but how do you pass back the loco's voltage to the difference measuring device ?

 

Also, do you need to know at all times where a train is, or just which section of track and whether it has reached the end of that section or not ?

For this you could use more simple electronic switches triggered by the train.

 

But, I like your thinking.

Link to post
Share on other sites

  • RMweb Premium

The change in resistance of the circuit when a train moves from one end of the section to the other will be too small to detect. The dirt on the wheels will change the resistance much more than this so I'm afraid a position detector would not be practical.

Link to post
Share on other sites

  • RMweb Premium

OK - did I mention it's whacky? Good, I thought so.

 

I have nothing against DCC. It does some really excellent things, but in its current form it's not for me. I have little interest in driving the trains (except perhaps for shunting). I'd like the signalman to direct train movements, just like the real thing.

 

It's not terribly difficult to direct train movements with a computer, but it is not so simple for the computer to determine precisely where the trains are, but it may not be as difficult as we might think. The following is more than a bit bizarre (you have been warned).

 

-----------------------------

 

The rail we use on our model railways has some resistance. Not too much, but it is resistive just the same. As the distance between a locomotive and the power feed increases, the resistance increases too and that resistance is quite linear with distance (I'm assuming there is negligible resistance at the rail joiners.) But rail resistance can be a problem with DC because it makes trains slow down when they are not supposed to.

 

Phew!

Some fundamental assumptions there that are not right

e.g. "(I'm assuming there is negligible resistance at the rail joiners.)

Actually the reverse, the biggest variation in resistance will be at the rail joiners hence the recommendation of "droppers" from bus cables to each section of rail (DC & DCC)

 

"It's not terribly difficult to direct train movements with a computer, but it is not so simple for the computer to determine precisely where the trains are"

You are more likely to know where the trains are with computer control, as when using something like TrainController, the computer keeps track of the speed of the train through blocks (yes, just like the block sections trains are in on the real railway) and calculates where it is.

 

"I'd like the signalman to direct train movements, just like the real thing."

You can do that with DCC (& a computer)

 

You can have full prototypical interlocking with DCC and a computer (just like on the modern railway.) and/or emulate steam age signal boxes if you wish

 

Keith

 

Removed unnecessary sections

Edited by melmerby
Link to post
Share on other sites

With battery powered radio control, the track is available for track circuiting.

 

You could place RFID tags at regular intervals under the track, and the loco could send the tag ID back to the controller. This could be done with BPRC, or with conventional track powered DC if the loco had a transmitter installed. About £4 per loco for an Arduino Pro Mini, nRF24L01 transceiver and RFID tag reader, although I'm not sure if small enough RFID readers are available.

 

Infrared sensors could be placed under the track at regular intervals, and the loco could have an IR LED on board. The sensors could be wired to an Arduino, that would be able to detect which one was activated.

Link to post
Share on other sites

  • RMweb Premium

If you want to go really left field why not have a third rail consisting of a resistance wire (Constantin etc.) down the centre of the track in each section with a wiper under the loco and measure the resistance down the length between one rail and the loco?

 

If the resistance is high enough you could apply 12v across the wire and measure the voltage at any point (a potentiometer in effect)

 

Keith

Link to post
Share on other sites

I like these threads proposing 'another way'.

...The difference between the voltage at the main controller and the voltage at the on-board controller (represented by the current the main controller is supplying) is proportional to the distance between the main controller and the on-board controller...

What if the layout is a continuous circuit; or in an end to end scenario there are multiple but communicating paths which differ in length?

Link to post
Share on other sites

I like these threads proposing 'another way'.

What if the layout is a continuous circuit; or in an end to end scenario there are multiple but communicating paths which differ in length?

You add extra resistance at certain points, so each route gives a different reading. I know these things because reading up on how to make voltage dividers, to read which of many buttons connected to one input on an Arduino, has been pressed, makes my brain hurt!

Link to post
Share on other sites

Signaling with DCC in action:

 

https://www.flickr.com/photos/47105471@N05/23856979356/in/album-72157629408307454/

 

It's not because the track is DCC that this works- it is because I have ~180 detection blocks fed back into a computer, which then runs the behind the scenes portion that make it all happen.  It _could_ be done with relays... I thought about it, for about 31 seconds, did some rough math, and decided that SSI was a far better option !.  

 

-Layout runs with Digitrax DCC, under RR&Co 5.0C4, with 5 booster sections, 2 control busses, about 60 turnouts, 8 physical signals (& at least as many that are missing, all dwarf's), and at maximum 4 trains running under computer at the same time.  (it might be possible to get 5-6 to run, but there are physical limits to that, as the staging yard feed out is single track...)

 

James

  • Like 1
Link to post
Share on other sites

  • RMweb Premium

Signaling with DCC in action:

 

https://www.flickr.com/photos/47105471@N05/23856979356/in/album-72157629408307454/

 

It's not because the track is DCC that this works- it is because I have ~180 detection blocks fed back into a computer, which then runs the behind the scenes portion that make it all happen.  It _could_ be done with relays... I thought about it, for about 31 seconds, did some rough math, and decided that SSI was a far better option !.  

 

-Layout runs with Digitrax DCC, under RR&Co 5.0C4, with 5 booster sections, 2 control busses, about 60 turnouts, 8 physical signals (& at least as many that are missing, all dwarf's), and at maximum 4 trains running under computer at the same time.  (it might be possible to get 5-6 to run, but there are physical limits to that, as the staging yard feed out is single track...)

 

James

I agree with you.

 

If you want interlocking and a signal operated railway DCC is the easy way to.

Like here

http://www.rmweb.co.uk/community/index.php?/topic/130-rrco-my-control-panel-the-basics-of-automation/&do=findComment&comment=448

 

IMHO anything else is just time wasting!

 

Keith

Link to post
Share on other sites

Well, yes, I do know there are other ways to get somewhat similar results, but none that I know (short of using overhead cameras or a local "GPS" system) can continuously determine position. If this system works it can continuously determine position, and that allows it to determine instantaneous speed. The speed is simply the rate of change in position.

 

In no particular order here are some of the issues raised so far:

 

How does the main controller "know" the track voltage at the trains position? It doesn't need to receive feedback from the train because it is dictating the train voltage by controlling the current.

 

Why do you need to know position continuously? Because that's how a real driver drives a train and automatic systems also need real time position and speed information.

 

The voltage difference is too small to detect. No, it isn't :) . You may have noticed that train motors are pretty good at detecting it when they slow down on long sections of track that don't have additional feeds.

 

It won't work because of wheel/rail dirt/oxidation. It certainly won't work if the if there is a lot of dirt, but then the trains probably won't be going anywhere if there is. A little bit of poor contact won't bother it because that will be intermittent and it will show up as noise that can be filtered out quite easily.

 

Rail joiner resistance will mess it up. Yes it would. The rail sections will have to be bonded with soldered-on jumpers. The jumpers might even be fixed value resistors to provide additional position calibration marks.

 

Parallel feed paths will mess it up. Yes they would. That would be a "don't do that". Circles would have to have a break somewhere.

 

What happens if there are different types of rails with different resistance values? (That one was mine.) The control system would have a "map" of the track and details about the track resistance.

 

Nobody has brought up the one that I think might be the real killer yet. I'm keeping quiet about that one.

 

By the way, you might use a variation of this even with battery powered trains. It would be a lot simpler too. The train would just short circuit the rails and the control system would measure the track resistance to determine position and absolute speed. It's not out of the question with DCC either, but that's a whole different story.



IMHO anything else is just time wasting!

 

Somehow I got that impression.

Link to post
Share on other sites

If you want to stay old school, why not add an outside third rail and ensure each coach of your multiple units has a connection between the wheels on one side ( one running rail) to the third rail pick up.  The completion of that circuit can set relays or illuminate bulbs/LEDs to indicate track occupancy.  You'd have to ensure their weren't too many gaps, but quite simple to wire.

Edited by The Bigbee Line
Link to post
Share on other sites

The concept implies that every physical position over the entire layout would have to produce a different result to prevent ambiguity of interpretation. How one might set about designing a layout against this requirement is unknown, and would probably be more involved than producing the circuitry needed to implement it.

Also, what happens when more than one train (or current sink) is present on the layout?

Link to post
Share on other sites

  • RMweb Premium

If you want to stay old school, why not add an outside third rail and ensure each coach of your multiple units has a connection between the wheels on one side ( one running rail) to the third rail pick up.  The completion of that circuit can set relays or illuminate bulbs/LEDs to indicate track occupancy.  You'd have to ensure their weren't too many gaps, but quite simple to wire.

But you still don't know precisely where the train is (the original problem) only which block it is in, hence my Idea of a resistance wire as the third rail (post #7) which will determine how far down the block the contact is being made.

 

Keith.

Link to post
Share on other sites

Andy mentioned a 'local' GPS for positioning. It's already here, for sale commercially*. It appears to work but the bloke I know who bought it is no longer a member of our club so I'm not really up to speed on its current standings.

 

*I think it's Danish, IIRC, or at least Scandinavian or German.

Gamesontrack and it is Danish. GPS is a bit tongue in cheek as it uses ultrasonics for position location.

 

Richard

Link to post
Share on other sites

But you still don't know precisely where the train is (the original problem) only which block it is in, hence my Idea of a resistance wire as the third rail (post #7) which will determine how far down the block the contact is being made.

 

Keith.

The OP wanted to run his railway like a signalman.  They don't know exactly where the train is.  With track circuits they will watch a train occupy track circuit sections progressing along the route.  If the line is operated using an absolute block system there may not be track circuits in the block section itself, so the block instrument is the only guide that a train is there (plus of course the essential train register).  Then to help the signaller and station staff there were treadles fitted that gave an audible alarm, usually a bell, when activated by the train.     If you really want to know where the train is, as mentioned previously, look or fit CCTV.  Much easier

Link to post
Share on other sites

  • RMweb Premium

The easier way is to do it properly (so I'm told, I haven't got a railway to play with except a full sized one!). Get some relays that work on 24v dc. Add a power supply that is variable, so that you can adjust the voltage so that the relays just pick. Current limit the feed from the psu to the track with a resistor (so that only a small current can be drawn from the psu, and the current is only just enough to operate the relay).

 

Wire across the track in the same way as the real railway does (power feed one end, relay across the rails at the far end). Add normal train into the mix, and when the loco (or any other stock with resistive wheelsets) get onto the section, the relay will drop out (as the 24v is being shunted by the loco) and they you can operate your indicator off the contacts.

 

The loco won't speed up as their will not be enough current, and your indicator will be correctly fail safe...

 

 

Andy G

Link to post
Share on other sites

Knowing which block a train occupies is quite simple. But I want trains that behave as if they have a driver who is responding to the signals. That's not so simple. To do it properly the system needs real-time position information. That's why the ultrasonic "GPS" system was developed. This is another way of achieving a similar result. It might even be better, but that remains to be seen.

Link to post
Share on other sites

  • RMweb Premium

Knowing which block a train occupies is quite simple. But I want trains that behave as if they have a driver who is responding to the signals. That's not so simple. To do it properly the system needs real-time position information. That's why the ultrasonic "GPS" system was developed. This is another way of achieving a similar result. It might even be better, but that remains to be seen.

 

The OP wanted to run his railway like a signalman.  They don't know exactly where the train is.  With track circuits they will watch a train occupy track circuit sections progressing along the route.  If the line is operated using an absolute block system there may not be track circuits in the block section itself, so the block instrument is the only guide that a train is there (plus of course the essential train register).  Then to help the signaller and station staff there were treadles fitted that gave an audible alarm, usually a bell, when activated by the train.   

Sounds just like what you can do with TrainController then! (Other train control programs will do similar things)

 

When a train enters a block it can be continually monitored using current sensing or it can be done with on/off sensors (reed switch, treadle, opto etc as it enters/leaves the block)

If the signal at the end of the section is at danger the train will be slowed to stop short of it.

When the signal is cleared the train will start accelerating again, wherever in the block it is.

The computer is controlling the train based on signal aspects. But it could just as well be a miniature driver responding to what he sees ahead of him.

 

Isn't that the original quest?

 

Keith

Link to post
Share on other sites

Sounds just like what you can do with TrainController then! (Other train control programs will do similar things)

 

When a train enters a block it can be continually monitored using current sensing or it can be done with on/off sensors (reed switch, treadle, opto etc as it enters/leaves the block)

If the signal at the end of the section is at danger the train will be slowed to stop short of it.

When the signal is cleared the train will start accelerating again, wherever in the block it is.

The computer is controlling the train based on signal aspects. But it could just as well be a miniature driver responding to what he sees ahead of him.

 

Isn't that the original quest?

 

Keith

 

No, not quite. That system doesn't really know where the train is or what speed it is traveling at. Of course it can make estimates of speed and position based on the most recent information it has received from various sensors, but the estimates are not very accurate because the system is not receiving continuous real-time data.

Link to post
Share on other sites

  • RMweb Premium

No, not quite. That system doesn't really know where the train is or what speed it is traveling at. Of course it can make estimates of speed and position based on the most recent information it has received from various sensors, but the estimates are not very accurate because the system is not receiving continuous real-time data.

Obviously never seen TrainController in action then! :jester:

 

The whole basis of the system is that at any time it knows where the train is and what speed it is going.

Admittedly it has to rely on the repeatability of performance of the loco and the track. I have found that once a loco is run in and if the track is kept clean it all works very well.

If it's not very accurate how come it can stop a train within better than 25mm/1" of where it should stop, repeatedly?

I have very few buffer stops on my as yet incomplete layout and the trains never overrun they stop just short of the track end.

 

I think you are being somewhat dismissive of something that has been proven over the years to do just such a job.

 

Keith

Link to post
Share on other sites

Ah yes, the well known argument, "If it was good enough for my father, it's good enough for you."

 

What's wrong with trying to improve a control system by providing real-time feedback? (Not that I'm saying this thing would really be any better. That is far from proven.)

 

It's just an idea guys. For goodness sake please try to lighten up :)

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...