Using Arduino on a layout


OBTC 1909

Well-Known Member
I'm a geeky kinda guy and love the idea of controlling various things on a layout via an Arduino or Raspberry Pi. I've seen lots of tutorials on creating various signalling setups with an Arduino, but what all of these tutorials lacked was showing how to actually put this stuff into use. In other words, they do a great job showing everything on the tabletop with all the wiring running through a breadboard. What they don't show is transitioning from using a breadboard to actually installing everything under the layout. I'm curious as to how you make that transition from example on the table to actual use. I wouldn't think you would mount a breadboard under the layout and have you wiring and resistors, etc all exposed. Anyone know of a good tutorial for making that final step?
 
As Snagglepuss said, "Ain't it the truth!". I believe there is a reason for it, perhaps many but in my opinion the main one, is that the Arduino is primarily a learning and prototyping system. As such, it lacks the complete, robust, input and output that would allow it to control powered equipment and survive long in a tough environment like a train layout. It lacks EMI and overvoltage protection on its interfaces, so those have to be provided by external hardware modules or custom circuits. Also, in this case, convenient connectors that would allow it to be easily connected to wires and wire busses under the layout. Many tutorial creators are, to be blunt, unqualified and inexperienced in either or both software or hardware. So they don't actually know how to connect it to a real layout. The simple circuits they present, will work in many circumstances but only because a certain installation is very forgiving of crappy wiring and vulnerable circuits.

In fact, I have already programmed a working signal system on the Arduino platform, but I wouldn't use it on a layout without combining the processor with robust interfaces that also are compatible with the usual 12V signal circuits. That is a work in progress, I have done some PCB work but it's not finished, it got stalled because most of my free time got choked off.

You need a good connector system, and ESD/EMF resistant inputs and outputs (incorporating TVS diodes and additional protection circuits), to permit easy wiring and resistance to all the electrical noise from throttles, trains, lighting and all the other stuff that is found on a typical layout.

Ah, avoiding rats nest wiring. One way to experiment is with a proto sheild, it plugs into an Arduino and there is space there to solder prototype circuits such as train signal interfaces. I've looked (actually periodically looking) for information on that stuff, and never found much. At least, I found it easier to just plow ahead with some experiments. Another way, solder a Nano or Blue Pill, ESP or whatever to a larger proto board and go wild on that. But I think the best and only way to do that kind of thing at the moment seems to be, try to figure it out yourself. Actually the software is abundant. It's the good DIY hardware that is rarer.
 
Last edited:
I recently had my computer die and a friend who has vast computer savey suggested I just use a Rasberry instead. OK, can ya help me get the parts, build it and set it up? Yeah. Weeks later, still no Rasberry but lots of excuses why not.
I've had several friends who talk all tech stuff but when called on it tend to fold.
 
I made a small signal system on a test track using the Arduino a few years and it worked quite nicely. Nothing fancy, just a basic ABS style system. I didn't have a full layout to put it on, but wanted to try it. You can see it operate on the test track in this video: Arduino Signal Test

I have also used a Raspberry Pi to run JMRI for a layout before it it worked very well. That was a much easier thing to do than the Arduino stuff. I do believe there are people using the Arduino on their layouts, but I just don't know how to actually get everything set up on a real layout.
 
I recently had my computer die and a friend who has vast computer savey suggested I just use a Rasberry instead. OK, can ya help me get the parts, build it and set it up? Yeah. Weeks later, still no Rasberry but lots of excuses why not.
I've had several friends who talk all tech stuff but when called on it tend to fold.
D&J - I have read a lot of your posts and you seem to think through stuff good. Is there any reason that you can not roll your own system?
I don't mean to presume anything here as I don't know your level of dealing with this stuff; but: Unless you only need a 'beater with a heater' this is almost like buying a car/truck - just different questions.

Some questions that I ask myself:
How much $$ do I want to spend?
How much space can I allocate to system, keyboard, mouse and monitor(s)?
How fast do I want to have the software load and respond after boot?
Other people going to use it?
Do I use this system for stuff other than the railroad? I.E. Art/Design, Spreadsheets, Accounting, Software/Hardware design, eMail, Surfing ... ?
What is the preferred OS or type: windoz, linux, mac ... other?
How many applications will I have open at the same time?

All that said, then I decide what to do: buy or build or combination of both. I don't have or use a Mac, others may help with those.
I do use Windoz and Linux. Windows since Windows 286 up to Windows 10, and Linux since RedHat 5.2 up to Fedora 31. Either of those gives you different bang for your buck. Windoz software costs $$, Linux is free.

So now I am down to figuring out what processor; memory, hard drive ...etc. When it comes to computers - I am an I want it now type. - so it has to be fast! I have found that Xeon processors run circles around any Core processor, and I see no reason to by the thing new. I have been using Dell Precision Workstations and have found them to be rock solid. My current go to box is a T5500; dual Xeon 3.0GHz ( 6 cores each ) with 24Gig Ram and 2 Terabyte SAS hard drives in a raid 0 configuration. I have T3500's and T7500's. Except for my hardware/software design boxes, these are probably overkill. The T3500 is one processor capable, T5500 and T7500 are dual capable. T5500 has a smaller footprint and weighs a little more than 1/2 of the T7500's 80 pounds. I am not video bound or use it for gaming, so a run of the mill video card that supports dual monitors works for me and I can't imagine filling up the 2 Terabyte drive. Wife was complaining about her T3500's speed after using my T7500. She did not want an 80 pounder under her desk, so T5500. Nowdays I can not put a box with a single monitor on anybody's desk - they whine - dual monitors are the way to go! Got a few T5500's from Ebay preloaded with windows 10 and a windows key. I added brand new drives and mo memory if needed - think I have close to $2000 into 4 of them. Upgraded the Daughters too along with my 2 T3500's.

Windoz has and always had security issues and is prone to virus and ransomeware attacks. If you have multiple users, another user can trash the OS. Stay away from Window 11 for now; give it until next fall to see what shakes out. It took me almost 2 years to go to Windows 7 from XP, another couple of years for Windows 10. I have found that Windows 10 is pretty stable as long as you keep up with Micro$oft updates.

Linux on the other hand does not have security issues. Another user can not trash the OS. I have yet to see any of the anti-virus companies offer anything for a Linux box - there is no reason for it. Linux is getting better and better at self configuration during OS load, so if you go that way, you may get to learn new stuff if you are using odd-ball hardware.

Note that a few of the eBay sellers will ship a configured Windoz box - costs a little more though. As always, check stuff before you apply power - look under the hood and make sure that nothing looks broken, everything is plugged in and video card is seated proper. If there happens to be problems, contact the seller and they will fix it.






 



Back
Top