Accessory Decoder

== What is an Accessory Decoder? ==
Accessory decoders can be used to control turnouts, structure lights, scene lighting, animation, and signalling. 
An NMRA compliant accessory decoder (sometimes called a stationary decoder) is intended to be controlled by the same DCC power used for multifunction decoders or via the throttle bus. From a DCC perspective, the difference is address partitioning and types of outputs. Whereas a multifunction decoder drives motor with all its speed controls, momentum, braking etc., an accessory decoder is only concerned with on/off (or "forwards/backwards") functions for accessories. Accessory decoders intended for signalling applications may have additional states for that purpose.
=== Accessory Decoder Addressing ===
 Accessory Decoders have the address partition of 128 to 191. They can have a 9- or 11-bit address. Extended Accessory Decoder Addresses use the 11-bit address.
Accessory decoders that have extended addressing will not interfere with multifunction decoders. For more, see Will accessory decoders having extended addresses interfere with multifunction decoders?
Also see Configuration Variable CV29 and CV articles for more information on Accessory Decoder Configuration.
 use one of two addressing methods:
# Decoder Address
# Output Address
===Applications===
A primary use of accessory decoders is controlling turnout motors so many are specifically designed with this purpose in mind. There are two common types of turnout motor; solenoid (e.g., Peco Point Motors) and stall motors (e.g., Tortoise Switch Machines) and each requires a different kind of electrical drive. The solenoid type requires a short but powerful pulse of current to snap the turnout from one way to the other whereas the stall type require a constant but low current to drive a geared motor slowly from one side to the other. They are called stall type because they will stall when they reach the mechanical limit and the stall current can be maintained indefinitely to hold the switch blades in position. The solenoid type will be destroyed if current flow was not cut off. 
Solenoid motors are best driven by a capacitive discharge device that uses the energy stored in a large capacitor to supply a short, powerful pulse to the electromagnet without the risk of overheating it. Some accessory decoders have this capacitor built in; others simply allow you to set the pulse duration. Solenoid types can be 2-wire or 3-wire; the 2-wire ones use a single coil with the polarity of the DC voltage determining the direction of throw whereas the 3-wire ones use two coils, one for each direction.
Regardless of the motor type, a pair of decoder outputs is required for all turnout motors, one to set the primary route and one to set the diverging route. This output pair has a single DCC Accessory Address.
Another common use for accessory decoders is signaling; either electromechanically operated semaphore arms or colour light signals. Again, standard practice is to use a pair of decoder outputs to drive a single signal. For Multi Aspect Signaling, where there are more than two lights involved, things get a bit more complicated.
An accessory decoder can be used to control any other simple on/off function such as structure lighting, animation effects, crossing gates, water pumps, etc. Also, there are no DCC police to say you can't put a accessory decoder into a piece of rolling stock. For example, you could install a small one in a dining car to control the lighting. Decoders made for this purpose are usually called function only decoders
===Output Types===
To summarize, this table shows the various types available:
Type 	Description 	Example Uses
Momentary Pair	Pulse output 	Solenoid or snap type turnout motors
Momentary Pair	Pulse output 	Solenoid type semaphore signals
Constant Pair 	Constant bidirectional output	Slow motion stall-type turnout motors
Constant Pair 	Constant bidirectional output	2-Aspect colour signals
Single 	On/off type output 	Structure lighting
===Power Sources===
==== DCC Track Power====
An accessory decoder can draw its power from either the track supply or a separate DCC supply bus. This is the sole method available if the decoder is mounted within a piece of rolling stock.
==== External Power Supply ====
An accessory decoder can be powered from a completely separate power source, even while receiving its control signals from the DCC track power or another DCC supply bus. This feature offers several advantages, as outlined below (see Avoid Connecting to Rails).
===Control Types===
To be considered “DCC Compatible,” an accessory decoder must receive control signals from a DCC source, regardless of its power source.
Many accessory decoders support dual control paths, using a DCC bus and/or throttle networks.
Some accessory decoders only accept control signals from proprietary throttle networks, which are not DCC and may not be compatible with other manufacturers’ equipment.
===Avoid Connecting to Rails===
Most accessory decoders can connect directly to the track for power and DCC commands. 
However, it’s not recommended to connect them directly to the rails if your DCC system allows an alternative method. This is because the decoders will draw power that could be used for locomotives and other rolling stock. DCC power is expensive compared to a traditional power supply. 
* A more important reason is that if there’s a short on the line (often caused by running a turnout against you), the stationary decoder controlling the offending turnout won’t have power. You’ll have to move the locomotive by hand to clear the short.
* If the decoder has an external power source, use it. If it also allows an external method of receiving commands, use that too. For example, a Digitrax accessory decoder can receive commands and send decoder status information back to the command station through the throttle network (LocoNet in Digitrax's case).
* If you must use track power, use a power-managing device to create an isolated accessory decoder power bus independent of track power. Another solution is a separate bus driven by a dedicated booster exclusively for accessory decoders.
Using track power for commands instead of a throttle network or dedicated bus creates an endless loop. A locomotive shorting out a turnout shuts down the track bus. The accessory decoder can’t clear the short by realigning the switch rails if it gets its commands from the track. The track bus is reenergized, the power is cut, and the cycle continues.
By employing a seperate bus for device commands, this issue is mitigated, as the accessory decoders will receive their commands independent of the track bus.
== Further Reading ==
* Accessory Decoder Addressing
* Multifunction Decoder - A decoder mounted in vehicle, such as locomotives or rolling stock.
* Function Decoder, used to provide additional functions or functions in rolling stock.
* Signal Decoder - Accessory decoders suited to controlling signals.
* Other DCC Equipment
Category:DCC
Category:Decoder
Category:Accessory Decoder