# Cheap and Simple Automated Block Signaling



## /6 matt (Jul 7, 2015)

I have a dcc layout wired in blocks and I want to run simple red/green signals but I don't want to get involved in expensive and complicated computerized block detection. I really don't want my signaling controlled by my turnouts so here's my idea:

I wire in a spdt relay with the coil being fed by the + side of the dcc booster and the ground for the coil going to the + side rail on the track. The common would be a 5-12 volt + or whatever is required to power the signal itself. The normal open would be the green light and closed would be the red light.

My thoughts here is if I install resistor wheelsets on my cabooses and/or other rail cars then whenever a locomotive or caboose occupies the bock the current draw would fire the coil making the relay switch the signal light from green to red.

The blocks would be wired as such









It seems like it would work but I'm no electrical engineer, I would love to hear your thoughts?


----------



## D&J Railroad (Oct 4, 2013)

Getting into signal systems can be daunting for most. There are some who have a natural ability to understand electronics and explain it to others like its naturally simple. I've tried building my own components for various projects and it usually ends up incomplete or burned up because I didn't understand a part that wasn't explained but was essential.
I went with a signal system software package, Train Controller Silver after I spent a month or so trying to get the JMRI system to work. I don't wright software nor do I understand a lot of the essential commands. I can do the window pull down menus ok and toggle my way through that until I get the right results.


----------



## Lemonhawk (Sep 24, 2013)

Wonder what the coil in series will do the DCC signal? Also you don't want the coil using all your DCC power up, so how will you handle the current necessary to run the engines, yet not overload and burn out the coil? I think that's why block detection is done by a current sensing coil or by back to back diodes.


----------



## gregc (Apr 25, 2015)

Lemonhawk said:


> Wonder what the coil in series will do the DCC signal? Also you don't want the coil using all your DCC power up, so how will you handle the current necessary to run the engines, yet not overload and burn out the coil? I think that's why block detection is done by a current sensing coil or by back to back diodes.


agree

consider the NMRA block occupancy detector using NEC2506. probably less expensive than using relays


----------



## MichaelE (Mar 7, 2018)

I'm just getting into signalling using Viessmann semaphores and aspects. I am currently using only a three-way N/O return-to-center toggle switch to temporarily operate the semaphore arms and indicators, but for a permanent fix I will be using magnetic reed switches and Earth magnets on the bottom of the locomotive to control block signaling.

Using these magnetic reed switches is the cheapest and effective control device but the switches are harder to hide. Some are small enough to fit between HO scale sleepers and the larger ones are placed in the center of the track or along side the outside rail and camouflaged. You can find them quite small.


----------



## tankist (Jun 11, 2009)

OP, idea of a inductor in serial with DCC line is a very bad one. For multiple of reasons. If you don't want to mess with DIY/Arduino stuff Digitrax , team digital (and I suspect others brands too) block detectors don't require computer, they have exposed headers to connect indicators directly. 



MichaelE said:


> ...
> , but for a permanent fix I will be using magnetic reed switches and Earth magnets on the bottom of the locomotive to control block signaling.
> 
> Using these magnetic reed switches is the cheapest and effective control device but the switches are harder to hide. Some are small enough to fit between HO scale sleepers and the larger ones are placed in the center of the track or along side the outside rail and camouflaged. You can find them quite small.


Reeds are suitable for spot detection. Spot detection is good for application such as protecting a turnout from throwing under rolling stock or layout animation. But for signalling a proper block detection is needed. 

