Today, in the eighth episode of my tutorial about how to control a digital model railway with Arduino, let’s learn together how to build a turnout control panel connected to the Loconet bus.
In an analog layout, it is normal to use pushbuttons to control turnouts and signals
In the transition to digital control, these pushbuttons are often replaced by functions offered by the command station or by the control software on the computer (for example JMRI that we have learned to use in previous tutorials).
In reality, it may sometimes be useful to have control panels available, for example to operate particular areas of the layout (a freight yard, a secondary station…) or because they are easier and more immediate to use. The important thing, however, is that these control panels communicate with the other control elements of the layout, so that the position of the turnouts is always aligned, regardless of “who” sent the command to change the position.
To allow this exchange of information, it is therefore essential that the control panel is connected to the communication bus that coordinates our model. In these tutorials we are learning how to use the Loconet bus.
In the following videotutorial, let’s learn together how to build, with Arduino, a simple control panel to operate a turnout, with two LEDs to display the current position and one pushbutton to send the switch command.
If you like to print the panel with a 3d printer, here’s the STL file.
Hi,
very good tutorial. I prepared a software for myself, that also covers this and added functions like debounced inputs and blinking outputs.
BR,
Philipp
https://github.com/Signalmasi/FremoduinoLoconet/tree/master/Arduino_Loconet_IO
Hi Philipp, thanks for your message and for sharing your code!
Buongiorno Luca, interessante il progetto che hai realizzato in merito al sinottico con bus loconet e Arduino…mi piacerebbe poterlo utilizzare per il mio plastico , ma essendo bianco in materia Arduino non so se ciò fosse possibile. Vorrei farti cmq qualche domanda !!!
Quanti scambi si posso comandare !!!
Per gli altri scambi basta cambiare i valori degli indirizzi dei relativi decoder e numero PIN sulla libreria che hai pubblicato !!
ciao Giuseppe, il numero di scambi dipende solo da quanti pulsanti (e led se vuoi usarli) puoi collegare ad Arduino. Una scheda Arduino uno, escludendo i pin per la seriale e per l’interfaccia Loconet, ha circa 15 pin liberi quindi usandone 3 (pulsante + 2 led) per ogni scambio potresti gestire fino a 5 scambi. Naturalmente vi sono soluzioni un po’ più avanzate (es usare dei port expander) per aumentare tale numero.