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 / 8547
8546  |  8548
Subject: 
Re: "No Contact" Homebrew Train Sensor for Mindstorms
Newsgroups: 
lugnet.trains, lugnet.robotics
Date: 
Tue, 5 Dec 2000 19:36:53 GMT
Viewed: 
1584 times
  
Wonderful info! If I could be so bold... On the PNLTC web site we have
articles that discuss various building and other techniques. This reed
switch discussion and design review would make a great article (with some
pics & schematics) for NELUG! (see http://www.pnltc.org/Articles.html for
some examples) I really think this kind of info is what the LTCs can provide
well to each other and individuals.

With that said...
Now that the motorized, RCX controllable, switch track is working my next
step is to control (via RCX) a train so that the couplers can be aligned
with Rick Clark's great motorized decoupler.

The plan is to use a reed switch, but LEGO based. A LEGO magnet would be
attached at the end of a long plate. The plate would pivot at the opposite
end and rest on a touch sensor. When the train drives by the coupler magnets
would lift the arm thus opening the touch sensor. Or it could work via
repulsion and thus press the touch sensor.

My original design was to build this under the track since this is where the
"hump" is in the hump yard. But maybe this could work along the side of the
track as well (of course accounting for no gravity assistance)...

SteveB
PNLTC



In lugnet.trains, Chris Phillips writes:
As has already been reported by others, I built an automated railroad
crossing for the NELUG train display at last weekend's Greenberg show.  I
wanted to take a moment to describe the "homebrew" sensor that I used to
detect an approaching train so that others might benefit in their own layouts.

I originally tried several techniques to detect the presence of a train,
including the touch sensor, the light sensor opposite a light source, and
the good old infrared "radar" technique that has been well-documented on the
robotics forum in the past.  I also considered using Vision Command, but I
didn't want to have a PC in the loop if I could avoid it.  None of these
techniques was very reliable: I couldn't find a good way to trip a touch
sensor without derailing the train, and the other techniques required a lot
of highly visible and unsightly "plumbing" somewhere along the track.  I had
pretty much abandoned the idea of using an RCX to detect a train before I
remembered an idea that I had awhile back but never tried, due to my
semi-irrational aversion to non-LEGO solutions.

I used reed switches which are small switches encased in glass that close
whenever a magnetic field is present.  I simply chopped a long electrical
connector in half, (ouch!) soldered the reed switch to the bleeding end, and
connected it to an RCX sensor input which was configured as a touch sensor.
Voilla!  The RCX could easily detect the presence of a magnetic field as if
a touch sensor were being pressed.

I then placed the touch sensor _lengthwise_ along the track, and found that
the magnetic couplers between the train cars were strong enough to trip the
reed switch.  (At first, I placed the reed switch perpendicular to the
track, but this didn't work due to the alignment of the magnetic field from
the train magnets.)  It was then a simple task to program the RCX to close
the drop-gates and turn on the signal lights at the crossing.

I went to Radio Shack to buy the reed switches.  The 'Shack used to sell
reed switches in a pack of four, but they don't any more.  Instead, I looked
at their home security stuff and found a sensor/magnet pair for $4 that I
was able to extract the reed switch from.  If I had more time+patience, I
would've gone to a larger electronics store and bought a pack of reed
switches instead.  It would've been a lot cheaper, and also I broke 2 out of
4 switches during the extraction process -- they are _very_ delicate!

At first, I didn't think the train magnets were strong enough to trip the
reed switch, so I stuck one of the Radio Shack magnets onto a 2x4 plate
(using the double-sided tape supplied with the magnet) and attached it to
the underside of the locomotive.  This worked great.  But later, we removed
the non-LEGO magnet from the train and found that it worked anyway.  I think
the reason this didn't work the first time I tried it was that I had the
reed switch oriented perpendicular to the track, because it fit between the
ties better that way.  However, I soon discovered that even the more
powerful magnet would not trigger the reed switch unless the N-S poles were
aligned lengthwise with the switch, and by then we had already attached the
stronger magnet to the train.  We turned the magnet and reed switch
lengthwise because we wanted to hide the offending non-LEGO magnet
completely on the underside of the loco; otherwise we might never have
discovered that the LEGO magnets alone will do the job!  So I must emphasize
that, although it is tempting to lay the reed switch between two ties, it
will only work with the train coupler magnets if the switch is lying
lengthwise along the track.  Otherwise, you'll need to add extra magnets
that are aligned side-to-side in order to trip the switch.

For the show, I simply used the RCX to close the gates for a fixed length of
time whenever it sensed the train coming.  This worked OK, as long as the
speed and length of the train remained constant.  But for our next show
(which I have now been tasked with creating several more crossings for) I
will improve the software to sense each train coupling as it passes to
determine how long to keep the gates down.  I also plan to use multiple reed
switches at each crossing in order to detect a train approaching from either
direction, and also to detect the actual speed of the train on-the-fly.

Anyway, I was amazed at how well this technique worked once I figured out
the alignment thing.  Maybe LEGO will add a reed switch sensor to the
Mindstorms product line so that I won't have to feel guilty about using a
non-LEGO component in our otherwise pure-LEGO train display.  Here's hoping...



Message has 1 Reply:
  Re: "No Contact" Homebrew Train Sensor for Mindstorms
 
(...) This is a great idea. I will talk to Chris about it and we can try and document it with pictures on the NELUG site. Eric Kingsley The New England LEGO Users Group (URL) (24 years ago, 5-Dec-00, to lugnet.trains, lugnet.robotics)

Message is in Reply To:
  "No Contact" Homebrew Train Sensor for Mindstorms
 
As has already been reported by others, I built an automated railroad crossing for the NELUG train display at last weekend's Greenberg show. I wanted to take a moment to describe the "homebrew" sensor that I used to detect an approaching train so (...) (24 years ago, 5-Dec-00, to lugnet.trains, lugnet.robotics)  

21 Messages in This Thread:








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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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