Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

What do you use Arduinos for on your layout?

4600 views
54 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
What do you use Arduinos for on your layout?
Posted by RR_Mel on Monday, April 11, 2022 4:31 PM

What do you use Arduinos for on your layout?

I use UNOs for random structure lighting, NANOs for crossing and tower light flashing, MEGAs for block signaling.  NANOs for animation.

I have 9 UNO Random Lighting Controllers controlling 9 houses, each house has 20 bulbs.  I have 2 NANOs flashing emergency lights on vehicles and tower lights.  I use a MEGA to control 14 search light signals in a 7 block mainline.  I use a couple of NANOs for opening and closing my roundhouse doors and miscellaneous animation.

I use a NANO to operate the gates and lights at two crossings.

I’m experimenting with servo control of turnouts.


Mel

 
My Model Railroad   
http://melvineperry.blogspot.com/
 
Bakersfield, California

Growing old is a bummer, aging is definitely not for wimps.

  • Member since
    August 2020
  • 581 posts
Posted by Southgate 2 on Monday, April 11, 2022 11:37 PM

I've considered getting a kit just to explore it. All the acronyms you used are like a foreign language to me. Dan

  • Member since
    January 2004
  • From: Canada, eh?
  • 13,375 posts
Posted by doctorwayne on Tuesday, April 12, 2022 12:35 AM

Southgate 2

I've considered getting a kit just to explore it. All the acronyms you used are like a foreign language to me. Dan

 

Yeah, I thought that Arduino was an Eye-talian gigolo.

Wayne

  • Member since
    September 2004
  • From: Dearborn Station
  • 24,280 posts
Posted by richhotrain on Tuesday, April 12, 2022 6:47 AM

Southgate 2

I've considered getting a kit just to explore it. All the acronyms you used are like a foreign language to me. Dan 

+1

Alton Junction

  • Member since
    September 2004
  • From: Dearborn Station
  • 24,280 posts
Posted by richhotrain on Tuesday, April 12, 2022 6:49 AM

doctorwayne
 
Southgate 2

I've considered getting a kit just to explore it. All the acronyms you used are like a foreign language to me. Dan 

Yeah, I thought that Arduino was an Eye-talian gigolo.

Wayne 

ahh, Wayne, such a dirty mind. Laugh

Rich

Alton Junction

  • Member since
    May 2020
  • 1,057 posts
Posted by wrench567 on Tuesday, April 12, 2022 7:44 AM

  The acronyms kill me too. By the time my slow brain deciphers them, I'm sidetracked to something else.

  I would love to try mini servos for turnout points. I can buy a dozen metal gear micro or mini servos for the price of one tortoise.

    Pete.

  • Member since
    January 2010
  • 169 posts
Posted by nycmodel on Tuesday, April 12, 2022 7:49 AM

I use two UNOs. One reads block occupancy detectors and controls 2 road crossings. One crossing is fashers and a bell and the other is a pair of period crossing gates. It also drives a couple of signals. The second UNO utilizes an IR receiver that reads the HEX codes from a TV remote and drives a digital sound chip to send a crossing horn sequence to one of two speakers. It was more of an experiment with IR receivers than to sound a crossing horn (DC layout). I can't help but think that this has other applications in MRR.

  • Member since
    March 2021
  • From: Vermont
  • 135 posts
Posted by Ablebakercharlie on Tuesday, April 12, 2022 7:50 AM

I have no arduinos so far on the layout but I plan to.

Some projects I want to pursue:

animation - There is an Aussie on Youtube named Laurie McClean who does some really neat stuff that I am going to use as inspiration

lighting -  I plan on using nanos or unos for lighting on some of the structures on the layout.  I want to have lights turn on and off at random.  Also I have a small mountain on the layout that I want to build an ariel tower and have an uno drive a light on the top of the tower that glows on and off with building and decreasing intensity

Crossing gates - have an uno control with IR sensors

For turnouts I am going to stick with Tortoises and Blue Points

I am still in the research and experimenting phase but am looking forward to getting them on the layout soon!

charles

  • Member since
    February 2008
  • From: Potomac Yard
  • 2,767 posts
Posted by NittanyLion on Tuesday, April 12, 2022 8:28 AM

Southgate 2

I've considered getting a kit just to explore it. All the acronyms you used are like a foreign language to me. Dan

 

Uno, Nano, and Mega are just sizes. There are no acronyms in the post. The size names are in all caps on the boards, so people often refer to them as NANO or whatever.

I program my decoders with DCC++ running on a Mega. One of my modules has a yet to be installed grade crossing flasher powered by a Nano. That's it for me. 

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, April 12, 2022 10:50 AM