And as for spot detection a much better result can be achieved by proximity sensors - aliviates the need to equip the entire fleet of rolling stock with magnets (which can't practically be done in continuous manner anyways). IR based sensors can be fitted between ties under the track, round dome probably can be disguised as driver fatigue detection system equipment. Ultrasonic ones can be positioned in trackside structure (ie trackside signal box). Both are dirt cheap, will require tinkering with Arduino however.


----------



## MichaelE (Mar 7, 2018)

You only need one magnet per locomotive and two N/O momentary switches per semaphore or aspect. That is using Viessmann equipment. Other manufacturer's operation may vary.

One upon entering the block to change the aspect or semaphore arms, and the second when the train clears that block to reset the signal to unoccupied.


----------



## Lemonhawk (Sep 24, 2013)

I still think the way to go is the Digitrax BXPA1/BXP88 combination. It's a combination circuit breaker with detection built in!


----------



## Shdwdrgn (Dec 23, 2014)

Regarding the NMRA detector circuit that gregc posted above, does anyone have a reference for this? It doesn't say the value of the cap, and I'm wondering if the resistor controls the voltage output or just acts as a buffer (I'm not sure if I'll need 5v or 3.3v outputs). I'd like to learn more about the circuit itself if they happen to have a web page that discusses it.


----------



## gregc (Apr 25, 2015)

Shdwdrgn said:


> Regarding the NMRA detector circuit that gregc posted above, does anyone have a reference for this?


click on the image -- takes you to the NMRA page discussing detection.

My understanding is the use of the bridge is to put two diodes in series for both polarities resulting in +/- 1.4V.

The NEC has a pair of back to back LEDs, in parallel of opposite polarity. the resistor limits the current from the bridge diodes through the NEC LEDs.

i don't understand why they show a capacitor on the input instead of the output.


----------



## Shdwdrgn (Dec 23, 2014)

Ah cool, thanks. I didn't realize the image itself was another link. One of these days I need to start searching for some simple arduino-ready block detection circuits and get something set up on my test loop so I can play with the programming of managing two locos at a time in a small space. I'm currently doing some 3D printing of mounting brackets for the turnout servo motors, hopefully have that set up soon.


----------



## gregc (Apr 25, 2015)

Shdwdrgn said:


> One of these days I need to start searching for some simple arduino-ready block detection circuits


not sure what your thinking. Block detection is a hardware circuit. The Arduino simply monitors the input from the block detector.

you may find Arduino Signals using Sub-Functions helpful


----------



## Shdwdrgn (Dec 23, 2014)

By "arduino-ready" I meant circuits whose output would be suitable for an arduino to read directly. The DCC++ base I'm using now has code for an S88 sensor system, so block detection should be one of the things I can feed into it. And processing the signal on an arduino makes it easier to add hysteresis to clean up a dirty signal or conditionally add together multiple signals into unique groups (such as around a double-slip crossing).

Interesting link, I'll have to dive into that one this evening. Thanks!


----------



## gregc (Apr 25, 2015)

sounds like the Arduino is used to interface to an S88 bus. 

I think most block detector outputs are open-collector, allowing them to drive a variety of inputs, including an Arduino input with a pull-up. Bear in mind, the detectors have some delay (i.e. capacitors).

not sure what signalling has to do with DCC++.


----------



## tankist (Jun 11, 2009)

Shdw, it can be found on eBay with "Arduino current sensor". Can be either chipped or a an open transformer style.


----------



## gregc (Apr 25, 2015)

tankist said:


> Shdw, it can be found on eBay with "Arduino current sensor". Can be either chipped or a an open transformer style.


don't believe Arduino current sensors are intended for block detection.

searching ebay for block occupancy detector finds a variety of types.

the coil types require the feeder to a block be passed through the coil several times but doesn't affect track voltages.

looks like the Digitrax BD-1 (replaced by BD4) is similar to the NMRA design with the bridge diodes and opto-coupler.


----------



## tankist (Jun 11, 2009)

gregc said:


> tankist said:
> 
> 
> > Shdw, it can be found on eBay with "Arduino current sensor". Can be either chipped or a an open transformer style.
> ...


Sure , but they intended to measure current flowing through. with proper code arduino can convert the readings into free/occupied state. 

That said I tried deleting my comment above as it's not offering anything that wasn't said above , didn't see sone of the previous comments.


----------



## gregc (Apr 25, 2015)

tankist said:


> Sure , but they intended to measure current flowing through. with proper code arduino can convert the readings into free/occupied state.


i believe the Arduino current sense circuits you identified are for measuring current, up to 30A, in a circuit similar to an ammeter. looks like these circuits use the Hall effect for translating the current into a voltage (i'm don't know how it works). The one said 185 mV /A.

model railroad block detection circuits don't directly measure current. They detect that a current is flowing thru the block. Current as little as 1 ma, either through a locomotive motor, lamps/LEDs in cars or resistors in wheels of freight cars. There's no need to measure the current. The presence of a current indicates the block is occupied.

The two common types: the NMRA diode drop and pulse transformer for DCC approaches are described above.


----------

