occupancy detection circuit - MR Mag May 2015 pg 56

ModelRailroadForums.com is a free Model Railroad Discussion Forum and photo gallery. We cover all scales and sizes of model railroads. Online since 2002, it's one of the oldest and largest model railroad forums on the web. Whether you're a master model railroader or just getting started, you'll find something of interest here.


BigE

Active Member
Has anyone taken a stab at building one of these?
I was thinking of something like it to indicate that a yard line is occupied.
Only real difference is I want to use a bi-color LED - no biggee at all to accommodate that.
E.
 
In fact it does say so.
The full title if "DCC-Friendly Signals and Occupancy Detectors".
I was planning to run my circuit of my 12vdc supply until I realized his circuit plans called for +/- 9vdc.
E
 


I read the same article its DCC friendly and looks to be pretty simple. I was planning to go that route but its at lest a year or two down the line let me know how it works.
 
I read the same article its DCC friendly and looks to be pretty simple. I was planning to go that route but its at lest a year or two down the line let me know how it works.

I will keep you in mind. Parts were all ordered yesterday morning. 1 of the components is on 30-day backorder so it's going to be a while before I can prototype one for real.
 
Has anyone taken a stab at building one of these?
I was thinking of something like it to indicate that a yard line is occupied.
Only real difference is I want to use a bi-color LED - no biggee at all to accommodate that.
E.

there are some errors in the schematics of that article, such as the way the relay contacts are wired across the relay coil in fig-4, that would cause a short, possibly burning out Q2. Fig-7 is correct.

A smaller (<$$) capacitor could be used if it were placed between R2 and ground (-9VDC) instead of across the relay. The capacitor discharges through the relay the relay to delay it from intermittently switching off. If wired from R2, its voltage would keep the transistor, Q2, on when there are intermittent breaks in the beam.

Since this is an optical detector, I don't understand why they describe it as DCC friendly. It doesn't depend on whether the track is DC or DCC.

Relays, more so double pole relays are big and at least a few $$. A better (<$$) designed circuit would switch two transistors to control the LEDs. The relay and diode could be replaced with an LED and resistor, if you just want a lamp indicating occupancy.

the trade off with embedding an optical detector in the track the way they describe is that it only detects the presence of something over that spot on the track. An alternative would be mount a photo detector and light (or infra-red LED) source above and on opposite sides of the track at an angle such that the light path is horizontal and crosses a large length of track. Anything breaking the path would be detected.

Electrical detectors would detect the locomotive or anything drawing current (e.g. car with LED or trucks with resistors) inside the block.
 
Last edited by a moderator:
there are some errors in the schematics of that article, such as the way the relay contacts are wired across the relay coil in fig-4, that would cause a short, possibly burning out Q2. Fig-7 is correct.

A smaller (<$$) capacitor could be used if it were placed between R2 and ground (-9VDC) instead of across the relay. The capacitor discharges through the relay the relay to delay it from intermittently switching off. If wired from R2, its voltage would keep the transistor, Q2, on when there are intermittent breaks in the beam.

Since this is an optical detector, I don't understand why they describe it as DCC friendly. It doesn't depend on whether the track is DC or DCC.

Relays, more so double pole relays are big and at least a few $$. A better (<$$) designed circuit would switch two transistors to control the LEDs. The relay and diode could be replaced with an LED and resistor, if you just want a lamp indicating occupancy.

the trade off with embedding an optical detector in the track the way they describe is that it only detects the presence of something over that spot on the track. An alternative would be mount a photo detector and light (or infra-red LED) source above and on opposite sides of the track at an angle such that the light path is horizontal and crosses a large length of track. Anything breaking the path would be detected.

Electrical detectors would detect the locomotive or anything drawing current (e.g. car with LED or trucks with resistors) inside the block.

I don't know about its correctness. But I had started to design my own circuit using a photo-resistor instead of Q1.
However, once I realized in Fig. 4 he has +/- 9vdc as input that his circuit would feed off the DCC.
I'm thinking it you were put a simple diode or rectifier on your inputs and then deal with a simple 9vdc input that the circuit could be made compatible with DC or DCC - put in a simple 7809 voltage regulator to keep it clamped.

If you have a better and/or modified circuit, please do share. Parts won't come in until next week and it has only been nearly 40 years since I have tinkered at this level. Send PM or email me directly.
E
 
the relay coil voltage dictates the supply voltage. But the voltage can be less restrictive by replacing the diode and relay with an LED and resistor. I assume a wall-wart is used to provide power

If you insist on using track voltage, a single diode and capacitor (half-wave rectifier) is probably sufficient. If the relay is not used, the capacitor is probably not needed and the LED resistor value can be halved.

I build Rob Paisley's transformer based detector

do you have proto board to experiment with (look on ebay) and a DC wall-wart for power (<15)?
 
the relay coil voltage dictates the supply voltage. But the voltage can be less restrictive by replacing the diode and relay with an LED and resistor. I assume a wall-wart is used to provide power

If you insist on using track voltage, a single diode and capacitor (half-wave rectifier) is probably sufficient. If the relay is not used, the capacitor is probably not needed and the LED resistor value can be halved.

I build Rob Paisley's transformer based detector

do you have proto board to experiment with (look on ebay) and a DC wall-wart for power (<15)?

I do have a bread board for prototyping.
 
The schematic in the mag is wrong - as mentioned.

