djsfantasi
- Joined Apr 11, 2010
- 9,163
I would approach the problem in a totally different way.
Assuming that each track through the tunnel is continuous (no diverging routes within the tunnel, which includes passing tracks or sidings). Then once the sensors at the portal on one end of the tunnel are activated, you toggle a flip flop. Once the sensor at the other end is activated, you toggle the flip flop again. One state is tunnel occupied/turn tunnel lights on.
You can OR the state of the two sensors and feed it to the CLK input of a T flip flop (or a 4013 configured as one)
The problem is that in one case, you want to trigger on the leading edge and in the other case you need to trigger on the trailing edge. One could invert one signal, but then it won't work for trains going in the opposite direction. So you still need two flip flops - one for each direction. And OR their outputs to the tunnel light control circuitry.
I need to do a timing diagram before I try a schematic. This also assumes you are protected against cornfield meets using DCC. However, in that case the tunnel lights going out unexpectedly might provide enough warning to avoid the inevitable. A"feature".
I concur with the earlier poster who opined that reading a schematic based on pinouts versus logic symbols, is too much work for me.
Assuming that each track through the tunnel is continuous (no diverging routes within the tunnel, which includes passing tracks or sidings). Then once the sensors at the portal on one end of the tunnel are activated, you toggle a flip flop. Once the sensor at the other end is activated, you toggle the flip flop again. One state is tunnel occupied/turn tunnel lights on.
You can OR the state of the two sensors and feed it to the CLK input of a T flip flop (or a 4013 configured as one)
The problem is that in one case, you want to trigger on the leading edge and in the other case you need to trigger on the trailing edge. One could invert one signal, but then it won't work for trains going in the opposite direction. So you still need two flip flops - one for each direction. And OR their outputs to the tunnel light control circuitry.
I need to do a timing diagram before I try a schematic. This also assumes you are protected against cornfield meets using DCC. However, in that case the tunnel lights going out unexpectedly might provide enough warning to avoid the inevitable. A"feature".
I concur with the earlier poster who opined that reading a schematic based on pinouts versus logic symbols, is too much work for me.