Ablebakercharlie

I have no arduinos so far on the layout but I plan to.

Some projects I want to pursue:

lighting -  I plan on using nanos or unos for lighting on some of the structures on the layout.  I want to have lights turn on and off at random.  Also I have a small mountain on the layout that I want to build an ariel tower and have an uno drive a light on the top of the tower that glows on and off with building and decreasing intensity

 

charles

 

Here is my tower beacon.


https://melvineperry.blogspot.com/2019/01/january-21-2019-arduino-nano-tower.html

I use incandescent GOW bulbs on my layout so I needed a bit more current than the NANO would handle so I made a NANO expansion board with a high current driver, the NANO would drive a LED on its own.

Here is my Arduino UNO Random Lighting Controller.

https://melvineperry.blogspot.com/p/blog-page_27.html


Mel



 
My Model Railroad   
http://melvineperry.blogspot.com/
 
Bakersfield, California

Growing old is a bummer, aging is definitely not for wimps.

  • Member since
    July 2018
  • 661 posts
Posted by IDRick on Wednesday, April 13, 2022 10:23 AM

I've dabbled with using Arduino's for operating turnouts.  We modelers have the option of purchasing well-developed commercial systems or DIY.  I chose DIY because it is cheaper but if I were to start over again, I would definitely go with a commercial system such as Berrett Hill or Tam Valley Depot.  I didn't enjoy the learning curve of DIY (purchase decisions, programming sketches, route indication, control panel setup, servo setup, etc).  Commercial systems are simple to install, add route indication, and set up a control panel.  Berrett Hill has touch toggle switches with route indication.  These touch toggles are movable which makes it very easy to modify a control panel as needed or reuse if build a new layout.

Mel is an awesome resource and has helped me on several occasions! Appreciate you my friend!

  • Member since
    March 2021
  • From: Vermont
  • 135 posts
Posted by Ablebakercharlie on Wednesday, April 13, 2022 5:53 PM

RR_Mel
Here is my tower beacon.

RR_Mel
Here is my Arduino UNO Random Lighting Controller.

Thanks Mel for posting those links to your blog.  Very helpful!

- charles

 

  • Member since
    January 2019
  • 2,572 posts
Posted by John-NYBW on Wednesday, April 13, 2022 6:06 PM

Southgate 2

I've considered getting a kit just to explore it. All the acronyms you used are like a foreign language to me. Dan

 

I'm glad I'm not the only one to have that reaction. This doesn't sound like anything I'd be interested in.

  • Member since
    January 2019
  • 2,572 posts
Posted by John-NYBW on Wednesday, April 13, 2022 6:11 PM

Ablebakercharlie

I have no arduinos so far on the layout but I plan to.

Some projects I want to pursue:

animation - There is an Aussie on Youtube named Laurie McClean who does some really neat stuff that I am going to use as inspiration

lighting -  I plan on using nanos or unos for lighting on some of the structures on the layout.  I want to have lights turn on and off at random.  Also I have a small mountain on the layout that I want to build an ariel tower and have an uno drive a light on the top of the tower that glows on and off with building and decreasing intensity

Crossing gates - have an uno control with IR sensors

For turnouts I am going to stick with Tortoises and Blue Points

I am still in the research and experimenting phase but am looking forward to getting them on the layout soon!

charles

 

I have recently bought some crossing flashers with controllers but have yet to install them. Automating them seems unnecessary to me. I can use a simple switch to turn them on as the train approaches a crossing and then turn it off when it passes. There are a few crossings which I would like to add crossing gates to but again, they will be conrolled with a manual switch. 

  • Member since
    September 2004
  • From: Dearborn Station
  • 24,280 posts
Posted by richhotrain on Wednesday, April 13, 2022 7:47 PM

John-NYBW

I have recently bought some crossing flashers with controllers but have yet to install them. Automating them seems unnecessary to me. I can use a simple switch to turn them on as the train approaches a crossing and then turn it off when it passes. There are a few crossings which I would like to add crossing gates to but again, they will be conrolled with a manual switch.  

That seems like a real pain to me. Ick!

Rich

Alton Junction

  • Member since
    January 2019
  • 2,572 posts
Posted by John-NYBW on Wednesday, April 13, 2022 9:37 PM

richhotrain

 

 
John-NYBW

I have recently bought some crossing flashers with controllers but have yet to install them. Automating them seems unnecessary to me. I can use a simple switch to turn them on as the train approaches a crossing and then turn it off when it passes. There are a few crossings which I would like to add crossing gates to but again, they will be conrolled with a manual switch.  

 

 

