# how to direct train to one of the several stations



## pepelepue00

Hi, I am new to model trains and DCC. Does anyone know if it is possible to direct the G model train to a particular station. I will have 10 stations, and I want to be able to program the controller unit to have the train go to any of the 10 stations I choose. So basically if I want the train to go to station #8, I push the code for it on the remote and the train goes to that particular station. I appreciate any help on this subject. Thank you.


----------



## Big Ed

pepelepue00 said:


> Hi, I am new to model trains and DCC. Does anyone know if it is possible to direct the G model train to a particular station. I will have 10 stations, and I want to be able to program the controller unit to have the train go to any of the 10 stations I choose. So basically if I want the train to go to station #8, I push the code for it on the remote and the train goes to that particular station. I appreciate any help on this subject. Thank you.


welcome to the site.


I don't know much about DCC but I would think so.
I will be watching for the answer along side you.


----------



## gc53dfgc

Well now ther is DCC programs that allow routeing by using computer programs like JMRI and I guess you could somehow use a randomization software in conjunction so it randomly selects stations and will not go to the same station twice in a row. 

The people over in Germany at wunderland have created there car system this way so I would also suggest learning German and heading on over and asking questions about it.


----------



## pepelepue00

thank you for the reply, but I don't want it to go to a random station. I want to choose which of the 10 stations it will go to. And, it will take me years to learn enough German,lol.


----------



## gc53dfgc

well now that would take years of programming of a cutsom program, GPS in the engine, and a GPS unit in each station so the computer system nows where the train is and where the station needs to get to and the switches that must be switched to get the engine to its destination when you hit a button that says station 6 per say.

That is the only way I could see it possible but would also be very costly.


----------



## gunrunnerjohn

Actually, if you had 10 stations, I would think that some track trigger for each station could tell the computer that the train is there and send the correct DCC commands. I know I can program my Lionel Legacy to do a complex route, complete with switch settings and the like. I'm sure the high end DCC systems have similar capabilities.


----------



## pepelepue00

Thank you, that definitely sounds doable. How do I get the train to stop at the station?


----------



## gunrunnerjohn

Well, I'm assuming you'd have a computer control feeding the DCC system, so when the train tripped the proper station sensor, you tell it to stop. 

Obviously, I'm assuming it's traveling on a route that passes all the stations, if not, you may have to program some switches to route it as well.


----------



## gc53dfgc

Like I said you would need to have a custom created computer program. I do not know if JMRI is capable of this kind of thing but I know that Digitrax and other command systems do not have this kind of capability at the moment. It is all preprogrammed routes. Now I may be wrong to this next part as I do not own a route programming capable system at the moment but it might be possible for a DCC command station to read the position of the DCC decoder of an engine on the tracks and adjust the routeing to get it to its proper destination but I am not sure of this capability and have only seen things close to it in Hornby DCC systems and maybe Digitrax. Unless the major DCC systems start offering this kind of thing it would require a custom program similar to JMRI to do what you want.


----------



## gunrunnerjohn

I'm thinking of a separate track sensor that would feed his computer that's controlling the train using the DCC system. I suspect that having the DCC system also manage all the track position sensors is probably not going to happen.


----------



## NIMT

The most efficent way that I have found to do that sort of task is with routeing done with JMRI computer software and an interface like the Digitrax PR3.

What everyone is trying to get at is called transponding (tells the computer where the train is) and yes you can make a train stop at a station with routes.


----------



## cabledawg

I think Digitrax sells a bunch of stuff for transponding. Head over to digitrax.com and see what they have and definately check out thier tech section. Lots of info from users posted up there and I know there is a section for programming using the PR3 and transponding.

http://tsd.digitrax.com/


----------



## gc53dfgc

NIMT.COM said:


> What everyone is trying to get at is called transponding (tells the computer where the train is) and yes you can make a train stop at a station with routes.


right but what he wants to do is say press station 3 have engine go and stop there and then press station 6 and have it go there and stop. You would have to have a very large number of routes to get it to work flawlessly. It either adds up to 1*10to the11th or 100 routes not sure of what the correct math would be to get the total number of required routes but it is a lot of route programming and I am not sure if even JMRI is capable of picking the correct route to get from one station out of ten to another station out of ten. I still stick to my theary that it can be done but someone will have to make a custom program to be able to do it or talk JMRI into doing it.


----------



## pepelepue00

well, actually, I want it to return to the main station after every run( there is the main station and 10 satellite stations). So, at first, when the train is at the main station, I put the code for station #8 so it goes to station 8. Then after stopping there, it needs to return to the main station. Then if I want it to go to station #5, I will then enter the code for station 5 and it will go to the station 5. After stopping at station 5, it will return to the main station when I tell it to. Thank you for all the replies.


----------



## gc53dfgc

pepelepue00 said:


