Hello Rob
I know the ultrasonic distance ranger but for me it is much too big.
I want to model the very famed lisbon tram line #28 each tram in HO scale is about 92 mm length, 26 mm width and 45 mm height
with a very unusual track configuration and gauntlet.
You can find a lot of images on the web..
With IR sensor,it allows to have a configuration for trams like on image img_5380
I need to have a processor in the tram for distance sensing, acceleration and deceleration. I'll use an AC square power supply and rectify it to get the supply for electronics and motor. For the stopping section in front of a special track arrangement I'll make a dissymmetry in the supply ac voltage and the detection of it (easily made with a transistor) will stop the car. For a tight route between the building, the distance sensor will detect approaching the buildings and automatically the processor decreases speed.
There is still a problem: when two trams are facing each other in a standard double track arrangement, what will be the behaviour of the distance detector. I can slightly rotate the detecteur to the right in each car but I can't be sure of the result without testing it.
I have a B plan in case my dream can't be done; simply using a block system, and having no electronics in the car.
very attractive but less realistic. The electronic will manage priority between cars in the special track arrangement like gantlet and single track. Reducing speed will be made easily by adding diodes in the dc supply.
It's all my thinking about how to get my Lisboa tram system going.
Regards
Patrick