Upcoming Games

(UTC times)


Full list
Add a game

Upcoming Events

No events to display

Level Crossing Control - Preview of an upcoming feature

You are here: Home > Forum > Customising SimSig > Interface Gateway > Level Crossing Control - Preview of an upcoming feature

Page 1 of 1

Level Crossing Control - Preview of an upcoming feature 10/03/2021 at 22:25 #137734
headshot119
Avatar
4869 posts
GeoffM passed me a test version of the loader to test some new features which have been implemented on the Interface Gateway following some requests from users on the forum. After testing we had the raw parts of what we needed I thought about what use could be made of them...

A quick trip into the electrical cupboard revealed I've no push to make switches on hand, so unfortunately building a small crossing pedestal to make use of these additions will have to wait.

So instead I've knocked up a little command line interface to take control of Hoylake crossing on Sandhills and give the type of outputs a signaller would see on a crossing pedestal or control unit. Crossing Obstructed basically tells you if a car is parked on the crossing or not. A short video demonstration below.

SimSig Interface Gateway - Level Crossing Control Preview

"Passengers for New Lane, should be seated in the rear coach of the train " - Opinions are my own and not those of my employer
Log in to reply
The following users said thank you: jc92, andyallen4014, DonRiver, simonstops
Level Crossing Control - Preview of an upcoming feature 11/03/2021 at 00:12 #137736
DonRiver
Avatar
151 posts
Ah, fantastic!
(named for the one in Tasmania, not in Russia)
Log in to reply
Level Crossing Control - Preview of an upcoming feature 11/03/2021 at 17:03 #137743
Dionysusnu
Avatar
575 posts
Online
Cool! Might make a little application to automatically raise and re-lower any level crossing that gets obstructed, for those people that want to be lazy about it
Log in to reply
Level Crossing Control - Preview of an upcoming feature 18/03/2021 at 19:01 #137949
headshot119
Avatar
4869 posts
Well the push to make switches have turned up, and after a fight to find a better printing temperature for the grey filament; which incidentally still needs some work so the prints don't warp on the edge, I've done a quick and dirty crossing control panel.



In the first column:

Raise
Stop
Lower
Clear

In the second:

Auto Raise

Spaces have also been left for LED outputs, the one next to stop can either be used to separate the up side and down side red road lights, or light to indicate the barrier sequence is paused.

Just need to find some time over the next few days to wire it up.

"Passengers for New Lane, should be seated in the rear coach of the train " - Opinions are my own and not those of my employer
Last edited: 18/03/2021 at 19:01 by headshot119
Reason: None given

Log in to reply
The following user said thank you: DonRiver
Level Crossing Control - Preview of an upcoming feature 18/03/2021 at 21:32 #137953
DonRiver
Avatar
151 posts
Is that the world's longest toggle switch or a trick of the camera?
(named for the one in Tasmania, not in Russia)
Log in to reply
Level Crossing Control - Preview of an upcoming feature 19/03/2021 at 04:00 #137961
headshot119
Avatar
4869 posts
Ah! That's a rotary switch, it'll need cutting down at some point. I'd only bought one to see if that particular model came with the changeable blanking washer to stop it turning passed position 2 (Which it did).
"Passengers for New Lane, should be seated in the rear coach of the train " - Opinions are my own and not those of my employer
Log in to reply
Level Crossing Control - Preview of an upcoming feature 19/03/2021 at 21:55 #137987
Steamer
Avatar
3920 posts
Can anyone share some tips on handling large numbers of inputs? Addressable LEDs and other multiplexers allow lots of 'outputs' to be driven from a small number of pins, but I'm not sure how to handle the reverse.
"Don't stress/ relax/ let life roll off your backs./ Except for death and paying taxes/ everything in life.../ is only for now." (Avenue Q)
Log in to reply
Level Crossing Control - Preview of an upcoming feature 19/03/2021 at 23:06 #137990
DonRiver
Avatar
151 posts
@Steamer yes - the two ways that come to mind are using a diode matrix, or shift registers:

With a diode matrix, for N+M pins, you can read N×M keys or buttons (more or less)

With shift registers, you need 3 pins on the microcontroller and can daisy-chain a bunch of shift registers onto them, getting 8 inputs per chip

https://dronebotworkshop.com/shift-registers/

https://arduino.stackexchange.com/a/66710/28507

But tbh, you might be better off to not go too crazy with either technique (like, maybe not more than 50 inputs per microcontroller, I pulled that number from a hat), and instead use multiple microcontrollers networked together.

(named for the one in Tasmania, not in Russia)
Log in to reply
The following user said thank you: Steamer
Level Crossing Control - Preview of an upcoming feature 20/03/2021 at 00:09 #137991
Hawk777
Avatar
386 posts
You can use even fewer pins than N+M via a technique called Charlieplexing though that uses a lot of diodes.
Log in to reply
The following users said thank you: Steamer, DonRiver
Level Crossing Control - Preview of an upcoming feature 20/03/2021 at 13:07 #137997
bill_gensheet
Avatar
1314 posts
Online
By using double pole switches you can avoid the diodes as long as you accept only pushing one at a time. Wiring is then local on the buttons
You still get the usual 'row N / column M' signal back over [ (N+M) + (gnd / power) ] lines.

Otherwise maybe look at a hardware or local micro software scan, at least keeps all the wiring local, and returns a 'key # xxx is pressed' either binary lines (64 buttons on 9 wires: 6 binary with power and trigger) or a serial message.

Even making up a PCB can be pretty cheap these days.

Bill

Log in to reply
The following user said thank you: Steamer