That seems like a real pain to me. Ick!

 

Rich

 

How so? As your train is approaching the crossing, you just reach for a fascia mounted switch which can activate the flashers and gates if those are present. I have a double track main and have a few crossings that cross 3 or 4 tracks. Putting in detectors on all those tracks for trains approaching the crossing in either direction seems unnecessarily complex. A simple on/off switch seems like the simplest and most economical way to control a crossing.  

  • Member since
    January 2009
  • From: Maryland
  • 12,897 posts
Posted by ATLANTIC CENTRAL on Wednesday, April 13, 2022 10:33 PM

Well, I don't have any, not sure I have any need for them.

I have not even bothered to really understand how they work - and I was once an early programer of PLC's to run machinery back in the early 80's.

Sheldon

 

 

    

  • Member since
    February 2001
  • From: Wyoming, where men are men, and sheep are nervous!
  • 3,392 posts
Posted by Pruitt on Wednesday, April 13, 2022 10:52 PM

I use arduinos for nothing on my layout.

  • Member since
    February 2008
  • 8,823 posts
Posted by maxman on Thursday, April 14, 2022 12:14 PM

Pruitt

I use arduinos for nothing on my layout.

 

You have no need for a paper weight?

  • Member since
    June 2004
  • From: From Golden, CO living in Puyallup (Seattle), WA
  • 751 posts
Posted by Renegade1c on Thursday, April 14, 2022 4:21 PM

Let see. My main staging yard uses an Ardiuno Uno with 4 I2C port expanders  to route 15 tortoise switch machines via relays. It also controls LED's on the panel to show the route selected. The 1st port expander has a button matrix on it so for the 15 push buttons it only uses like 7 or 8 inputs instead of 15. 

I use two arduino nanos that control two 3 way peco turnouts with tortoise switch machines. I probably could have used a single arduino nano but they were installed at different times.

I have one arduino nano that controls the LED's on my contruction scene. This was probably the easiest one and I might still make some change so LED's don't look like they are chasing each other and more of a random blink. 

 20220411_130617 by Chuck Lee, on Flickr

 20220403_210631 by Chuck Lee, on Flickr

I have a another spot where a welder is working on a pipeline an the ardiuno nano drives the LEd's that look like the arc from the welder. Probably overkill but it gives a super cool looking welding effect. 

Lastly, I have a grade crossing with flashing LED's and functional gates that drop using mini servos. I need to improve this system though because the IR sensors are proving to be a bit finicky. Since all my rail cars have resistor wheel sets I think I'm going to go back to current sensing. i didn't want to mess with it since I have block detection already but its looking like I will have to change it. 

I have at least 3 more grade crossings to install (no gates on those) which will use ardiuno nanos to drive the LED's and do the current sensing on the rails. 


Colorado Front Range Railroad: 
http://www.coloradofrontrangerr.com/

flag

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Thursday, April 14, 2022 4:47 PM

I wanted a non synchronized flasher and went with a NANO.  I went with multi tasking the NANO using millis instead of delay.  It randomly flashes 7 bulbs totally out of synch.

https://melvineperry.blogspot.com/2019/01/january-16-2019-arduino-multasking.htm.

It could be expanded but I wanted to keep the size small and went with a single 7 channel driver chip.  I could have gone with a UNO and three 7 channel driver chips but I only needed 7 ports.  I’m driving 1mm micro bulbs used as flashing emergency lights on vehicles, police, fire and road maintenance.

Mel

 
My Model Railroad   
http://melvineperry.blogspot.com/
 
Bakersfield, California

Growing old is a bummer, aging is definitely not for wimps.

  • Member since
    September 2021
  • 22 posts
Posted by awtrain on Thursday, April 14, 2022 6:46 PM

I have an Arduino that controls 2 RGB (color) LEDs that will sit atop 2 signal towers. I haven't installed it yet as I'm still laying track in that area, but I have a section of track that I can switch from normal track operation into a programming track.

I will probably use more Arduinos for lighting and signalling, but I have a Raspberry Pi inside the mountain that is the main workhorse. It's still very much a work-in-progress, but it controls various lights such as street lights and interior (flickering) lights. There's an IR motion detector above each tunnel entrance that closes a crossing gate, flashes the signal lights and plays a Ding-Ding-Ding sound Geeked

Andy

 

  • Member since
    January 2009
  • From: Maryland
  • 12,897 posts
Posted by ATLANTIC CENTRAL on Thursday, April 14, 2022 8:37 PM

RR_Mel

I wanted a non synchronized flasher and went with a NANO.  I went with multi tasking the NANO using millis instead of delay.  It randomly flashes 7 bulbs totally out of synch.

