Huge fully automated Lego train layout
I've built a huge Lego train layout which is fully automated by a few Arduino's. The passenger trains ride around and after a while they stop at the station. The freight trains intersect with the track of a passenger train. A section of the track of the freight trains can be powered down: if the passenger train passes the intersection, the freight trains will stop. The trains use PWM signals to start and stop. For starting it is actually needed: otherwise the locomotive will disconnect from the wagons and drive away by itself. I've used four analog distance sensors to detect where the trains are. Since I had some Arduino's laying around, I was lazy and used three of them. That way I didn't really have to worry about race-conditions.