DCC Breaker - Shorts Handling - Technical Description
Old thread but...
I've been researching this and am about to build and test. In the meantime here are the results of my studies. First an overview, then the details (in additional posts) -
1) Detection - very low current is NOT a priority and triggering at exactly 10mA over the setpoint is an unrealistic requirement for a DCC Circuit Breaker (a short will go well over the setpoint). Current Transformer type detectors provide complete electrical isolation and are easily accurate enough for a Breaker and so for this task can be simplified and made user adjustable to a trip point that applies to each protected District.
2) Power Source - 20 to 100mA at 12 volts or so is required to operate MosFet power transistors, polarity switching relays and microcontrollers. This is best taken from the DCC Booster input to the Circuit Breaker; this allows easy installation at any (remote) point on a layout. [Z scale at 9V Direct Current into a Booster appears on the Rails as a Differential 18V, so 12V is available from even the smallest of scales]
3) Interacting with DCC - The Differential DCC signal is a constantly swapping voltage applied to the Rails. DCC Decoders use 2 (or 4) diodes to create a local 'floating' zero volts and a 'floating' positive voltage above that; this is NOT useful for a DCC Circuit Breaker. A circuit to break the DCC must somehow remain permanently 'linked' to the DCC signal, here's how its done -
Any electrical storage device (capacitor) connected BETWEEN the Rails AND isolated by a SINGLE diode from one of the Rails will store voltage "relative to the volts value of the other Rail". The volt level stored on the capacitor is therefore LINKED to the volt level on one DCC Rail.
That is - if Rail A is at zero volts then Rail B will be at +X volts. A diode connected from Rail B allows a capacitor to charge up to [+X (- diode drop)] volts relative to a direct connection to Rail A. (A current limiting resistor reduces inrush current so that charging takes about 0.5s at first switch on). Thanks to the diode isolating the positive side of the capacitor from Rail B (once charged) the relationship between the voltage on the capacitor positive side and the voltage at Rail A will be held constant (that's what capacitors do).
When Rail A is at zero volts the isolated capacitor positive voltage will be at [+X (-diode drop)] volts (Rail B at +x volts) and
when Rail A jumps to +X volts the isolated capacitor positive voltage will be instantly pushed up to [+X + +X (-diode drop)] volts (Rail B at zero volts is blocked out by the isolating diode).
Rail B voltage is irrelevent; the isolated capacitor positive voltage above Rail A voltage is ALWAYS [+X (-diode drop)] volts so any components placed between the isolating diode and Rail A are in a plain Direct Current circuit. This whole sub system will appear to us dumb humans to be jumping by +X at the DCC data rate, but to any components in the sub system it is always just plain, non jumping, Direct Current.
The storage can be done both ways at once to create 2 'linked', isolated voltages, but they MUST NOT be connected together ! The MERG Breaker uses this in order to monitor voltage drop across a 0.22 ohm resistor in both DCC busses.
4) Breaking DCC - Relays are NOT a good idea; several amps at more than 20 volts WILL burn the contacts and this will create unacceptable resistance quite quickly and stop working very soon.
Using a cheap N-Channel MosFet power transistor rated well over the DCC power levels is easy, BUT will only cut off half of each DCC Differential signal because the body of every MosFet is a reverse conducting diode. Using 2 N-Channel MosFets back-to-back WILL break DCC, but the driver circuit for 2 directions is complicated and costly, UNLESS there is a power source [10 volt higher than the signal to be brocken] available ... like described above ...
All that is required is to use the isolating trick twice, once to collect power onto a storage capacitor to drive the MosFets when the Linked Rail is at zero volts and once again, from the stored voltage, to a second isolated capacitor to drive them when the Rail is at +X volts. The isolated capacitor actually driving the MosFets is called a 'bootstrap'.
5) Passing Signals between normal DC and the [isolated Bootstrap capacitor] DC - Use an opto coupler. The voltages each side of the opto are irrelevent; each side just works in its local DC circuit passing signals between them with light (that's what opto couplers do). Isolating Transformers may also be used but they require Alternating Current and are both more complicated and more expensive.
6) Controller - almost any modern microcontroller will do. With the adition of a 5V (or 3.3V) regulator a controller can connect to the isolated DC Linked to one DCC Rail described above. I'll be presenting an Arduino Uno based solution in a later post.
7) Beyond Breaking - Short circuits ain't always plain short circuits. Stay-Alives and the large storage capacitors on sound decoders are just temporary high demand devices at start-up. Lower power Boosters may require help when powering-up multiple Trains, a smart Detect-Charge-Break-Pause-Repeat sequence WILL help. Automatic polarity changers for turnouts react to short circuits deliberately caused by crossing gaps in Rails; these can swap the polarity of both Rails (Loop Reversing) or joined Rails (Frog Juicing).
8) Polarity Reversing - 2 Current Transformers and 4 pairs of N-Channel MosFet power transistors with opto couplers and bootstrap capacitors can be used to change polarity; NCE does this on its PSX Reverser, and so does TXX on their Power Shield. But it is not really necessary.
A microcontroller can Break DCC in less than 1ms and a relay with no power on its switching contacts can changeover in less than 10ms; with safety delays this means cheap mechanical changeover in 25ms or less, plenty fast enough (1 / 40 s). If Breaking DCC to both Rails is really necessary then for DIY 2 Breaker circuits and a relay module will be cheaper (high volume buyers will get significantly lower prices so they may go other ways).
Ordinary relays switching with no load have an average endurance of over 2 million cycles, That's once a minute for 4 years !!!
9) Modular Construction - For DIY it makes sense to build simple, cheap, universal modules and combine them in various ways to create complete devices.
I intend to create individual Breaker modules (with optional Current Transformer Detector and 5V regulator) that will connect to an Arduino Uno shield (that I will also create). For Frog juicing or Loop Reversing dual Relay modules ($2 on eBay) may be connected to the Shield and to the Breaker output.
Additional outputs from the Shield (and / or through the Breaker modules) may connect remote indicator LEDs, annunciators, Manual Reset switches or (via external opto couplers) Layout Control systems.
stay tuned ...