I'm starting to design the control of my HO railroad layout and need to make some basic decisions about the networking bits. The layout will be in a 30' x 40' 'room' with 63 turnouts, 4 turntables, 1 roundhouse, 3 car barns and 2 engine houses. The doors on the roundhouse and the barns and engine houses will be servo controlled (I hope). That's somewhere around 80+ servos!
Given the length of servo control cables and the limitations of I2C I think I can/could use internet to each of 4 Mega 2650 R3s with each feeding PCA 9685s and a Nano for each turntable. I'm planning on 2 switches on the servos, 1 for frog power and the other for lighting the turnout position on the facia mounted control panel for manual 'local' control. That's all with Arduino. I'd like to use JMRI for 'remote' control and screen based displays.
I can figure out most of the 'application' level stuff (with a couple exceptions) but I can't find the network configuration stuff I think I need.
node addressing - I think DHCP is the right thing but where is the DHCP application located. I'm planning on JMRI for remote control and display.
I think I prefer wired LAN with Cat5 or 6. The network adapter for this configuration would be a W5500 cabled to the Mega rather than a shield or any WIFI network adapter.
This question is about JMRI servo addressing but I'll ask it here for convenience sake. Is the servo list in JMRI completely sequential, ie all 80+ in 1 list, or is it broken up by Mega? if it is 1 list how does JMRI know where the breaks are? If the list(s) are organized by Mega ...
I guess this whole set of questions are about addressing at protocol levels below the application layer. I'm really looking forward to you comments and suggestions!
Thanks, Ray.
If it were me I would seriously consider CAN, it is a multi master network that is very robust. The MPC2515 and Cory Fowler's library take the work out of it. The controller takes care of validating the message and requesting a resend if it is not correct, total transparent to your software. Messages are prioritized by what address you give them. This guarantees the most important message gets through first. Nice thing it is not hack-able unless you allow a direct hardware connection.
Nice thing all nodes receive all messages and can act on more then one ie you can also have general commands such as night and the lights all change, or dim or whatever you want. I use these with the simple Nano and they work great.
For a permanant installation you either need to setup MAC address to IP address reservations within your router, or else configure the Arduinos to use static addresses.
Have you already figured out the cable routing?
If space is limited then the bulk and limited bend radius of Cat cable may cause problems.
You'll probably get more comprehensive answers to your questions by asking in one of the many specialist JMRI forums.
Thanks for your reply - it provides good food for thought.
I'm modeling the Narragansett Pier RR in 1894. It was a local, short haul 8.5 mile rr that served 3 towns in southern Rhode Island (Peace Dale, Wakefield and Narragansett Pier) and connected with the New Haven RR in Kingston RI from 1876 'till 1981. Today its a bike path.
Since the network would be static except for expansion as I add the W5500s and Mega 2650s for the towns using static IP addresses would work fine. That eliminates the need for DHCP and probably the MAC address issues as well. This will start as a private network but perhaps find a gateway to the internet in the future.
I plan to use an 8 port LAN hub somewhat centrally located in the space with connections to the JMRI host (probably Linux) and each of the (4) W5500s that each connect to a Mega 2650 R3. The extra ports in the hub could support future expansion for Arduino control and monitoring.
Thanks again, I think that decision is complete for the transport level, now on to the addressing. I'll look at the JMRI forums for some help.
Time for an update. I'm using DCC-EX for train control.
For the turntables, turnouts, doors, lighting etc I'm using JMRI with MQTT over ethernet. With static ethernet addresses I won't need DHCP and I'll supply MAC addresses via "locally administered" MAC addressing. I looked at DCC++ for an accessory bus but I found that I can understand the MQTT messaging much better. If I use JMRI and PanelPro I can set up a panel for each Arduino Mega (a logical segmentation of the layout) and format the MQTT messages etc as required.
Thanks for giving me some ideas to ponder and making me look deeper at the technologies. A nice learning experience.
Ray.