Today, in the new episode of my tutorial about how to control a digital model railway with Arduino, let’s learn together how to build a board for Loconet control panels.
In the previous tutorials, we used an Arduino Uno board, connected to different interfaces, to create command stations, decoders and digital sensors. Thanks to a ready made board it was quick and simple to develop those projects.
We can now make a step further and take advantage of what we’ve learned in the past to create a stand-alone board, that is a board which does not require any additional elements (such as an Arduino Uno board) to work.
The board, named LnControlPanel, allows to implement a complete control panel and has the following features:
- 32 independent channels
- each channel can be configured as
- INPUT (to control an element of the layout)
- OUTPUT (to monitor an element of the layout)
- each channel can be connected to a button (if INPUT) or one/two LEDs (if output)
The board is therefore composed of 3 logic blocks:
- the microcontroller, able to run Arduino sketches
- the Loconet interface
- the I/O expanders, to add additional channels
All the files required to build the board and the complete documentation are available in a Github repository.
In the following videotutorial, I explain step by step how to configure the board and how it works. Enjoy!
Bravissimo Luca, come sempre chiaro ed efficace !
Il progetto è veramente interessante ed è il naturale completamento di una centrale Loconet.
Un chiarimento: qual è la differenza fra SENSOR e MOMENTARY SENSOR ?
A presto,
Antonino
Grazie Antonino! La differenza è solo se il canale associato è di INPUT: se configuri il device=SENSOR ad ogni pressione del pulsante cambia stato (premo una volta -> sensore attivo, premo di nuovo -> sensore inattivo) mentre se configuri device=MSENSOR il sensore è riportato attivo solo quando il pulsante è premuto (appena lasci il pulsante torna inattivo)
Hello,
Is it possible to store the LED position in memory ? EEPROM ?
Because for the control panel when we turn the power off and on, the LED position are reset…
Thanks
Hi! You may modify the sketch to store the current positions in memory… I didn’t do so because the panel is not the “source of truth” of your layout and it may cause misalignments between what you see (= the state you stored) and the real layout