faalhaas
Posts: 3
Joined: Sun Aug 21, 2016 8:46 am

GertBot DCC - Reversing loop

Sun Aug 21, 2016 9:25 am

Hi,

I am considering purchasing a GertBot for use as a DCC controller for a large model railroad track my father is building. Part of this track is a reversing loop. Reversing loops tend to short-cut tracks.

Normally, the track would be divided in isolated segments, where an isolated segment in the the reversing loop is powered down and back up again with reversed polarity. (just connecting 2 isolated parts will cause a shortcut when a model train runs over it).

As the GertBot has 4 segments (which is awesome by the way) and is in essence a motor driver, i assumed it would be able to reverse the polarity for such a segment. But when studying the gertbot.py i didn't see an instruction to do so. I assume the GertBot decides on the polarity all by itself when the board is initiated in DCC mode.

Can anyone indicate if this is possible?

Thanks!

User avatar
Gert van Loo
Posts: 2440
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: GertBot DCC - Reversing loop

Tue Jan 03, 2017 12:31 pm

Sorry for the late reply. I have not had access to a computer for a while.
I know next to nothing about model rialways so bear with me.
DCC has NO polarity. It as an AC signal. (A square wave).
I assume the signal is rectified inside the locomotive and then used.
(I don't think they use an AC motor as the AC signal frequeny is a too high for a motor)
So I have no idea how you can 'reverse' an AC squarewave.
You CAN reverse (swap over) the wires to the track but with AC that makes no difference.

User avatar
thagrol
Posts: 319
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Re: GertBot DCC - Reversing loop

Tue Jan 03, 2017 8:28 pm

I'm no expert but as I understand it a reversing loop on a model railway fed from the entry point will always form a short (DC or DCC). The problem is that the track is essentially a two wire bus and a reversing loop results in these wires being cross connected.

Have a look on google for "dcc auto reverse module".

In short, these have an input for the DCC signal and a track output. When a short is detected the unit switches over the output connections to remove it. They're designed to do so faster than the command station can detect the short and cut the supply.

User avatar
Gert van Loo
Posts: 2440
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: GertBot DCC - Reversing loop

Tue Jan 03, 2017 9:42 pm

OK, I get why and where it is needed, but I still don't get what the autoreverser does.
This has lead to the development of DCC “Automatic Reversers” that allow the loop to be automated. These Automatic Reversers work by sensing the short at the gap and reversing the polarity quickly.
What polarity?? It is an AC signal, it has no polarity!
I think I have not enough understanding what happens inside the locomotive with DCC.
I thought the travel direction is controlled by internal rectifiers (including chopping for speed control) based on the last command.
Thus a DCC train will alway travel in the same direction no matter if you swap the feed wires to the rails around.

User avatar
rpdom
Posts: 11808
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: GertBot DCC - Reversing loop

Tue Jan 03, 2017 10:14 pm

It's more "phase" than "polarity".

The problem with the reversing loop is that if the track is continuous it will effective short the two rails together. The track comes into the loop, runs round a full 180 degrees and joins back up to the original track. The "left" rail on the way in becomes the "right" rail on the way out and vice-versa.

With an auto reverser the loop is electrically isolated from the main track at each end and connected via a relay (or similar) to the main track. When a train is on the loop it switches the connections so that the train exits the loop with the left and right rails matching the phase of the main track. Because of DCC the train won't care that the rails have been switched under it.

(At least that's how I understand it).

I'd draw a picture if I had any handy drawing packages ;-)

User avatar
Gert van Loo
Posts: 2440
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: GertBot DCC - Reversing loop

Wed Jan 04, 2017 12:19 am

I understand the problem and the solution.
What you say is that it first needs to switch the power ON and later it has to reverse it.
The article I found had a number of track situations which need the circuit.
On the board I have a CPU, 4 H-bridges and a A/D converter. So I could build a program option for that.
But it is not a trivial program to write. (What if the operator reverses the train???)
Also:
1/ I have no DCC rail track. I did the development on a track which was lend to my by Hornby. (Again: Thank you Hornby!).
2/ I think the system gets very complicated.
3/ I am short of time at the moment.
4/ The short circuit protection of the Gertbot is extreemly fast.

User avatar
thagrol
Posts: 319
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Re: GertBot DCC - Reversing loop

Wed Jan 04, 2017 1:19 am

Gert van Loo wrote:I understand the problem and the solution.
What you say is that it first needs to switch the power ON and later it has to reverse it.
The article I found had a number of track situations which need the circuit.
On the board I have a CPU, 4 H-bridges and a A/D converter. So I could build a program option for that.
But it is not a trivial program to write. (What if the operator reverses the train???)
Also:
1/ I have no DCC rail track. I did the development on a track which was lend to my by Hornby. (Again: Thank you Hornby!).
2/ I think the system gets very complicated.
3/ I am short of time at the moment.
4/ The short circuit protection of the Gertbot is extreemly fast.
Gert, if you find time I'm willing to help out with this and I do have model trains, both DCC and DC but no auto reverse unit.

An auto-reverser doesn't switch power on or of. It takes power from the DCC bus (or main track) and connects it to the loop. Then switching the connection from straight through to cross over, or back when a short is detected. As I understand it, but bear in mind that I don't use them, an auto reverser can be thought of as a very fast automatic change over relay.

For this to work the track section controlled by the reverser must be electrically isolated from the rest of the line.

On DCC the polarity/phase of the signal doesn't matter to the train. The decoder chip inside it handles signal processing, conversion from AC to DC and motor control.

Reverse loops on DC are a whole different kettle of fish though.

pibumble
Posts: 5
Joined: Fri Dec 30, 2016 9:28 pm

Re: GertBot DCC - Reversing loop

Wed Jan 04, 2017 9:20 pm

<deleted>

User avatar
Gert van Loo
Posts: 2440
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: GertBot DCC - Reversing loop

Wed Jan 04, 2017 11:37 pm

Coming back to the original question (which I now can answer because I understand the problem).

No, you can never use a Gertbot for that.
I will not go into all the details but you really need a piece of separate logic as the input and output signals must
be exactly the same (apart from the connections optionally being swapped over).
The Gertbot generates a separate DCC signal for each channel, with the same frequency but not necessary with the same phase.

faalhaas
Posts: 3
Joined: Sun Aug 21, 2016 8:46 am

Re: GertBot DCC - Reversing loop

Fri Jan 06, 2017 6:43 pm

Thanks Gert, i'll come up with something to do this!

(sorry for my late response, the forum did not send me any updates)

Return to “Gertboard classic”

Who is online

Users browsing this forum: No registered users and 4 guests