| Current-Sensing DCC Detectors |
 |
I've been tinkering around with DCC detectors,
trying to get Wayne Roderick's Optimized Detector to work on a breadboard when I came across this design on the web. This is
about as simple as it gets as far as raw part count is concerned. I show a possible way to get an open-collector output that
can be used as an input to the CMRI interface. I love this design because of its simplicity and minimal parts count on the board.
With five turns through the transformer, this can detect 20K ohm resistor wheelsets. This circuit also contains the fast-attack,
slow-decay feature found in many other detectors. |
 |
I still wanted to know if the overall complexity
of the these circuits could be simplified even further. A 555 timer contains two comparators and a flip/flop, so Richard's
circuit, although simple to build with minimal parts count, is actually more complicated with more circuitry. Wayne R.
was able to take Dick Bronson's detector published in MR awhile back and reduce it from
three comparators down to two. If it can be reduced from three to two, why not one comparator? The circuit to the left shows
just such a solution. Now, four detectors can be built from just one LM339 quad comparator chip and four discrete
bipolars. The nice thing about this circuit is that it doesn't rely on resonance to work so that means it can work with
other current-sensing transformers that have different output inductances without trying to figure out the correct capacitor
to use. The Schmitt trigger remains and is formed by the LM339, 470K resistor, and the voltage divider resistors. The divider
values are somewhat different than Wayne's. I believe four detectors can be built for under a dollar total (minus the current-
sensing transformers)!!! How it works: When a load is applied across the tracks, the transformer amplifies the DCC signals. The
transformer output serves as the input to the base of the 2N3904 bipolar transistor. The diode clamps this output to 0.7V which
is still enough to the turn the bipolar on. The bipolar collector node pulls down on the 220K and 1K resistors thus
charging up the 10uF capacitor rapidly. This in turn pulls down on the positive input of the comparator and the output
goes low thus turning on the LED. When the load is removed from the track, the bipolar turns off which slowly discharges
the capacitor until the comparator output goes high. The 470K resistor adds some positive feedback and thus hysteresis to
the circuit for added noise immunity. Simple and elegant. I'm thinking that it would be possible to reduce some more if
a hex Schmitt trigger CMOS chip was used, but that probably wouldn't have an open-collector output suitable for a CMRI
application. That would then yield 6 detectors per chip. This is a rather odd number of detectors to put on one card! |
 |
Direction of trains can either be detected with
software or hardware. Either way, a DCC detection circuit of some sort is needed, and for direction, this means two. I wanted to see
if I could some up with a simple way to do this in hardware. The circuit to the right is my solution. The waveforms at the bottom
of the diagram describe how it works. I admit there might be a couple of small issues with this design, especially since I want to use
it to kill power under the locomotives as they come out of staging and keep the power off until the crew gets control of the train by dialing
the DCC address, speed, and direction. I will add more here when I have some time to build it and try it out. The outputs; EAST, EASTB, WEST,
and WESTB can be used as you see fit, perhaps to light an LED or as an input to CMRI, etc. Note, the signals that contain a "B" suffix are
active-low signals. |
| DCC Lighting |
 |
A question was posed on a special interest group about how to control
structure lights from DCC. The desire was to be able to control the brightness of the lights from a handheld throttle. This circuit should
fit the bill and is essentially a poor man's DAC built around an LM317 adjustable voltage regulator and a DCC accessory controller. Using
this circuit, a layout owner needs to create 5 macros: 1 macro to turn off the lights and 4 more to turn on the lights and set the other
two outputs to get the four levels of lighting intensity desired. I chose the resistor values to roughly give 25%, 50%, 75%, and 100%
levels. Also notice that the maximum output voltage is below the 12V rating of the bulbs (assumes 12V types are used.) Thus, the bulbs should
last longer. Note that the correct amperage version of the LM317 should be used. I think the maximum is 1 amp on the TO-3 case version, but it's
been a long time since I've played around with these voltage regulators in any hobby circuits. I chose to build this circuit using a series
resistors instead of parallel to simplify resistor value selection. |
 |
I made an incorrect assumption about how the accessory decoder outputs
are configured on the CVP Products AD4 Accessory Decoder. Thus, the circuit above will not work. So, I'm back to my parallel resistor version which I
actually liked better, but the resultant output voltages are weird. Some of the levels are very close to each other, so maybe all the output
voltage combinations are not useful. Page 109 of the CVP Products manual show the two modes that the accessory decoder can be configured to. My circuit uses
the Heavy Duty output equivalent circuit, thus the reason for the open-collector NPN transistors on my circuit schematic. |