EffectDecoder: a Software for OpenDecoder (V.1)

Overview

    This software is able to generate special light effects, with emphasis on running lights, light columns and the like. All modes are working with a variable timing engine, the fading of the individual bulbs occurs with an adjustable curve.

    This software acts as a simple accessory decoder, only DCC basic packets are evaluated, neither a DCC broadcast nor the reset packet is evaluated. The setting of the operating modes and the address is done by simply pressing the programming button and sending a switch command.
    There are following modes available:
      ModeOperation
      0 running light for construction sites, this can either go gently (smooth transistions) or jumping with flashing lights.
      1 Light chain forward. One or several points of light pass hop along, with the point of light can enter at the beginning again seamlessly.
      2 as 1, but backwards
      3 light column
      4 reserved
      5 reserved
      6 reserved
      7 reserved

Programming

    The setting of the operating modes and the address is done by simply pressing the programming button and sending a switch command. The contents of the first received command determines mode and address.
    1. Press the programming button for at least 100ms, the LED will light. This indicates that the decoder is ready for receiving a programming command.
    2. Submit a switch command. The decoder 'learns' its base address according to the following rule:

           Base address = (address sent - 1) / 4 (fractional part ignored)

      The decoder is now programmed to the following addresses: base address * 4 +1 upto base address * 4 + 4

      The above fractional part is now associated with the "coil" (red or green). This value is used to set the operating mode:
        Operating Mode
        0 2 4 6
               
        Switch 1 Switch 2 Switch 3 Switch 4
               
        1 3 5 7
    Example: Assuming a received switch command for turnout 18/red, the base address is set to 4, and the decoder ist programmed to switch addresses 17-20. The decoder runs in mode 2.

The modes

    In general, the OpenDCC Opendecoder does required a pause between commands. This is true even during dimming! (Note: there are of-the-shelve decoders, which cannot take a new command for 400ms when processing the old command).

    The effect decoder evaluates only the "coil-activate" commands, "coil-off" commands are ignored and are replaced by the pre-programmed brightness transition. Some command stations (like IB) even don't send coil-off commands.
  • Mode 0, construction site chase
    This mode controls the outputs to form a construction site chase. Light is running from output 1 to output 8.
      Button Effect
      1 All switched off.
      2 The chase is on; slow running speed and gentle up and down dimming of the lamps
      3 The chase is on; fast running speed and lightning-flash of the lamps.
      4 reserved
      5 reserved
      6 reserved
      7 reserved
      8 reserved


    Connecting the decoder for running lights
  • Mode 1, Light chain forward
  • Mode 1, Light chain backwards

Adjusting for other lighting effects

    See also the notes on the software and the comments in the source code. For each output, both the rise time and fall time are configurable, and the blink rate and a start delay can be specified. For more information please refer to the source code.

    Some ideas:
    Gas light flicker: After turning first, then gradually brighter. In the flickering with random controls. After about 5 seconds to reach its full luminous lanterns. In operation, the flickering lights here and there at different times (short dim down). At shutdown: first continue with moderate luminosity and then expire after 1.5 s.
    Advertising light: flashing light column, then three times, diverge.
    Electronic fire, welding flash
    4 normal light outputs, four double-speed camera, (for vehicles), pause at the outputs differ.
    Sequences for buildings: first on the base floor, then (blue flickering TV) then the staircase, then up, then all over.
    Random generator

Download / Unterlagen:

    The software is released under the gnu public license. Should someone build a new decoder with it, I would be happy if this is published here as well. And money or material donations are also welcome ;-)

    Download Hexfile and Source Code