https://melvineperry.blogspot.com/2019/01/january-16-2019-arduino-multasking.htm.

It could be expanded but I wanted to keep the size small and went with a single 7 channel driver chip.  I could have gone with a UNO and three 7 channel driver chips but I only needed 7 ports.  I’m driving 1mm micro bulbs used as flashing emergency lights on vehicles, police, fire and road maintenance.

Mel

 
My Model Railroad   
http://melvineperry.blogspot.com/
 
Bakersfield, California

Growing old is a bummer, aging is definitely not for wimps.

 

Mel, I love all this stuff you do, the car lights, the passenger car interiors, it is all fantastic.

I did a fair amount of that sort of thing when I was young, and still have a number of examples.

My love of long trains and expansive scenery has made me more of a "3 foot modeler", but I still like to detail the stuff up close.

But getting to my point, and your post, the use of Arduinos, I have questions?

Am I correct you had to wire those output boards?

And you have to program these things with all that code I saw on your blog?

And how much does one $40 board do?

And the cost of other parts?

Understand, I'm not being critical, just trying to understand.

My DC cab control system is complex - no question - and expensive enough, although I loaded up on needed parts 20 years ago.

It is all hard wired relay logic, the same several circuits over and over doing the same or similar jobs all over the layout, intergating cab assignment, turnout control, frog power, detection, CTC dispatching, walk around tower control and automatic emergency stop all into one system.

The power supplies, Aristo wireless throttles and the detectors are solid state - everything else is push buttons, LED's and 24 volt ice cube relays.

Since I use my controls for DC cab assignment, turnout control with Tortise motors, frog power, and detection and signaling, it just seemed more logical to do everything at those voltages rather than have a logic level and have to repeat it to a power level.

So, I am really trying to understand the advantage of Arduino? 

I have to admit, and maybe this is my mental block, even with my tech experiance, the idea of learning and writing code makes my eyes glaze over. I have not done anything like that for many years.

I would much rather design a relay circuit or a small stand alone solid state device for a task.

So please, if you can, explain the adavantage?

Sheldon

    

  • Member since
    December 2016
  • 168 posts
Posted by speedybee on Thursday, April 14, 2022 9:44 PM

I think the point of using Arduinos and other electronics in modelling is to have fun with them. That is, after all, the point of the entire hobby.

If you don't enjoy tinkering with and learning about circuits, transistors, ICs, code, etc, that's fine; you can use relays or diodes or buy prebuilt stuff if you want it.

Personally, I enjoy playing with electronics. In fact it's a major reason why I'm into model trains at all... They provide an excuse to design and program circuits for motor control, turnout switching, train sensing, etc.

On the other hand, I do not personally have interest in scratchbuilding rolling stock, so I just buy it RTR.

Point is, do what is fun for you! It's a hobby, not a job

  • Member since
    January 2009
  • From: Maryland
  • 12,897 posts
Posted by ATLANTIC CENTRAL on Thursday, April 14, 2022 9:55 PM

speedybee

I think the point of using Arduinos and other electronics in modelling is to have fun with them. That is, after all, the point of the entire hobby.

If you don't enjoy tinkering with and learning about circuits, transistors, ICs, code, etc, that's fine; as you can buy prebuilt stuff if you want it.

Personally, I enjoy playing with electronics. In fact it's a major reason why I'm into model trains at all... They provide an excuse to design and program circuits for motor control, turnout switching, train sensing, etc.

On the other hand, I do not personally have interest in scratchbuilding rolling stock, so I just buy it RTR.

Point is, do what is fun for you! It's a hobby, not a job

 

I completely agree, but that is not my situation or question. I am a "roll my own" electrnics guy (and a kit builder, scratch builder, etc).

Not bragging here, but I doubt that many on here would want to build my control system even if DCC did not exist - it is a bit complex.

My question is why this particular electronics solution?

What are its advantages? Why should I want to use it?

Sheldon

    

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Thursday, April 14, 2022 10:01 PM

Well Sheldon lots of questions, I’ll do my best to answer them.

Yes, I had to design and wire the add-on boards, in most cases the add-on boards are for high current drivers.  The Arduino outputs will only handle 20ma max each.  All most all of my lighting is incandescent Grain of Wheat bulbs at 40 to 100ma.  The seven channel driver chips are rated at 500ma per channel.

Yes I have to write a program for each Arduino to do what it does.  The program is rather easy, for the most it’s straight forward basic in English.

As for cost I bought my goodies before the costs jumped, a UNO cost under $5 including S&H a NANO was under $4 and the MEGA was $7.  The expansion boards ran about $1 for the UNO and $2 for the MEGA, I had to make the expansion boards for the NANOs.

The 7 channel driver chips were $1.50 and miscellaneous goodies about $1.50 per board, wire, resistors, sockets etc.

My 20 bulb Random Lighting Controller cost about $9 out the door.  My 7 block duel direction signaling controller MEGA controller cost about $10 less detection.

As for power I use DC to DC buck converters that were under $5.

I spent 50 years in electronics and never was into programming so there was a learning curve to writing the Arduino code.  I was a relay guy but processor driving goodies are much cleaner.

The limiting factor for Arduino or equivalent goodies is ones imagination.  It’s not for everyone but I really get a bang from working with my Arduinos.     

Mel


 
My Model Railroad   
http://melvineperry.blogspot.com/
 
Bakersfield, California

Growing old is a bummer, aging is definitely not for wimps.

  • Member since
    December 2016
  • 168 posts
Posted by speedybee on Thursday, April 14, 2022 10:24 PM

ATLANTIC CENTRAL
My question is why this particular electronics solution?

What are its advantages? Why should I want to use it?

I think you mostly answered your own question when you described how complex your setup is and that few would want to build it.

Using IC logic, like programming an Arduino, is a fast, cheap, and simple way of implementing electronic control that would be tedious, expensive and complicated to do otherwise

  • Member since
    January 2009
  • From: Maryland
  • 12,897 posts
Posted by ATLANTIC CENTRAL on Thursday, April 14, 2022 10:44 PM

speedybee

 

 
ATLANTIC CENTRAL
My question is why this particular electronics solution?

What are its advantages? Why should I want to use it?

 

 

I think you mostly answered your own question when you described how complex your setup is and that few would want to build it.

Using IC logic, like programming an Arduino, is a fast, cheap, and simple way of implementing electronic logic and power that would be tedious, expensive and complicated to do otherwise

 

 

FAST? Not if there is a high learning curve? There needs to be a compelling advantage to justify scraping something that is working fine that you already know how to do in favor of something new that you have to learn.

Cheap, my system is pretty cheap compared to most plug a play solutions, I don't understand the "power" of Arduino to compare costs with my system. That is the question I am asking? $50 Arduino vs industrial grade relays I paid $1 each for.

How many relays will the Arduino replace for my applications?

How many little driver boards will I have to build instead to handle higher current levels? 

Simple? Having designed, built, repaired and converted to PLC, the relay logic of the past, many decades ago, one simple fact remains, inputs are inputs, and outputs are outputs, and they all require some level or another of hard wiring for tactile operation. The use of touch screen or cell phone type interface is not an  acceptable input method for me. 

So be it a relay or an IC/processor, I need to wire inputs (buttons and lights mostly) and obviously the end goal is to control trains, turnout motors, signals and in my case direct track power.

So I don't see how a solid state device is going to reduce wiring by very much for my goals.

AGAIN, I'm asking for someone to explain enough to show me otherwise.

And again, I already use solid state inductive detectors, solid state regulated power supplies, solid state wireless radio throttles, and mass produced custom relay boards for my most basic relay circuit.

Please explain how Arduino is going to make my wiring easier? or better?

Sheldon

 

    

  • Member since
    January 2009
  • From: Maryland
  • 12,897 posts
Posted by ATLANTIC CENTRAL on Thursday, April 14, 2022 11:05 PM

Mel, thank you, you answered some of my questions and confirmed some information for me.

So from where I sit, Arduino looks great for things like your random structure lighting - that is no doubt easier with a processor.

A large part of my system is switching track power - connecting track "blocks" to wireless throttle base stations and providing frog power.

And then there is turnout control. By simply using a typical motor starter type relay circuit, a tortise machine can be controlled by push puttons at as many differnet locations as you want, and be given "route logic" that is pretty simple.

All wired on the bench except for the inputs and outputs..........

So, once you have a set of contacts reversing the polarity to a Tortise machine, you have left over contacts which all indicate statis - frog power, interlocking signal logic, it s already there.

How "complex" is your signaling? Is it on your blog somewhere?

Thanks for the info. 

On last question, explain "cleaner" in the contect you used it?

Sheldon

    

  • Member since
    July 2006
  • From: North Dakota
  • 9,592 posts
Posted by BroadwayLion on Thursday, April 14, 2022 11:51 PM

I do not know what an Adrino is, but if it moves, I'm sure the cat can catch it.

The Route of the Broadway Lion The Largest Subway Layout in North Dakota.

Here there be cats.                                LIONS with CAMERAS

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!