04/14/98 rev 09/09/11
BACKGROUND: Detecting the presence of a train in a section of track is a basic requirement for signalling, CTC and any number of other add-ons that enhance the model railroad. With today's electronics and computer support, there is many ways to do this including, but not limited to current sensing, photo sensors, magnet and mechanical trip switchs and so on. Folks had been struggling with the occupancy detection problem a long time when Lynn Westcott of Model Railroader (MR) in 1958 developed and promoted a device called the Twin-Tee and it became sort of a de-facto standard until the advent of op-amps. Bruce Chubbs "optimized detector" about 20 years later is surely a popular circuit because of the respect he has earned for his contributions. Because of inherant limitations in the Twin-Tee, the Teton Short Line (TSL) signal department developed a transformer isolated device using early PNP germanium transistors and that design was in use when we published "Signalling on the TSL" in Jun 72 issue of MR. We had tested our signalling with the Twin-Tee and it worked, so we said nothing about detection in that article. Most of the mail that we received asked about detection because of the Twin-Tee limitations. We circulated our design (call it DETECTOR 1) to dozens of them. We will not document it here- it's too obsolete.
You might want to look at or even print out: Some principles of occupancy detection.
DETECTOR 2 was designed back in the mid '70s to be non-inductive, and to respond to any current from DC up to any reasonable frequency that we might want in the future. I had added more blocks to the TSL and implemented our Automatic Cab Control (ACC) system. I was also experimenting with over-the-track sound systems using AM carriers in the 200 kHz range and didn't want the inductance of the old transformers. The new detector had high output current (1 amp sink) capacity to drive the existing 12 volt panel lamps as well as the 5 volt logic for the ACC. As a general purpose current detector, it has many uses outside of model railroading. Examining the circuit, you'll find we used the old trick of a taking the constant voltage drop across a silicon diode for the sense signal. The signal polarity raises or lowers one of the inputs to the LM3900 Norton op-amp. If the frequency is high the slew rate limit of the op-amp simply results in continuous turn-on, hence we are not much concerned with upper frequency limits, although with my 20kHz high frequency lighting, it was necessary to desensitize some detectors with capacitors, where the capacitance of long feedlines resulted in undesired tripping. A regulated source for the Vcc supply is essential. The operating voltage Vcc, and sensitivity is easily tailored by the selection of the resistor values R1 & R2 in the input divider i.e. high impedance=high sensitivity. The arithmetic is simple- select values of R1 & R2 that will give you voltages e1 and e2 allowing about 0.65 volt drop across diode CR3.
This is a three terminal current sensing device. The three terminal part means that the input current goes to the same common ground as the output signal, hence three terminals instead of four and no isolation. This is usable only in a "common rail" wired system where one rail of every block eventually reachs a "common" or "ground". Its like your automobile, where the battery, alternator and lights have one terminal tied to the metal chassis. The detector worked great with my new DCC system while I retained the common rail wiring. DCC works at a nominal 8kHz, but contains many higher harmonics in its square wave. The circuit will NOT be appropriate for a balanced feed DCC system using more than one power booster.
We had twenty four of these in service, built two to a card. One husky bridge rectifier and one LM3900 op amp makes two detectors.
DETECTOR 3 is a re-work of the old '60's DETECTOR 1 using an isolation transformer. We dug these out of the junk box for the local module club that needed a four terminal device, because the wiring standards do not permit common rail. That old transformer was a "tube-voice-coil" product with an impedance ratio of about 5000/3.2 ohms. That really doesn't matter as we stripped off the outer speaker coil winding and wound about 8 turns of 18 guage wire back on it. This will not work with pure DC but if there is power supply ripple or pulse or any other AC component, then it works fine. Should be great with DCC. Your transformer today would probably be a toroid.
We still have three of these in service on the TSL's Termite Timber Line (TTL) branch where they are part of an automated train operation running a doodlebug between Malfunction Junction and the high mountain town of Moosemilk. We're trying hard to serve those folks in this time of rising costs. The module club use was discontinued for unrelated reasons. The Pix below shows a quad package.
DETECTOR 4: I became convinced, after an extensive discertation with the movers and shakers of the Digital Command Control (DCC) world, that we need to give up the grandfatherly COMMON rail wiring concept and embrace the merits of balanced feed, called "home wiring" by some. This system floats both rails, and they only find GROUND or COMMON back through the H-bridge of the DC booster. A major advantage is that the only possible voltages on any rail, relative to GROUND or COMMON, is ZERO or +14 Volts (typical for HO), and so no combination of rails across gaps can ever exceed 14 volts. This is important for decoder survival! This makes the "three terminal" decoder unusable.
I looked around for fresh ideas and discoverd Dick Bronson's floating detector. With the constant DCC power available on the track feeders, it can be used to power a detector that is independant of GROUND or COMMON. Dick then uses an economical optical detector to recover the logic output. I reverse engineered it, breadboarded it, and decided he'd done a very good job, so I built up 24 of them, four to a circuit card.
DETECTOR 5: June 2004. Adding OS detection, we needed a few more detectors and the TSL computer system had been totally re-vamped integrating Bruce Chubbs CMRI
Three new factors enter into the new design. First, the layout is now 100% DCC so sensing of primitive DC current is no longer needed, Second, the detector outputs go only to the computer and third, I've found that it's desirable to keep the DCC power away from low level data and signal lines. That leads us back to transformer coupling just like we did in the 70's with Detector #1 except that we want to remote the transfomer. It's looking pretty simple with these constraints.
Making the transformer remote and eliminating the need for an output transistor makes more room on a circuit card. Six or eight detectors should fit nicely. We managed eight on a 4" x 4-1/2" plug card plus an octal buffer chip for direct access to a computer data bus with a READ pulse. If you are using Chubbs CMRI then the detector(s) connect directly to an INPUT card or SMINI without the buffer chip. Incidently, considering that you may need many detectors for signalling and dispatching, and you may have more time than money, this DIY design may make consideration of more acceptable. A cheap or even scrap computer with a few of his SMINIs and you could be up and running with computer management for quite a few less bucks.
The resulting detector is compact, has fewer parts and by mounting the sense transformer remotely where the DCC feeders attach to the track, I can get eight of them on a 4" x 4-1/2"- 22 pin plug card. The high energy DCC power wires are kept away from the electronic nodes.
Here we introduce a concept that I have not yet seen on a model railroad occupancy detector. The toroid current transformer is resonated near the nominal DCC frequency and that results in a great voltage gain, eliminating a pre-amplifier. This not new of course, Nicola Tesla explored this idea a hundred-plus years ago and made some mighty big sparks with it.
This gets us down to only two op-amp stages so that a quad amp like the LM339/LM3302 can handle two detectors. Assembled on an old recycled Radio Shack perf' card, this is what one of our octal prototypes look like:
Sorry, I don't have a pc board layout for you. I can whip up a couple of these cards faster, and at far less expense, than I can prepare the pc board layout. The TSL is not in the business of selling our hobby stuff but we do enjoy sharing ideas. :-) If you'd like a layout plan for the perf board, just ask for it and specify ACAD.DWG or .JPG format:-) Here is the schematic: Technical stuff- How does it work- Just fine, but here are some details for you techies. The expensive piece , $1.85, toroid current transformer comes from Jameco, http://www.jameco.com/ part #164718. The rest of it won't add up to a dollar. The resonating capacitor is # 25523. Don't use a cheaper disc cap. The toroid is 5 mH and the cap is 0.1 uF. Close enough to resonance to do the job.
The 22 cent quad LM339/LM3302 comparator will make two detectors.
With the DCC track feeder making two passes thru the toroid as shown in the pix, 15k across the track will overcome the 70 mVolt bias established by R8/R9. schematic error- note3 doesn't exist- I'll fix it one day ;-) . You can play with the bias or turns on the toroid to suit your own needs. D1 & D2 protect the comparators from overvoltages by swamping the resonance and clamping the input to safe levels. D1 to Vcc can be any old silicon rectifier but D2 to ground ought to be a Schottky such as 1N5819. The incoming signal will drive the output of the first comparator low, at a pulse rate of about 8kHz. If you put your scope on the input, you'll see a nice sine wave that will square up when the diodes start clamping.
The comparator is open collector so C2 discharges quickly via the R3 and recharges slowly via R2+R3 for a fast attack but slow dropout. The second comparator is configured as a Schmit trigger for snap action. The divider networks R8/R9 and R10/R11 can be shared with all eight detectors on the card. The LED and R6 are optional. The final output is an active LOW so if you use Bruce Chubbs CMRI then connect it to an INPUT card or the SMINI. If, like me, you have done your own computer thing then add an octal tri-state buffer such as the 74LS244 or 74LS541 and you can slap the 8 bit byte right on a data bus with a low READ pulse.
Don't forget to add a few power bus filters, usually a 0.1 uF disc for each chip plus 10 uF or more between Vcc and ground somewhere near where the Vcc enters the card.
Connection to the remote toroid is made with a twisted pair of wires salvaged from 25-pair Telco cable. We all use that stuff, don't we? Do not ground it except at the circuit card end! How far can you run it? Darned if I know, but I'd keep it away from the DCC track wires as much as possible. For that matter, keep all your data wires away from that DCC!
With 24 of Dicks detectors built up and installed, I was in pretty good shape as long as an engine or lighted caboose occupied the block but individual cars could not be sensed and this was not going to be acceptable when OS detection is implemented in the near future. You can buy wheelsets with resistors for about a buck & half each. An axle on each end of the freight cars in service would run into four figures for the TSL! I had attached conventional axial 1/8 watt resistors to a few axles with metal wheels and was not pleased with the effort or result, when I picked up a suggestion from the DCC SIG groupss on the net. I tried it and heartily endorse it--this is the way to do it.
First you buy enough metal wheel sets with a metal axle insulated on one end. I chose Intermountain's all brass ones retailing at $58/100. Get hold of http://www.tomstrains.com/ for a much better price. Then go to http://www.mouser.com/ and get some surface mount (SMT) resistors ME263-10k at $7/1000, thats not a typo, less than a penny each. The pricey part is the silver epoxy Mouser p/n 5168-2400 for almost $20. I've done 300 wheel sets and I'm sure the quarter ounce will do a thousand so you can add about three cents to the wheelset cost, a total of about 51 cents.
Look closely. The SMT resistors are on the left pair and the right pair have only been buffed. The simple jigs are needed to rest the axles in while the epoxy cures, for a few hours. Use your Dremel with a very small stone or cutter to buff clean spots on the wheel and axle. Mix a tiny dab of epoxy, I find working with 20-30 wheelsets in about 20 minutes works well before the epoxy gets too thick. Two tiny dabs and set the 1/8 watt SMT resistor in place with tweezers. Your ohmeter will show an open until the stuff cures, then it will read very close to the resistor value. Be careful because if you get sloppy and bridge the insulator with the epoxy, it will burn, stink and possibly ruin the wheel insulator when it gets on the DCC powered track. I first used 1/16 watt resistors and had that problem with a couple. The 1/8 watt are much easier to work with. Except for that goof, I have not had a failure in any of the 200 that I done in '98. With that success, I decided it was time to do the whole fleet and share the technique with you. A touch of paint after the epoxy cures and your work is invisible.
DETECTING EVERYTHING- A BETTER WAY: Someone on the CMRI Yahoo Group asked about making resistor wheelsets and I posted my current method, only then realizing that I hadn't updated this page. It's always nice to learn a better way to do things in this hobby and Lee Nicholas http://ucwrr.com showed me a MUCH better way to do it. I was amazed as he applied a hot solder iron to an Intermountain wheelset without harming the insulator. In seconds the SMT resistor was secured and he went on to do another. Like we all do when we learn something, I applied techniques that fit my workstyle and limits. I've done over 300 without ruining a single wheeset. To refresh my technique before writing this, I done 30 wheelsets in a very short time and immediately installed the 36" wheels on passenger cars. To the best of my knowledge, the Intermountain wheels and axles that I have purchased are brass with a chemical darkening. I detect no evidence of plating.
We're making up a few hundred more and this time I have a little camera attached to the computer so let's add some pix and diagnose WHY this works so well
The key to success using this method is HEAT SINKING to protect the plastic insulator between the axle and the wheel. Using the metal vise is critical because the axle end is firmly clamped to the large metal mass. When the first solder joint is made on the axle the insulator is closer to the heat sink and the axle portion that passes thru the insulator stays cool enough to avoid damage. Then you pause for a few seconds while you wipe the iron and wet the tip with fresh solder. The axle has cooled quickly because the residual heat flows both ways toward the wheels and heat sink. Now you solder the wheel and get out of there as quickly as you can. The wheel is aligned flush with the vise and the moment that the solder sets there is a solid bridge connecting the wheel and axle so that even if the insulator softens, nothing moves out of place. Simple, Huh?
The tools and materials are:
- Intermountain wheelsets
- 1/8 watt (1206) SMT resistors
- A regulated solder iron with a sharp conical tip. I paid about $40 for a constant temperature XrTronic Auto-Temp 379 on the 'net.
- 63/37 (best) or 60/40 (OK) electronic grade solder
- Clear liquid (zinc-chloride) flux from the welding shop. Leaves no grungy residue and washes clean with plain water.
- A small metal jawed vice.
- Dremel or similiar tool with small abrasive tip
- sharp pointed tweezers to handle the tiny SMT resistor.
- A cup of water
- SAFETY: The flux I use is All-State Duzall from the welding shop. Google it and look at the MSDS while you are at it. It is nasty stuff but we are only going to use a drop at a time. A pint should last you a lifetime. Never-the-less you are working close, probably only inches away with an opti-visor. I find the fumes from the cored solder just as obnoxious, so I keep a muffin fan behind my work to pull fumes away from the face.
- Examine your vise and make sure that the jaws are accurate enough to hold the axle end with the wheel firmly bearing on the jaws. If it's not perfect, attack it with a file until it is.
- Buff the chemical coating from a spot on the axle and wheel where we will solder. You might find it more convenient to hold the wheelset in hand for this task.
- Clamp the insulated axle end into the metal vice with the wheel pressed flushed up against the jaws. This will help maintain alignment even if you use too much heat and soften the insulator.
- Apply a drop of liquid flux to the work area
- With a CLEAN iron whetted with fresh solder in one hand and the resistor held in place with the tool of your choic, I like the curved forceps, touch the axle joint with the whetted iron. Do it this way and you don't need three hands. If your iron is hot enough, two seconds should do it. When you let go with the forceps, make sure the resistor is solidly in place.
- Pause a few seconds while you wipe the iron clean and re-whet it with a tiny bit of fresh solder and then solder the wheel joint. Again, about two seconds if the iron is clean and hot.
- Unclamp the wheelset and drop it in the water for quick cooling and flux washaway.
- Go back to the beginning and do another one! A hundred axle sets done in a sitting is easy.
Return to Teton Short Line Home Page