Is it possible to use a LEGO NXT ultrasonic sensor for a LEGO train crossing? I was looking at LEGO NXT components, and I found the ultrasonic sensor. I was wondering that if I put off to the side of the track, the nose of my train would activate the sensor, thus operating the servo and closing the gate?... I have already prepared my crossing with a gate attached to a 12 stud axle. At the end of the axle pointing away from the track, a servo would  move the axle at about 45 degrees. Is this possible or are there any alternatives that would work better? I'm not sure if my idea has been attempted before with Power Functions tracks. Also note that I am using a 32x32 base plate. I am hoping that I won't have to use a Mindstorms control panel (I'm not entirely sure what they're called) because they are so expensive.
As you suspected, you cannot use the Ultrasonic sensor without an "Intelligent Brick" (EV3 or NXT). MINDSTROMS would be a great way to automate your train if you are willing to make the investment.

For more ideas on how to use LEGO MINDSTORMS with LEGO trains, check out Sioux.NET.