All of my electric locos and units are being fitted with a ‘pan flash’ system. This comprises of a small LED fitted just under the pantograph head, a 1k resistor, a reed switch and a bridge rectifier. The power from one side of the track is wired through the reed switch into one of the ac inputs of the bridge rectifier. The other ac input is wired back to the other side of the track feed. The + output from the bridge is connected to one leg of the resistor with the other leg connected to the + on the LED. The other side of the LED is wired back to the - on the bridge. The reason the power goes through a bridge rectifier is so the LED will work regardless of the direction of the loco.

To make the LED flash you just fit magnets under the track where you want the effect to happen.