> well, actually, I want it to return to the main station after every run( there is the main station and 10 satellite stations). So, at first, when the train is at the main station, I put the code for station #8 so it goes to station 8. Then after stopping there, it needs to return to the main station. Then if I want it to go to station #5, I will then enter the code for station 5 and it will go to the station 5. After stopping at station 5, it will return to the main station when I tell it to. Thank you for all the replies.


Well now that sounds a lot more do-able than the other way. I think then a Digitrax or similar system with a computer interface and JMRI and maybe a nice touchscreen like what Tankist has will do the trick. Touch screen is to select the station/route. This option you will not even need the transponding or whatever it is called. You just have to program the route to go to and back as a single station number.


----------



## gunrunnerjohn

Well, the train still has to know it's at the station, so I think track position sensing is still an issue.


----------



## pepelepue00

gc53dfgc said:


> Well now that sounds a lot more do-able than the other way. I think then a Digitrax or similar system with a computer interface and JMRI and maybe a nice touchscreen like what Tankist has will do the trick. Touch screen is to select the station/route. This option you will not even need the transponding or whatever it is called. You just have to program the route to go to and back as a single station number.



how do you send the train, to say, station #5 from the main station. How does the programming will cause the train to stop at that station. Thank you for your replies.


----------



## Xnats

I would think you would need a lot of custom scripting. You would need a engine tracker, turnout controllers and power interruption all working together. It would be cool to see, if someone got it to work.


----------



## gunrunnerjohn

This sounds a lot like a school project, which school is this for?


----------



## cabledawg

There's a guy here in town that has a layout which does just that. He runs the trains out of the staging to a designated point, then they return back or make a couple loops or whatever. If I can get ahold of him, I'll ask how he does it.


----------



## tankist

i see several ways to accomplish this, even without DCC. and in this case i think JMRI+PC solution is absolutley not optimal - we talking G scale here, chances are there will not be a PC in weatherproof shed outside. in a way this is similar to Elevator project, where cabin stops at desired floor. this can be accomplished with self hold relays and interupting detector switches (or expensive programmable logic controller). 

the approach to use will be determined by OP's skill at given field.

or are you looking for off-the-shelf solution?


----------



## pepelepue00

Thank you Cabledawg & tankist. Actually the entire setup will be indoors, so no chance of rain or snow interfering with the setup. Cabledawg, I would appreciate it very much if you could let me know how the guy has setup his train system. tankist, I am open to any possibilities as long as it does not cost a fortune or takes a year to two. Thank you


----------



## tankist

here is simple self hold relay.
principle of operation:
to start NO (normally open) button is pressed, current flowing energies the relay coil closing the bypass. whith button released relay is still energised - its being held on by its own latched switch.
pressing the NC (normally closed) button will interrupt the current flow, de-energizing the coil releasing the bypass. when NC-stop button released (making contact again) the system will not start.
other contacts in the relay are free to perform whatever work is needed















in your scenario you will have exactly as many self hold chains as you desire stations . NO becomes your command button, NC is a momentary presence detector at desired station. to restart (return to depot) another bypass button is used (not drawn). 

there, No DCC, no computers , no scripting solution if that is what you want.
i'm still not sure if you want to build something or just buy it off the shelf


----------



## pepelepue00

Tankist, that sounds like it should do the trick, thank you. Are these controlled by servos that are controlled via remote control device?


----------



## tankist

