To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.trainsOpen lugnet.trains in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Trains / 10112
10111  |  10113
Subject: 
Re: automating switching rails
Newsgroups: 
lugnet.trains
Date: 
Mon, 5 Mar 2001 08:03:46 GMT
Viewed: 
1313 times
  
Hi
Could you show me the instruction of your motorized switch point if you don't mind?

Br
Zhengrong

Ed McGlynn wrote:

In lugnet.trains, Ed McGlynn writes:
In lugnet.trains, Scott Arthur writes:

Does the train trip the RCX? If so, how?

Scott A


Scott -

Surely I left out a lot of detail regarding the RCX!
The RCX is running the train around a circuit in a loop, with inputs from • touch
and light sensors to determine train passage and location.  Randomized • counters
keep the program from repeating at a predictable point, so it's cool to just
sit back and watch the RCX control a train around a loop, throw a switch, • back
into a siding, pick up a car, bring it out, repeat, and drop the car off on
another siding.  I've really got to get more details about this on the
website...ah, time...

Ed

OK. You've got my attention now. I'm very interested. How does the train trip
the touch sensor? (Please don't say it rams into it).

Scott A

;^)

OK - I won't say it!
Slam-o-rama, but it's not as bad as it sounds.  The RCX ramps down the engine
speed when it's backing down a siding, until it clicks on a car and bumps into
a buffer that's got a touch sensor embedded within.  I tried mounting the • touch
sensor in parallel to the track so it could trip it as it brushed by, but it
didn't look like a railyard type of instrument.  You expect a buffer at the • end
of a siding, so why not make it smart with a touch sensor?  The car that the
engine picks up is already touching the buffer, so a gentle nudge is all it
takes.  After the touch sensor sends an binary change of state back to the • RCX,
The RCX stops the engine, pause a bit (gives the LEGO train figs time to • reset
the brakes), and ramp up the output to the track from the RCX to have the
engine and car pull out from the siding and onto the main line again...

I'll spend some time on this this weekend and post more details, pictures, RCX
code, whatever I can.

Thanks,
Ed

I've posted a listing of the RCX program I use to control a 9v train around a
closed loop.  It's an example of what's possible, but it's simplified.  I left
out the uncoupler logic and hardware for now, as it's not passed the test of my
4yr old and 7yr old sons.  If it doesn't hold up, they won't play with it or
enjoy it, so I've got to beef it up a bit.  The uncoupler is meant to go near
the end of the siding you'll see in this picture:
http://www.geocities.com/ejmcglynn/lego/RCX_Train_Loop/backing_down_siding.jpg

...about where the engine is located at the time of the photograph.

Here's a closeup of the heart of the setup - the automated switching shed:
http://www.geocities.com/ejmcglynn/lego/RCX_Train_Loop/switch_house_with_light_
sensor.jpg

The light sensor is used to watch for the passing of the train and iterate a
counter.  After a preset number of passes, the RCX logic initiates a halt to
the engine, switches the points, and backs it down the siding to pick up the
waiting car.  In the full version of the program, the uncoupler operates every
other cycle so the engine picks it up once, runs around the main line loop a
bunch of times, then returns the car to the siding, where the uncoupler
activates - leaving it behind to be loaded, serviced, etc.  The next pass will
pick it up, and so on.  I put on another touch sensor to manually initiate the
backing routine.  The kids get impatient, and want action at the touch of a
button some times.  Kids are cool that way.  :^)

Here's a layout of the RCX code is use in this example:
http://www.geocities.com/ejmcglynn/lego/RCX_Train_Loop/rcx_train_loop.html

Each column represents a column of code in the Mindstorms programming
environment.  I really need to put this into NQC to allow more flexibility...
Anyway, there's also a Track Designer layout of this Train Loop example, and
another overall picture of the layout.

The point of all this was to generate a working automated layout for a train
show I was doing - and hope to do again next year - in Binghamton, NY.  I
wanted to have a chance to talk to folks that stopped by my table instead of
operating the controls, switches, motors, accessories, etc.  It unleashes me
from the controls so I can mingle and check out other layouts and ideas.  So
far, no other LEGO at this show, but I'm stirring the pot.  The layout I use
there is more complicated, yet simple enough to fit on a 3'x8' table.  It's a
lot of fun, and I encourage anyone to get a table or two at a small local club
show and chat it up.  Be prepared to be ignored by the establishment!

Other pictures I've got handy at the moment...
Buffer sensor (cheap and dirty version):
http://www.geocities.com/ejmcglynn/lego/RCX_Train_Loop/buffer_sensor.jpg

Pulling the car out of the siding and onto the main line:
http://www.geocities.com/ejmcglynn/lego/RCX_Train_Loop/pulling_out_of_siding.jp
g

If you have any questions, please ask!

Ed



Message is in Reply To:
  Re: automating switching rails
 
(...) touch (...) end (...) RCX, (...) reset (...) I've posted a listing of the RCX program I use to control a 9v train around a closed loop. It's an example of what's possible, but it's simplified. I left out the uncoupler logic and hardware for (...) (24 years ago, 1-May-00, to lugnet.trains)  

13 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR