> Ok, I am in India. The tracks run through tunnels. When the train is 2 KMs away from the tunnel, we need to switch on the light to 100% brightness and when the train passes away by 2 Kms, need to dim the light to 20%.Yigit, your idea of using the timetable is ok if the trains run on time. Well, here it is not so. Moreover if the time table is changed, then all the detectors needs to be reprogrammed in the field that is nearly not possible. > Hope I have answered the questions. Nope :-). LASER <- A fixed LASER can EASILY cover 2 km in most conditions. RADAR LIDAR Distinctive whistle Radio Light beam interruption. Wires - electrical Wires - mechanical Telephone. Employ somebody cheap to watch. Really really really really sensitive magnetometer. Smell / Odor (actually a(n unlikely) possibility!) Thin pipe (air / water / vacuum) (See Gus) ______________________________________________ OK. Death of 990 cuts commences. ie a FEW questions have been answered, but a full description of the problem would help. We are the Indian Railways department / subcontractors /... We are Cornish Pirates [tm] attempting to divert the train to its doom on the coast so we can salvage its goods. We ... The lights mentioned are - the lighting inside the tunnel. <- presumably The signalling lights at the tunnel entrance - a carnival we run for train passengers - advertising signs that ... The lights are needed because - The train has no lights of its own - people camp in the tunnel and the driver likes to know this. - Animals may enter the tunnel - Rockslides happen - Terrorists happen - All of these - None of these, but ... We need to do it when the train is 2 miles way because - it travels at C and that gives us 1/93,000 th of a second for the lights to come on. - The lights are fluorescent / CFL / beeswax tapers / oil lamps and it takes several minutes for the output level to stabilise. - It gives the train time to stop if the lights do not work. We are brighting the lights up only when the train comes because - Any money we save we get to keep - it increases lightbulb lifetimes. - energy costs money and the department has a fixed budget - none of your business*. We do not replace the xxx lights with LEDs that last far longer and use far less power because ... . We can use radio We cannot use radio because ... We can use wires We cannot uses wires because ... There is good line of sight from X% of the track at about 2 km away. We can't see nothin nohow. The train always blows a very distinctive whistle The train COULD blow a distinctive whistle Whistles are forbidden ... The train could shine a LASER The train could interrupt a LASER beam. The trains could trigger a LASER beam. We import our atmosphere from mainland China and a LASER beam would not reach 2 km. We don't want no stinking LASERS. The lights need to be brighter because .... We dim the lights because .... Why should we care? Other things that would be useful to know are: ... There are ....... other useful things that I should tell you that would help the solution greatly but which I will not tell you until after you ask ...... more questions. * This answer may be used elsewhere as required. Russell --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .