Flashing Ditch Lights

Revised 01-17-07

Click here for a detailed article on how these lights work.

Video in MP4 format / AVI format  (note: the AVI is MUCH larger)

This circuit utilizes a microprocessor to simulate the unusual behavior of ditch lights that are installed on some railroads' engines.  To make engines more visible than they would be with ditch lights that stay on steadily, one light brightens as the other dims.  This is not the instantaneous change that would be created if one bulb was turned on as the other was turned off but a gradual dimming / brightening that can be adjusted by a potentiometer on the board.

Click here for a modified schematic that allows for BRIGHT incandescent (halogen) lamps rather than LEDs
 

Click here for photos of the completed unit and more details about its operation.

There are two different circuit boards that are used to give different options with the ditch lights.  Each board & schematic is shown below along with programming and connection options specific to it.

 

This version of the board can be used in several ways:
  • 7 to 24 volts DC are supplied to the positive and negative terminals labeled "dc power - +.  This unit is not designed to operate directly from track power as there is no bridge rectifier.  It can easily be powered by a 9 volt or similar battery, by on-board battery power or by tapping into a constant polarity DC voltage that can be found on many engine's circuit boards.
  • The simplest program for this board has the two LEDs flashing at a rate determined by the potentiometer that is installed at the locations labeled "pot 10 K"
  • It can also be programmed to begin flashing only when a switch closure, connected through the 4n25 optoisolator.  This is usually supplied by a sound card so that the lights flash when a horn or bell sounds.  It could also be triggered by a reed switch mounted under the engine that is closed as it passes over track mounted magnets

The version of the board shown below can also be used in several ways:
  • 7 to 24 volts DC are supplied to the positive and negative terminals labeled "dc power - +. 
  • In addition this unit is designed to operate directly from track power when power is applied to the two pins labeled "TRACK".  Since the power is routed through a bridge rectifier polarity does not matter.
  • No matter how power is supplied, the simplest program for this board has the two LEDs flashing at a rate determined by the potentiometer that is installed at the locations labeled "pot 10 K"
  • It can also be programmed to flash at a rate that is determined by the track voltage.  When the voltage to the motor is low the lights flash rapidly.  As the voltage, and engine speed, increases the lights flash more slowly until they stop flashing and stay steadily on when full speed is reached.  The point where the light stop flashing is set by the potentiometer at the location labeled "pot 10 K"