Sunday, January 7, 2018

Experimenting with Arduino micro-controllers

When I was still working one of the systems I was responsible for used an Allen-Bradley Programmable Logic Controller or PLC.  The PLC itself was so reliable it never required any repair and I just had to make minor programming and wiring changes depending on my employer's needs.  I used to think something like this would be great for doing things on a model railroad but of course these PLC systems are for commercial applications and are not cheap.  So what I was really thinking of was something similar but smaller and at a consumer price.

Shortly after retiring 5 years ago I discovered the Arduino line of micro-controllers and purchased a Uno board at Radio Shack to play around with.  I taught myself to write some code for it and set up several simulated model railroad applications with LED's on a proto-board but found the mounting and connections to be awkward for practical applications.
More recently I discovered the Arduino Nano on ebay which does about the same job as the Uno but is physically a bit smaller.

What makes it work for me is that for a very reasonable price I can get a terminal board kit that  the Nano plugs into and that has mounting holes.

The programming is done by using an editor program downloaded from the Arduino web site.  The programs are checked and compiled by the editor and loaded onto the Arduino by USB connection to your computer.



The outputs of the Arduino are limited to 40ma which is fine for most LED's not for bigger loads such as a relay.  These small relay modules are powered separately from the Arduino and the input uses an opto-isolator device so the output of the Arduino is protected.  These come in single or multiple relay configurations and are also reasonably priced on ebay.



So with these building blocks I am ready to start some practical projects on the Palisade Canyon layout or on my Ntrak or AsiaNrail modules.  Some of the ideas I have include:

  • Grade crossing flashing light and bell
  • Staging yard controls
  • Point to point operation with stops and turnouts
  • Model buildings lights on and off
  • Signal controls
  • RFID reading and train routing

2 comments:

  1. Hey Brad, those Arduinos are great for on-the-fly setups.
    I started my signaling project a nano, but dicovered I would be nice to have a own circuit board and switch back to a full size uno which I use to "burn" the firmware to the atmega chips :D
    Keep us posted, will watch close especially for the signal controls and grade crossing :D

    ReplyDelete
    Replies
    1. Thanks Mike. I'm working on a schematic drawing for the grade crossing now and will post it soon.

      Delete