It's been time to wire my first reversing loop. I saw many commercial solutions for auto reversing the polarity of the loop. Some of them work with sensors and others detecting the short circuit and inverting the polarity before this short circuit would be detected by the central (but I don't like this solution too much...). Anyway, all of them are quite expensive and in my mind I had a possible solution using cheap latching relays.
Finally, I found this fantastic page here. It's a Z-scale blog named AGP SchwarzWaldBahn 220, and there I found the exact reference of the latching relay that works perfectly also in N-scale (I wonder it also works fine in HO).
It's just a latching relay (just needs an impulse to change and keeps the state until next pulse). It can work with just one signal and inverting the polarity, or two independent signals. And it's double, that means that I can switch both rails with just one relay. The exact reference is Axicom P2 V23079 from Tyco Electronics. You can find here the specifications (photo misses two more pins if you use the two signals versions).
But how do I send the pulses? Just with the accessories module, like if it was a normal switch.
And who sends the order? Usually you would need a PC software to detect the train in a previous isolated section to the loop and then send the command to the accessories module, but as I'm using Uhlenbrock modules all this is much easier and I don't need a PC turned on to run trains. That last is a premise for my layout.
Uhlenbrock detection modules can be configured to send orders to other modules when there is a detection or an undetection. So I defined a detection section previous to the loop, and another inside the loop (at the end). This detection sections cause to send the signals to the relay and invert the polarity properly. It could have been done also with just one detection signal and send one pulse on detection and other pulse when the detection signal disappear, but I think this is more reliable and I will be able to use it from the software as a full block to stop trains if necessary.
That's the final module installed, mounted in a protoboard:
The final installation has two modules to control one loop because of the detection section inside of the loop (you have to change the polarity of 3 rails, not 2, if the detection is done isolating just one of the rails).
If someone needs more information or details, just ask me!!