Two way minecarts on a single track
I've built a rail system for some minecarts to transport items from my mineshaft back to my base, with a load/unload system. However what I'm trying to achieve is to get two minecarts working on the same single run of track at the same time.
To achieve this, at the mineshaft end of the track, I'm trying to use detectors to detect an approaching minecart returning after unloading from my base (B), and launch the loading minecart (A), and prevent them from colliding by switching the track at the junctions.
The image above shows the basics. I've used a powered rail under the loading minecart (A), and a detector on the track which powered the powered rail. I've tried all sorts of combinations of junctions (using detectors to switch them), but all my attempts so far have been fruitless. Can anyone suggest a solution?
Solution 1:
Here's one possible solution using the order in which you place the tracks and making sure "jumping" a track always happens straight forward. The S pattern is just there to slow the cart down so it doesn't reach the end before the other one departs.