Skip to main content

So there's many ways to do block occupancy sensors and each has their own interesting limitations. I've been looking at options for awhile and came up with this idea. First a 4 line recap of other approaches and the issues that the community is already aware of:

-->Insulated rails are relatively easy, but hurt the ability to get good grounds throughout a large layout, especially if you have a lot of different blocks. Legacy and DCS performance can suffer if the layout is chopped up into too many sections.

-->Current sensing with a hall sensor or similar only sees the locomotive or passenger cars if they draw meaningful current.

--> Magnetic sensors are complicated to mount and struggle on small plastic trains and small plastic rolling stock.

--> Optically reflective struggles to see very dark locomotives, and optical beams are tough to mount. The IR sensors get dirty and take time to align.

 

Idea:

So I was thinking about the other post a bit more and thought maybe we could exploit the way the legacy signal propagates to do block occupancy in a semi-parasitic way. The legacy signal is a ~450KHz RF carrier between the layout 3 rails and the earth ground, meaning it's already everywhere in a legacy equipped layout. When a train (stock, locomotive, ... whatever) goes over a section of track it disturbs the electric field radiating out of the track.

--> So the idea is why don't we use a very loosely capacitively coupled electrode near the track to sense disturbances in the legacy/TMCC electric field and determine block occupancy.

Design:

 For my test I had a 8" strip of 14 gauge wire run in parallel between the center and outer rails. The wire does not connect to the layout at all, it's just physically nearby allowing it to weakly couple to the legacy/tmcc signal already present.

sensor

When a train goes over this section, the amount of capacitive coupling carrying the legacy signal from the track to this little strip of wire changes, and so we have a means for detection. Of course the coupling is weak so we need amplification and a few other things. Here is the test circuit I drew up to try this idea out.

tmcc_occupancy

It's pretty straight-forward. An OP (opamp) gets you the high impedance input so the legacy signal can couple onto the input easily. I used a single-ended LM358 opamp. Since it's single-ended, input bias is needed, but the impedance needs to be high for weak coupling, so some 10M resistors go there at point A to establish the input DC conditions. The waveform at A is here (taken with a high-Z probe):

pic_274_1

As expected it's weakly coupled to a high impedance, so it's small and noisy. Note the first stage OP doesn't have much gain at 450KHz, really it's just there to maintain a high input impedance to support the weak coupling. From there it's a BJT gain stage to get useful signal swings. I just used whatever was in the bottom of my drawer (probably a 2n2222a). Whatever you go with try to keep the B>100 so you have decent gain. An LC tank for the load network makes it frequency selective enough to keep out all the out of band noise from the OP output. We're just doing detection so it doesn't have to be a super linear amplifier, or have super high Q-factor. Tying the emitter to the ground is good enough, no need to make it a degenerative stage. Waveform at the output is B:

pic_274_2

For the last stage we just do an envelope detector (1n4148 or similar) to turn it into a DC voltage at point C. After the detector and smoothing cap, the waveform is of course pretty DC looking:

pic_274_3

For a demo I just have a comparator check this DC level against a trim-pot and turning the output on and off (just used an LED).

Quick Breadboard Test:

Here is a test with a car that's almost completely plastic except the wheels. The trucks, car bottom, and body are all plastic. Only the axles and flanges are metal. Train comes, LED goes on.  Train goes, LED goes off. Seems to work.

Summary:

So for those with a Legacy/TMCC layout that want block sensors this is a good option. It's very simple to install, doesn't need alignment, doesn't care about getting dirty and really isn't that expensive. It's also not connected to the layout electrically (except through weak field coupling) so it won't effect any of the control systems (legacy,tmcc,DCS...). Also, it's about $6 of parts.

Attachments

Images (5)
  • sensor
  • tmcc_occupancy
  • pic_274_1
  • pic_274_2
  • pic_274_3
Videos (1)
IMG_7963
Last edited by Adrian!
Original Post

Replies sorted oldest to newest

Moonman posted:

The isolated rail detection can still be used on a TMCC/Legacy layout by capacitive coupling. See Mike's explanation starting at 20:00 minutes.

This is also nice method. Thanks again, Adrian.

While Mike's method works, a slightly better method is to just use a cap across the rails for each insulated section.  His method strings all the caps are in series.  Both will probably work, I just like the direct approach better.

PLCProf posted:

Hi Adrian-

A couple questions-

1. What are you using for the 455 kHz tank coil and cap?

2. What discharges the 1 uF cap?

 

Thanks again,

1. I don't really know, which is why I avoided putting labels on the schematic. I put 455KHz on the signal generator and then pumped the transistor base. I found some unlabeled drawer bottom inductors and keep swapping capacitors until the the collector was peaking. If I do a board later I'll actually calculate the tank.

2. It seems like the cap I'm using is leaky. I was about to put some resistor in parallel to set the time constant but I found it wasn't needed when I was watching the DC level change on the scope. Of course that's very dirty and if I did a real board the Trc will need to be calculated out.

The tricky part about this thing is if you change the coupler size/location it changes the two levels (train/no-train) coming out of the envelope detector. If you bump the coupler wire sometimes you need to tweak the trimpot that sents the threshold. I need to see how it works glued down and made properly and such...

gunrunnerjohn posted:

I'm going to wait for the model that doesn't need to be fine-tuned for each installation.

I think it's always going to need some tuning. Layout to layout and spot to spot, the legacy carrier voltage can be pretty different, and the amount of coupling to the little stick of wire will be different...

sinclair posted:

What a clever idea.  Now how far from the rail can the sense wire get?  Like could it be put under the track so it's not visible?

I'm not sure really.... I think with more gain (maybe 2 BJT stages instead of one) you may be sensitive enough to move it further away than I have it. Of course if it's too sensitive it will trigger when people walk by the layout...

Add Reply

Post
×
×
×
×
Link copied to your clipboard.
×
×