Here's a version with the turnouts numbered and without the highlighting for the reverse loop so the track is clearer.
There would be three states that the six turnouts could be in as a set. Here's a table. I hope it's clear for the curved turnouts which route is considered 'diverging'. Turnouts #4 and #6 are straight turntouts, and diverging is the non-straight route for those two. For #2, #3 and #5 diverging is the larger radius, for #1 it's the smaller (crossover) route.
| forward travel is on the left track of double track |
| | | | |
| state: | normal 1 | reversing 2 | reversing 3 |
| | no reversing | enter from N | enter from S |
| | | exit to N | exit to S |
| TO# | | | |
| 1 | Normal | not used (N) | divering |
| 2 | not used (N) | normal | diverging |
| 3 | normal | not used (N) | diverging |
| 4 | normal | diverging | not used (N) |
| 5 | normal | diverging | not used (N) |
| 6 | not used (N) | normal | diverging |
| __ | | | |
| routes: | from S: 1, 5 | from S: hold at 1* | from S: 1, 2, 6, 3 |
| | from N: 4, 3 | from N: 4, 2, 6, 5 | from N: hold at 4 |
edit: corrections from original post marked by *
There are two momentary push buttons at control panel 1. One selects state 1 (all normal), the other would be pressed by an operator approaching from the N who wants to reverse direction, and would select state 2. State 3 is not selectable from control panel 1.
At control panel 2 there are two momentary push buttons. One selects state 1 (all normal), the other would be pressed by an operator approaching from the S who wants to reverse direction, and would select state 3. State 2 is not selectable from control panel 2.
To go from state 1 to 2 or 2 to 1, the arduino throws turnouts 4 and 5.
To go from state 1 to 3 or 3 to 1, the arduino throws turnouts 1, 2, 3, and 6.
To go from state 2 to 3 or 3 to 2, the arduino throws all turnouts.
The code can be made to sequence turnout throwing rather than trying to do them all at once if needed.
Turnouts #2 and #6 are part of the reversing section. (there was an earlier thread where a shorter version of the reversing section was discussed, one that extended only from the heel end of these two turnouts and half the circumference of the circle on the inside track, but the consensus was to extend the reversing section to the crossing to make it longer). They need to be powered from the reversing bus and the leds for them on the control panels need to be powered between the reversing bus and their frog.
Both control panels will show all six turnouts and have leds for all of them, so both panels will need both reversing and regular bus power available.
The above is if I go down the path of powering the leds from the DCC bus. I can also just power the leds from available pins on the arduino. Since I have the pins and don't need to deal with other turnouts from this 'town', it seems simpler to just use the extra pins instead of trying to power the leds from dcc. I haven't figured out how many extra pins that would be for sure, there are 6 turnouts and 2 leds for each one on each panel, so that's 24 leds total, but I believe there would only need to be 6 pins used for led control at most and maybe some can be combined once I make the state table. But with 6 for leds plus 3 for the four pushbuttons, I would still have 7 pins left unused.