There were several characteristics I desired in a block occupancy detector. They were low cost, isolated output, hysteresis, high sensitivity, and minimal voltage drop. Other desirable traits included simple power requirements, adjustable sensitivity, and some sort of built-in monitoring for testing.
D1-D2 provide a voltage drop to detect. C1 acts to cancel out the effects of track capacitance at the DCC switching frequencies, and improves the stability of the circuit when you are running non-decoder equipped engines in analogue mode. Early versions of this schematic called for a value of .01 mfd for C1. Experiance has shown that a value of .033 mfd works better in conditions where there may be any more than normal amounts of stray capacity in the rails and feeders. D3, C2, and the 5 volt regulator VR1 provide DC power for the circuit. R1 is to limit the peak charging current of the power circuit and also acts as a fuse if the circuit fails.
R2, R3, and R15 act as an input voltage divider and biasing circuit. R4 is to limit the current in R15 if it is adjusted to it’s minimum position. R5 and R6 generate a positive reference voltage, and power bus ‘B’ serves as the zero reference point. R15 controls the amount of current required to reach the reference voltage points. The circuit is designed to respond to 10K ohm wheel sets, so the adjustment range is from about 50K ohm at maximum sensitivity to about 4Kohm at a minimum across the rails. U1-A senses the negative transitions, and U1-B senses the positive transitions of the DCC signal.
If you do not need to adjust for special conditions you may replace R3 (10K) with a value of 15K ohms, and replace R4 (47 ohms) with a value of 4.7K ohms. Omit the variable resistor R15, and replace it with two jumpers connecting all of it’s original connection pads.
Noise from dirty wheels is always present, especially if only one or two wheel sets are in a block. The original design that was posted here on this web site had about 1.5 seconds of delay before actuation, and 2 sec delay in dropout. To more closely follow the prototype train detection action I have changed the values of R7, R8, and R9 to allow an almost immediate actuation, but increase the delay in droppout. C3, R7, R8, and R9 are the timing circuit. The timing may be varied by changing the value of C3.
U1-C drives the output stage. R10 and R11 provide a bias point for the driver, while R12 and R13 provide the hysteresis necessary for stable switching action. R14 is the current limiter for LED 1 and the opto isolator. If you need to drive more current in the output of the isolator you may vary the value of R13. I use 4N28 isolators because they are the least expensive, but many different opto isolators will serve as well depending on your needs. If you are using simple open collector switching into a logic board like I am, be sure to check that your isolator has enough gain to drive the pull-up resisters used on your board.
If you just want to have one or two panel indicators, then you may omit the opto isolator entirely and wire directly to the indicator/s from pins 1 and 2 of the opto isolator connection.
Visit Here for more.