Answers.Body: <p>I think I'd use the ultrasound sensor instead of the touch sensor (or the brightness sensor with the light turned on in a dark tunnel). I haven't tried this but I'd worry about the touch sensor derailing or scratching the train. Otherwse, your system sounds pretty doable. The collision risk could be addressed by setting up the sensor a little further before the station and sending a stop signal to the second train if it triggers the sensor while the first train is still at the station.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-02T11:42:05.983Z
Answers.Text: And if the train runs over a minifigure it would get stuck, so perhaps the train could be programmed to stop attempting to turn it's wheels if it detects a sudden drop in rotation speed.
Answers.UserDisplayName: mindstormsboi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-27T17:29:51.933Z
Answers.LastActivityDate: 2014-08-27T17:29:51.933Z
Answers.UserDisplayName: matega
Body: <p>I was wondering if anybody has ever tried using the IRLink NXT sensor to make an automated train system and if so, what kind of setup did you have to make it all work?</p>
  
  <p>I have been working on a train station for a while now and would like to create an automated system that will stop the train inside the train station for a set amount of time (maybe 30 seconds). As of now, I had an idea to use the touch and IRLink NXT sensors to make the system work. When a train approaches the station it will somehow hit the touch sensor. Then the IRLink sensor will send a signal to the IR receiver stopping the train inside the station. Then after 30 seconds, the IRLink sensor will send another signal to the IR receiver which starts the train. This will be continuous as the train track setup, as of now, is in a loop connecting both ends of the train station. I would also apply the same system on the opposing tracks in the station.</p>
  
  <p>Am I overlooking anything that might make this not work? Are there any better alternatives to the touch sensor? Does anybody have any ideas as to how to avoid a collision within the train station if two trains are approaching less than 30 seconds apart? And finally, are there any experienced NXT programmers that could give me some advice on the programming aspect of the system?</p>
  
  <p>I like this system because the train does not need any positioning awareness on the track for it to stop within the station every time.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-26T22:58:04.423Z
Comments.Text: Related: http://bricks.stackexchange.com/questions/1798/simplest-approach-for-rail-sets-automation
Comments.UserDisplayName: Ambo100
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-03T14:30:16.630Z
Comments.Text: Easier said than done guys ... I’ve been trying it for a year now. Arduino and Lego esp. with PF system are extremely complex and require advanced programming skills as well as expertise in coding.
Comments.UserDisplayName: Kyriacos
Tags: <nxt><programming><trains><power-functions><automation>
Title: How to build an automatic Lego train system?
UserDisplayName: Stefanos Koutsoukos
ThreadText: # How to build an automatic Lego train system?
  
  (Asked by: username_0 on 2014-08-24)
  
  I was wondering if anybody has ever tried using the IRLink NXT sensor to make an automated train system and if so, what kind of setup did you have to make it all work?
  
  I have been working on a train station for a while now and would like to create an automated system that will stop the train inside the train station for a set amount of time (maybe 30 seconds). As of now, I had an idea to use the touch and IRLink NXT sensors to make the system work. When a train approaches the station it will somehow hit the touch sensor. Then the IRLink sensor will send a signal to the IR receiver stopping the train inside the station. Then after 30 seconds, the IRLink sensor will send another signal to the IR receiver which starts the train. This will be continuous as the train track setup, as of now, is in a loop connecting both ends of the train station. I would also apply the same system on the opposing tracks in the station.
  
  Am I overlooking anything that might make this not work? Are there any better alternatives to the touch sensor? Does anybody have any ideas as to how to avoid a collision within the train station if two trains are approaching less than 30 seconds apart? And finally, are there any experienced NXT programmers that could give me some advice on the programming aspect of the system?
  
  I like this system because the train does not need any positioning awareness on the track for it to stop within the station every time.
  
  **Tags:** nxt, programming, trains, power-functions, automation
  
  > **Comments:**
  > **username_1**: Related: http://bricks.stackexchange.com/questions/1798/simplest-approach-for-rail-sets-automation  
  > **username_2**: Easier said than done guys ... I’ve been trying it for a year now. Arduino and Lego esp. with PF system are extremely complex and require advanced programming skills as well as expertise in coding.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2014-08-27. Score: 3 | Accepted answer
  
  I think I'd use the ultrasound sensor instead of the touch sensor (or the brightness sensor with the light turned on in a dark tunnel). I haven't tried this but I'd worry about the touch sensor derailing or scratching the train. Otherwse, your system sounds pretty doable. The collision risk could be addressed by setting up the sensor a little further before the station and sending a stop signal to the second train if it triggers the sensor while the first train is still at the station.
  
  > **Comments:**
  > **username_4**: And if the train runs over a minifigure it would get stuck, so perhaps the train could be programmed to stop attempting to turn it's wheels if it detects a sudden drop in rotation speed.  
  
  ---
  
  