it sounds you like missed the point (perhaps it is me. i don't posess good explanation skills). NO is a button that you press with your finger to command destination, NC is a switch that is activated (opened) by your train when it gets to desired station. relay has more connectors (not drawn) and those control power to track. there will be a chain for each station. reactivation button is not drawn either.


----------



## pepelepue00

you are fine, sorry I am not very versed in electronics. I only have, some basic knowledge and skills in electronics. My question is, where are these buttons (NC & NO) located?


----------



## tankist

the one you pressing with your finger to command a destination station will obviously be on control panel of sorts within your reach. the one train activates to signal a stop will be near target station (perhaps weight or IR activated ).


----------



## gc53dfgc

I know what Anton is talking about now I think. Is this the same type of setup that you use for your turnout things on your new layout?

If this way does not work out for you the DCC+PC interface will since it is inside. I will explain how it would work to my best ability.

You have a never changeing start and end point which is the main station. You while in program mode for routes turn throttle on and then align the proper switches to get the engine to station one then stop the engine at station 1 for the desired time then reverse the engine back through the switches and realign them to the main line instead of siding and then stop the engine back at the main station and stop the programing for the route. Name it to station #1 and your first station is complete. You would do the exact same for the other stations that you would want. One thing to keep in mind is that the engine if taken off the track at the main station If I am correct about the JMRI program not being able to detect where the train is you will have to make sure to place the engine relatively close to where you removed it from. Maybe puting in a water tower where the engine will stop to give you a point of reference when replaceing the engine back on the track.

That is how I see it being done with a DCC+PC+JMRI setup.


----------



## pepelepue00

Thank you Tankist, are the buttons are wired from command station to each of the stations?

Thank you gc53dfgc, wow these are all new to me. I am going to research what you wrote so I can get a better grasp of what you are talking about. Also, I am going to look in to JMRI program to get more information as to the programming of it.


----------



## tankist

gc53dfgc said:


> I know what Anton is talking about now I think. Is this the same type of setup that you use for your turnout things on your new layout?


  huh? i have nothing of this sort on my layout.



> ...
> You have a never changeing start and end point which is the main station. You while in program mode for routes turn throttle on and then align the proper switches to get the engine to station one then stop the engine at station 1 for the desired time then reverse the engine back through the switches ...
> 
> That is how I see it being done with a DCC+PC+JMRI setup.


GC, i think you misunderstand JMRI capabilities somewhat. when you say "program mode for routes" what exactly do you mean? JMRI route (nor logix for that matter) does not have control over throttle . Routes simply set number of turnouts to specific position (and can turn on sensor to indicate route active).




with that rereading OPS original thread i realise that perhaps i misunderstood the task.


> I will have 10 stations, and I want to be able to program the controller unit to have the train go to any of the 10 stations I choose. So basically if I want the train to go to station #8, *I push the code for it on the remote and the train goes to that particular station.*


so what exactly you want? align number of turnouts with one click and set a path toone of the 10 stations.
or do you want the train to actually start moving untill it reaches that station?

if it is the former, you need a simple diode matrix - Steve's Page on Diode Matrix Turnout Control

if it is the latter you need self holding relay thingy. perhaps I drew it to abstract. below is a bit more elaborate drawing. should be self explanatory.















while both of these (setting turnouts and running train semi automatically) can be achieved with JMRI+PC it is way cheaper without. your BOM is couple diodes, relays and switches. ~20-30$ vs 150$ for dcc station +50$ stationary decoder( and maybe you will need more then one)


----------



## gc53dfgc

tankist said:


> huh? i have nothing of this sort on my layout.
> 
> 
> GC, i think you misunderstand JMRI capabilities somewhat. when you say "program mode for routes" what exactly do you mean? JMRI route (nor logix for that matter) does not have control over throttle . Routes simply set number of turnouts to specific position (and can turn on sensor to indicate route active).
> 
> 
> 
> 
> with that rereading OPS original thread i realise that perhaps i misunderstood the task.
> 
> so what exactly you want? align number of turnouts with one click and set a path toone of the 10 stations.
> or do you want the train to actually start moving untill it reaches that station?
> 
> if it is the former, you need a simple diode matrix - Steve's Page on Diode Matrix Turnout Control
> 
> if it is the latter you need self holding relay thingy. perhaps I drew it to abstract. below is a bit more elaborate drawing. should be self explanatory.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> while both of these (setting turnouts and running train semi automatically) can be achieved with JMRI+PC it is way cheaper without. your BOM is couple diodes, relays and switches. ~20-30$ vs 150$ for dcc station +50$ stationary decoder( and maybe you will need more then one)


I was not aware that the JMRI route capability did not have throttle control of the engine as well. I know Hornby has a computer inteface capable of this and Digitrax's super cheif extra is cappable of completely outomated routes includeing engine throttle control. Thank you for that info.

Threw in a link to the Hornby computer interface that includes throttle control. and the ability to program fully outomated routes.

http://www.hornby.com/hornby-dcc-135/r8144/product.html


----------



## tankist

JMRI does have capability to run trains automatically. however it is not accomplished by Routes, or not directly to be more precise. attached is Route edit screen. as you can see what is configgured here is collection of turnouts and sensors involved in routesetting, route trigger and actve indicator sensors. it also can play a WAV file and trigger a *script*. now in that script you can describe any desired Train behaviour. if you can code in python language (i can't, not yet at least)


----------



## gc53dfgc

Ok so the route system is not the same as Hornby's and Digitrax's then. While it can be done with JMRI it would basically require a computer language degree.

Your Idea might be the best option but being in only High school and just starting to delve into the world of electronics and i find what you are saying very complex while in fact it may not be I just have never heard of some of the stuff before.


----------



## tankist

gc53dfgc said:


> Ok so the route system is not the same as Hornby's and Digitrax's then...


huh? what system Digitrax have?


----------



## gc53dfgc

tankist said:


> huh? what system Digitrax have?


Digitrax if you get the Super Chief Extra it has the ability to do routes with full engine control and all and uses the loconet system as well. I am trying to save up for this system but saving a whopping 600 dollars is a long and dificult road when tempting engines and rolling stock go by.:laugh:


----------