Also specifying +9/-9 is a bit confusing as the author likely means the circuit should be powered by 9 VDC (volts DC), with the polarity shown.

The circuit is "DCC friendly" only in that it is not connected to the track power in anyway. So this type of circuit would work with AC, DC or DCC powered track or even un-powered track.


There are basically two types of detectors.

There are "point" detectors like this which tell if if something located at a certain spot on the track, in this case when something is blocking light to the sensor.

Then there are "occupancy" detectors which rely on detecting current being drawn by something on the track. Occupancy detectors obviously will respond to a current drawing loco/car/etc anywhere in the section of track that is connected to the detector.


For your stated application an occupancy detector would be preferred over a point detector UNLESS you can always be sure that when the section of track is occupied something will end up parked over the sensor.
 


The schematic in the mag is wrong - as mentioned.

Also specifying +9/-9 is a bit confusing as the author likely means the circuit should be powered by 9 VDC (volts DC), with the polarity shown.

The circuit is "DCC friendly" only in that it is not connected to the track power in anyway. So this type of circuit would work with AC, DC or DCC powered track or even un-powered track.


There are basically two types of detectors.

There are "point" detectors like this which tell if if something located at a certain spot on the track, in this case when something is blocking light to the sensor.

Then there are "occupancy" detectors which rely on detecting current being drawn by something on the track. Occupancy detectors obviously will respond to a current drawing loco/car/etc anywhere in the section of track that is connected to the detector.


For your stated application an occupancy detector would be preferred over a point detector UNLESS you can always be sure that when the section of track is occupied something will end up parked over the sensor.

Well..... my application isn't concerned with passing traffic. I just want to indicate red or green that a yard line is occupied or not.
But yeah, that +/- vdc threw me off. I'm used seeing a ground - plain old ground - unless I'm dealing with an AC circuit. But like I said, it's only been nearly 40 years since I have messed with stuff at this level.
E
 
Well..... my application isn't concerned with passing traffic. I just want to indicate red or green that a yard line is occupied or not.

Understood but what is your definition of "occupied"? Is it guaranteed that when occupied something will always be over the sensor?
 
Understood but what is your definition of "occupied"? Is it guaranteed that when occupied something will always be over the sensor?

In may case, yes. Something will be sitting on the sensor(s).
My gas facility, sanding tower or coal flood loader - that's all I have right now.
I am running DCC on the rails but am using an old DC pack for my accessories including running my turnouts off the A/c tap.
That much has been working perfectly so far.
E
 
I havent been positive about optical sensors as detection doesnt occur across the entire block. It will be DCC friendly as it practically has nothing to do with DCC. target signals red/green is easy with relays just reverse polarity to the LED. Yellow needs AC so you have to figure that one out, not tough, if you use 3 wire 2 color LEDs, its just power both lines for yellow.
 
If you have a yard track, and only want indication of something "anywhere" on the track; you could wire several photocells in series to be able to use one circuit/indicator.
 
If you have a better and/or modified circuit, please do share.
instead of a relay, you can used the voltage on the one LED to drive a 2nd LED circuit when the first LED path isn't grounded thru the resistor. Only one LED is on at a time

photoLed2_zpsdx8jpy9r.png
 

Attachments

Last edited by a moderator:
bench tested a circuit using a photo-resistor and pot to turn-on the first LED path which turns-off the 2nd LED path and visa-versa. The photo-resistor I have was ~300 ohms in light and ~3k in dark. Looks like you can get 20 photo resistors for ~ $4 on ebay

I believe a photo transistor can replace the photo-resistor, but look to be ~ $0.30 each on ebay.

photoLed3a_zpsywjnbn04.png


two LEDs are only needed for track signals. If all you need is a panel indicator, the 2nd LED circuit (R4, Q4, R1 and D1) isn't needed.
 
Last edited by a moderator:
two LEDs are only needed for track signals. If all you need is a panel indicator, the 2nd LED circuit (R4, Q4, R1 and D1) isn't needed.

bench tested a circuit supplied from DCC track voltage. I measured 22 ma with the LED lit.

photoLed4a_zpsxx4ulpbo.png
 
bench tested a circuit supplied from DCC track voltage. I measured 22 ma with the LED lit.

photoLed4a_zpsxx4ulpbo.png


I honestly don't care if it runs off DCC track voltage. I'm already running lights and turnouts off an old DC pack.
To be honest when I thought of doing my own detection circuit I had thought of using a photo-resistor. Then it occurred to me that article had something similar to what I wanted.

Actually, if I started running other stuff off the track voltage other than trains, I'll have to get a booster. There goes another C-note or thereabouts. I'm running NCE. Not that I mind - IF I have it. I just dumped $200 on a SD70ACe that they claim can handle 18"R curves. I just couldn't stand it and had to have it. My SD40-2 has zero problems much to many's dismay. My DD40Ax is another matter and I never expected it might run here but I figured I might find a club I could join and run it there - alas no joy thus far.

E.
 


Actually Greg, that would all be fine by me.
Draw me up a full circuit with exact values on stuff and mix the two circuits so I have a green/red indicator.
To be honest, I have no idea if it's realistic at all.
It just seems to make sense to me as train driver if I was fixin to pull into a yard line and it was occupied I would want to see that with a big red light.
 




Affiliate Disclosure: We may receive a commision from some of the links and ads shown on this website (Learn More Here)

Back
Top