Switching polarity of a DCC signal (model railway control)

JohnSan

Joined Sep 15, 2018
141
Engine continues onto section B. When volts detected by FBB, relay A opens and relay B closes.
So now the supply has been ' switched ' . Engine continues. If relay B was already closed when section A was entered, it opens when FBA is detected.
Likewise if engine travels ACW and relay A was closed (from a previous engine) it will open when FBB signal is detected before relay B closes.
So it works either way....
 

JohnSan

Joined Sep 15, 2018
141
So how is that not a 'sensor'?
What is the nature of that "signal".
That's why the word 'sensor' was in quotes. Arduino senses the voltage present in that section of track. It's not a reed relay, photo sensor, magnet etc, just track. :)
It then drives one of two relays.
 

crutschow

Joined Mar 14, 2008
38,909
Okay, I understand.
That's an interesting approach.
Does require 2 relays and 3 sets of blocks but does avoid any added sensors, similar to the short-detection module.
 

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,659
Engine continues onto section B. When volts detected by FBB, relay A opens and relay B closes.
So now the supply has been ' switched ' . Engine continues. If relay B was already closed when section A was entered, it opens when FBA is detected.
Likewise if engine travels ACW and relay A was closed (from a previous engine) it will open when FBB signal is detected before relay B closes.
So it works either way....
An interesting idea which I will think on. A problem to be circumvented is that the whole train has metal wheels which must not cross a track break with opposite polarities to avoid a short circuit.
 

crutschow

Joined Mar 14, 2008
38,909
Yes, thinking about it, how is the transition made when crossing from isolated A to isolated B?
B has to match A when that occurs.
Then B must be switched to match the exit.
That would seem to require 3 relays.

And how do you sense the transition after both A and B are energized simultaneously along with the two entrance/exit tracks?
 

JohnSan

Joined Sep 15, 2018
141
Relay A and B are NEVER both energised.
Track A and B must each be longer than an engine wheelbase length.
There is no need to detect a train leaving the section.
One relay will remain energised.
The circuit will still work if a train approaches from either direction. Even if the same train stops and changes direction.
 

crutschow

Joined Mar 14, 2008
38,909
Okay, so the train will keep moving as it rolls onto the adjacent section and picks up power from there.
I see that they don't both need to be energized.

I believe the logic for that can be done with one AND gate package and one flip-flop package (and, of course, also with a µC).
 
Last edited:

JohnSan

Joined Sep 15, 2018
141
Then when the train touches the gap and the relay switches, the train will stop, since only the first wheel has touched the gap, not crossed it, and the ones that pick up the locomotive power will be on the section that has just gone dead.
No.
Looking at my earlier diagram.
Example.
An engine approaches in the CW direction. When one pair of its wheels pass onto section A, relay A closes.
(I had made an assumption that if an engine has, say 6 wheels, three each side are a common connection. But thinking about it, it doesn't matter. It will still work if only one pair are used although the wheels do need to bridge the gap if only one pair is used for pickup).
If relay B was already closed, it would be opened before closing A.
So the engine still has power.
When the wheels transition to section B, relay A opens and relay B closes. So the engine still has power. But obviously it is now swapped.
 

JohnSan

Joined Sep 15, 2018
141
They need to be longer than the whole train else the wagon wheels will bridge the track breaks.
Another assumption I made was the rolling stock wheels don't provide a conduction path. For sure, they cannot be metal wheels on a metal axle. That would obviously short the rails together.
I doubt adjacent wheels are connected together as that would cause havoc with the units that use short circuit detection to swap the rail power?
I've googled for info on the rolling stock but haven't found anything to say either way.
So I believe it's just the engine length that is "critical'
 

djsfantasi

Joined Apr 11, 2010
9,237
Another assumption I made was the rolling stock wheels don't provide a conduction path. For sure, they cannot be metal wheels on a metal axle. That would obviously short the rails together.
I doubt adjacent wheels are connected together as that would cause havoc with the units that use short circuit detection to swap the rail power?
I've googled for info on the rolling stock but haven't found anything to say either way.
So I believe it's just the engine length that is "critical'
It depends. Metal wheels are insulated but many automation and sensing applications must detect the entire train. So modelers will solder an SMD resistor across the wheel’s insulation. This prevents short circuits but allows protection of an entire train. Typically, a reversing block is longer than the longest train.
 

JohnSan

Joined Sep 15, 2018
141
You're right.
There seems to be a variety of wheels available.
There are also wheel set conversion kits available for 3 rail to 2 rail, DC, even resistive wheel sets for some applications......
So it would depend on the enthusiasts rolling stock as to whether whole train or just engine is the yard stick
 

eetech00

Joined Jun 8, 2013
4,744
It depends. Metal wheels are insulated but many automation and sensing applications must detect the entire train. So modelers will solder an SMD resistor across the wheel’s insulation. This prevents short circuits but allows protection of an entire train. Typically, a reversing block is longer than the longest train.
This is why I hinted back in #51 to maybe use occupancy of the loop and turnout status in logic to change track polarity.
Don't know if an AC track circuit exists for model railroads (it does for real trains), but maybe an overlaid low frequency AC signal used for occupancy detection?
 
Top