Any ideas for detecting direction of travel and Block occupancy?

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
Greg, No extending the arm would have the effect of making it easier to operate (think of the ease of getting a Nail Out with a Jimmy, the longer the Jimmy the easier it gets), we extended the arm but too much as there is not a lot of space between the Baseboard and where Flange will activate but not be above Rail Height. The Wheel one sans wheel looks to be about right size of what I was referring to.
.
I can see you need less force with a longer arm, but what I was trying to say is that if you extend the arm, you need a longer travel to operate and since we surely only have a couple of mm of movement as a flange passes over, we don't want a longer movement.
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
Interesting stuff. Thanks. 'Someday' I might get some to 'play' with. Some of my questions would be:
The Ultrasonic thingie - weatherproofing?? If I could find an English data sheet it would help. Statements like output is 'TTL level signal proportional to distance' sounds like what I need, but then all the data sheets go on to require a way of reading the 'echo' pulse time using an Arduino or Picaxe or similar.

PIR motion. Will it detect motion further away than the track like Operators wandering around? Does it only detect 'heat' from live bodies or movement?
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
I am enjoying this brain teaser.
Continuing with dunnyrail's idea of micro switches to detect trains, today I experimented with a micro switch to see if my lightest wagon would operate it. This is the switch.
IMG_7350.JPG
Problem #1 - it's too high to just sit on the 'baseboard' – I needed to raise the track by 4mm to get the arm level with top of rail.

Problem #2. When 'snugged up against' the rail foot, the actuating arm is 6 mm away from the rail head, no where near the flange – pic
IMG_7353.JPG

So I had to glue a piece of 0.5mm styrene to the metal arm. (This may help to stop water ingress.)
IMG_7354.JPG
Both these problems may be fixed with a different switch.
The wagon did seem to operate the switch OK. But have to make sure there is a tiny gap between rail and white styrene or it 'binds'. Too much gap and the flange runs between rail and styrene.
Maybe the next step is to use some bluetack for a semi-permanent installation on a running track.
 

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,206
4,997
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
I am enjoying this brain teaser.
Continuing with dunnyrail's idea of micro switches to detect trains, today I experimented with a micro switch to see if my lightest wagon would operate it. This is the switch.
View attachment 230219
Problem #1 - it's too high to just sit on the 'baseboard' – I needed to raise the track by 4mm to get the arm level with top of rail.

Problem #2. When 'snugged up against' the rail foot, the actuating arm is 6 mm away from the rail head, no where near the flange – pic
View attachment 230220

So I had to glue a piece of 0.5mm styrene to the metal arm. (This may help to stop water ingress.)
View attachment 230221
Both these problems may be fixed with a different switch.
The wagon did seem to operate the switch OK. But have to make sure there is a tiny gap between rail and white styrene or it 'binds'. Too much gap and the flange runs between rail and styrene.
Maybe the next step is to use some bluetack for a semi-permanent installation on a running track.
This was where my wrapper of Nickel Silver came in, I used a very thin piece to be able to press it onto the Arm. No glue to come loose. But you are exactly replicating the things we did that worked very well till the Ruschbahn closed.
 
D

Deleted member 4232

Guest
Moved
 
Last edited by a moderator:

Walts-Playmobil

Playmobil Trains.
24 Oct 2009
454
35
North Wales
www.walts-playmobil-collection.me.uk
Best answers
0
Country flag
On my Playmobil layout I use infra-red detectors to work the lights on my level crossing. There are signal lights for both directions. As the train approaches thc crossing lights operate and the signal light In the direction of travel goes to green. After the train has passed over the crossing the signal light goes to red after the train has cleared the other detector the crossing lights stop. The unit then shuts down and waits for the next train to approach from either direction. Do you think you could make use of this circuit as if you only wired up the green lights it could indicate the train was in section and its direction of travel? If it would do PM me your address and I will send you a copy of the circuit.
 

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,206
4,997
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
On my Playmobil layout I use infra-red detectors to work the lights on my level crossing. There are signal lights for both directions. As the train approaches thc crossing lights operate and the signal light In the direction of travel goes to green. After the train has passed over the crossing the signal light goes to red after the train has cleared the other detector the crossing lights stop. The unit then shuts down and waits for the next train to approach from either direction. Do you think you could make use of this circuit as if you only wired up the green lights it could indicate the train was in section and its direction of travel? If it would do PM me your address and I will send you a copy of the circuit.
Oh can we not see the circuit on here please?
 

GAP

