The Reversing loop ProblemThe short circuit happens because as the rails curve round in the loop they effectively swop sides and when the re-join the turnout (or point) the positive and negative rails would touch each other.
Reversing loop analogue solutions
Analogue solution #1The first approach assumes that you want a continuous run and relies on a point operated switch to trigger a double pole double throw change over relay to switch the polarity of the main line
When you change the direction of the points the auxiliary switch on the point motor triggers the change over relay that swaps the feed over for the main line.
This solution requires you to swap the connections to the main line and this might not be practical depending on the rest of your layout.
Analogue Solution #2
On the real life prototypes of our model railways most of the passenger carrying ones had signals controlling the entry and exit points of junctions.
Although the signalman would always try to clear the signals for a non stop run, sometimes this was not possible and trains would be held at a home or stop signal.
This second solution makes use of this and allows us to operate our railways more realistically, although it requires slightly more preparation.
This method requires a second isolated section at the exit of the loop, the next question is how long should that section be?
If you have no inertia simulation on your controller and no flywheels on your locomotive then it must be as long as your longest locomotive.
Otherwise, it needs to be long enough to bring your engine to a satisfying controlled stop.
At its most basic, a point controlled change over relay can switch this section from being powered from the loop line to being powered from the main line.
When it started its journey of locomotive had negative under its left wheels and positive under its right wheels, now with it facing the other way that has been swapped over, so in order to continue going forwards from the drivers point of view your need to change direction on the controller.
Please remember that with this solution you cannot change the points and reverse the polarity of the exit section until the engine is brought to a stop on it.
Of course you don't actually need signals for this to work, but it would look nicer.
The same switch that powers the change over relay could also be used to trigger the signalling.
Reversing loop DCC solution
Applying a solution that works seamlessly with DCC is more of a problem.
In principle the requirements for the isolated joints at the entry and exit of the loop remain the same.
Here is the problem.... A DCC controlled locomotive requires a continual signal from the controller to remember its commands and status.
If you do not have any sound fitted locos then the solution of bringing the locomotive to a stand and then changing the polarity of the exit section will work, although with DCC you won't have to reverse the direction of the loco.
DCC Solution for Sound Fitted Locos
There are special modules called "Auto Reverse Modules" for DCC reverse loops. These devices will only work on DCC layouts and incorporate circuitry that maintains the signals to the locomotives while automatically reversing the polarity of the loop section.
The AR01 unit from NCE has block detectors built into it that detect the current draw as the train enters the loop and travels round it so you don't need to switch it manually or by relay.
The AR01 has an input connection from the mainline and an output connection for the loop.
(other auto reverse modules are available)