G Scale Trains, HO Trains, 1:1 Sugar Cane trains
14 Jun 2011
4,061
947
Bundaberg Queensland, Australia
Country
Australia
ringbalin-light-railway.blogspot.com
Best answers
0
Country flag
Greg, How about stopping all traffic except the train in the block? My thoughts below;

1=green (Go)

0=red (Stop)

Start:

A&B =1

Look at A & B inputs

If A = 1 (train detected, A set to Go, green) then B=0 (B set to Stop, red)

Loop till A=0 (no train detected at A then set A&B to Stop ie both signals set to red

Loop till B=1

B= 1 then Pause for a length of time to allow train to pass (Timer in Picaxe set to run when A=0?) - both signals still at red (only train in block can move).

When B=0 (no train detected) then Clear both A&B

Goto Start - wait for next input


Do the reverse for the opposite direction Parallel processing maybe?
 

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,206
4,997
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
Greg,
I have just gone back to your original request and re reading it I strongly believe that while doable the elactronic route is both tricky and possibly prone to Maintenance issues. Some post back On this Thread I suggested a Token for the section, but perhaps my Staff and Ticket System may work as well. It copes with 2 Trains following one after the other or one each way depending on the Timetable if in fact there is one at your friends. Perhaps you might like to revisit the Thread that I posted.

https://www.gscalecentral.net/threads/safe-operation-of-a-single-line-model-railway.309472/
 

GAP

G Scale Trains, HO Trains, 1:1 Sugar Cane trains
14 Jun 2011
4,061
947
Bundaberg Queensland, Australia
Country
Australia
ringbalin-light-railway.blogspot.com
Best answers
0
Country flag
Greg, How about stopping all traffic except the train in the block? My thoughts below;

1=green (Go)

0=red (Stop)

Start:

A&B =1

Look at A & B inputs

If A = 1 (train detected, A set to Go, green) then B=0 (B set to Stop, red)

Loop till A=0 (no train detected at A then set A&B to Stop ie both signals set to red

Loop till B=1

B= 1 then Pause for a length of time to allow train to pass (Timer in Picaxe set to run when A=0?) - both signals still at red (only train in block can move).

When B=0 (no train detected) then Clear both A&B

Goto Start - wait for next input


Do the reverse for the opposite direction Parallel processing maybe?

Greg,
Bit more of a thought what about looking at it like a level crossing?
That is train enters and all other traffic stops till the block is vacant.

Something like this;
Detect train entering
Set all lights to red only moving train can proceed.
Train proceeds through block
Train leaves block all lights set to green

As the lights are only indicators driver instructions say do not enter on red wait at holding point till all green.
If 2 trains are waiting then the first one to arrive at the respective holding point is next to move.
Similar to Air Traffic Control instructions "point 123 taxi and hold".
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
Greg,
Bit more of a thought what about looking at it like a level crossing?
That is train enters and all other traffic stops till the block is vacant.

Something like this;
Detect train entering BUT how do you know the train is entering and not leaving? This is the crux of my whole problem.
Set all lights to red only moving train can proceed.
Train proceeds through block
Train leaves block all lights set to green

As the lights are only indicators driver instructions say do not enter on red wait at holding point till all green.
If 2 trains are waiting then the first one to arrive at the respective holding point is next to move.
Similar to Air Traffic Control instructions "point 123 taxi and hold".
 

GAP

G Scale Trains, HO Trains, 1:1 Sugar Cane trains
14 Jun 2011
4,061
947
Bundaberg Queensland, Australia
Country
Australia
ringbalin-light-railway.blogspot.com
Best answers
0
Country flag

Couple of thoughts;

Have picaxe look at the order in which the beams are cut?
2 beams each end.
1 then 2 = In
2 then 1=Out

For one train travelling Left to Right;
Detector Left signals train In (1- 2 sequence)
Set lights to Red
Poll the detectors (lights still red) waiting for next sequence from either L or R detector.
Detector Right signals train Out (2-1 sequence)
Set lights Green
If train is reversed out for any reason then 2-1 sequence is given by Left and lights set to green.

Set a length of time after last detector senses a train before setting lights green.

I am picturing this with a line with a passing siding at either end before the single track section am I correct?
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
Couple of thoughts;

Have picaxe look at the order in which the beams are cut?
2 beams each end.
1 then 2 = In
2 then 1=Out

For one train travelling Left to Right;
Detector Left signals train In (1- 2 sequence)
Set lights to Red
Poll the detectors (lights still red) waiting for next sequence from either L or R detector.
Detector Right signals train Out (2-1 sequence)
Set lights Green
If train is reversed out for any reason then 2-1 sequence is given by Left and lights set to green.

Set a length of time after last detector senses a train before setting lights green.

I am picturing this with a line with a passing siding at either end before the single track section am I correct?
Yep, that's about where I started - needing 4 detectors for the section. I think I can get the logic / flowchart to work.
I was hoping there was an easier way. - there is, like your post #30, but it has some 'warts' in that it can't give an alarm if two opposing trains do enter the section and can't reset if a train shunts out across the detector, and back.
Yes you're correct in that it is a single line between 2 stations with crossing loops.

At present my problem is how can I use 433 MHz RC units for two-way communication. We know from experience that you cannot have two transmitters transmitting at once. So I guess I'd have to only transmit as needed for a change of signal state. Both Rx just sit waiting for a message to come through. So I'd need a picaxe 08M at each end to control the RC and then another pair for the logic at each end.
 

GAP

G Scale Trains, HO Trains, 1:1 Sugar Cane trains
14 Jun 2011
4,061
947
Bundaberg Queensland, Australia
Country
Australia
ringbalin-light-railway.blogspot.com
Best answers
0
Country flag
Yep, that's about where I started - needing 4 detectors for the section. I think I can get the logic / flowchart to work.
I was hoping there was an easier way. - there is, like your post #30, but it has some 'warts' in that it can't give an alarm if two opposing trains do enter the section and can't reset if a train shunts out across the detector, and back.

Yes you're correct in that it is a single line between 2 stations with crossing loops.

At present my problem is how can I use 433 MHz RC units for two-way communication. We know from experience that you cannot have two transmitters transmitting at once. So I guess I'd have to only transmit as needed for a change of signal state. Both Rx just sit waiting for a message to come through. So I'd need a picaxe 08M at each end to control the RC and then another pair for the logic at each end.

We know from experience that you cannot have two transmitters transmitting at once.
Well you can, but they interfere with each other. :( :(

I guess I'd have to only transmit as needed for a change of signal state. Both Rx just sit waiting for a message to come through.

Yes you could use the same transmitter with 2 receivers reacting to separate commands eg Rx 1 reacts to channel A and Rx 2 reacts to channel B controlled by Picaxe, eg if A is active do lights Left or if B is active do lights Right or something like that similar to the horn and brake functions on your early diesels.
The chances of both buttons being "pressed" at the same time should be remote as only one train should be theoretically on the single track and the time difference between 2 presses if controlled by Picaxe at 4MHz you will not be able to see.

So I'd need a picaxe 08M at each end to control the RC and then another pair for the logic at each end.
Consider 14M2 or 18M2 same as an 08Ms but with more I/Ps and O/Ps.
It took me about 30 minutes to construct a programming board for my 14M2 (still messing around with the level crossing idea) on a piece of verboard.

Those thoughts should give you something to keep you awake tonight, feel free to pick holes in my logic .
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
We know from experience that you cannot have two transmitters transmitting at once.
Well you can, but they interfere with each other. :( :(

I guess I'd have to only transmit as needed for a change of signal state. Both Rx just sit waiting for a message to come through.

Yes you could use the same transmitter with 2 receivers reacting to separate commands
NO. The way I see it, I need a Tx at each end to transmit the signal state command to the other end.
 

PhilP

G Scale, 7/8th's, Electronics
5 Jun 2013
33,592
3,525
Nottingham
Best answers
0
Country flag
Greg, two thoughts:
1. How far / difficult to put a length of hosepipe with a cable in between the two ends? - You only have to do it once!
2. Go for a slightly more expensive Tx/Rx combination where several units can co-exist in the same 'RF space'??
 

gregh

electronics, computers and scratchbuilding
1 Nov 2009
3,137
263
Sydney, Australia
www.members.optusnet.com.au
Best answers
0
Country flag
Greg, two thoughts:
1. How far / difficult to put a length of hosepipe with a cable in between the two ends? - You only have to do it once!
2. Go for a slightly more expensive Tx/Rx combination where several units can co-exist in the same 'RF space'??
I agree wires would be best. But it's not my railway, it's my mate's. So I have to convince him (and probably help him dig the trench).
 

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,206
4,997
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
I agree wires would be best. But it's not my railway, it's my mate's. So I have to convince him (and probably help him dig the trench).
Just how long is the section in Yards or Feet please?
 

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,206
4,997
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
So not so far to walk to get a Token then if all the Tecky solutions too difficult with Wiring runs and workable solutions then.