Author Topic: Arduino 101  (Read 2295 times)

TwinStar

  • Conductor
  • ****
  • Posts: 505
  • Modeling a 1961 Rock Island Twin Star Rocket
Arduino 101
« on: September 28, 2017, 02:49:53 PM »
I've been looking into the prospect of using Arduino to handle the 69 controlled switches and a yet uncounted number of signals for my Dallas Union Terminal module set. I started with an article in the Nov 2016 MRH and read a blog on the Will County Model Railroad museum.

So far I've figured out that I'll need an Arduino Uno as a base, a motor driver shield, and perhaps a sensor shield stack.

The Deek Robot motor shield that I found is this:

http://deek-robot.com/productshow.asp?id=17&small=4

Is this the correct shield for Tortoise or MP-5 switch motors?

While I can find numerous articles for servo control via Arduino I haven't yet found anyone controlling Tortoise machines and posting pics, hardware, or schematics. I have a huge task in controlling this module set and being able to build the switch control, current detection, optical detection, and signal driving in layers is appealing.

Any Arduino users here among us?
Jacob Damron
Modeling late 1950's Dallas Union Terminal in Free-mo+ modules

Texas Railway Modeling and Historical Society trmhs.org
trmhs.org

Alan

  • Conductor
  • ****
  • Posts: 1019
    • LK&O Railroad
Re: Arduino 101
« Reply #1 on: September 29, 2017, 09:35:42 PM »
I am not an Arduino user however, the TI L293D H bridge is a very popular motor driver used in many applications. It certainly has more than sufficient ratings to operate a Tortoise. Deek is merely providing the L293D on a completed board although I would be leery of Deek. Their website is very amateur.

Here is the full spec sheet for L293D from the manufacturer: http://www.ti.com/lit/ds/symlink/l293.pdf
Page 11 (lower) shows the full schematic for a bidirectional driver arrangement you would need for a Tortoise. Bare L293D chips are available on eBay for $0.70. Another $1.00 worth of parts and you have the Deek product, some assembly required.  :D

L293D chips on eBay: http://www.ebay.com/itm/10pcs-L293D-DIP-16-pin-IC-Stepper-Four-Channel-Motor-Drivers-Controllers-Black-/152564910868?hash=item238593cb14:g:AqUAAOSwfRdZK7ir

You can also find assembled L293D boards (shields) on eBay.
Alan

LK&O Railroad website

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro

TwinStar

  • Conductor
  • ****
  • Posts: 505
  • Modeling a 1961 Rock Island Twin Star Rocket
Re: Arduino 101
« Reply #2 on: October 03, 2017, 06:40:45 AM »
Alan,

Thanks for the information. Searching 'L239D motor shield' netted me far more options such as this:

https://www.ebay.com/i/322228468184?chn=ps&dispItem=1

According to this they can drive 4 DC motors which I assume to mean that it can drive 4 separate Tortoise machines. This appears to be a far more economical option at roughly $2 per Tortoise/MP-5 (Uno $5 + $3 shield per 4 motors) versus the current $20 per T/MP-5 option that I'm looking at.

I'll keep digging. I thought there would be more Arduino use among our group. Maybe a post on MRH might yield more information.

Thanks again.
Jacob Damron
Modeling late 1950's Dallas Union Terminal in Free-mo+ modules

Texas Railway Modeling and Historical Society trmhs.org
trmhs.org

Alan

  • Conductor
  • ****
  • Posts: 1019
    • LK&O Railroad
Re: Arduino 101
« Reply #3 on: October 03, 2017, 07:25:49 AM »
Just curious... What is the advantage of using a microprocessor? Unless you have a complex automation scheme in mind it seems an overly complex solution to a relatively simple problem.
Alan

LK&O Railroad website

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro

TwinStar

  • Conductor
  • ****
  • Posts: 505
  • Modeling a 1961 Rock Island Twin Star Rocket
Re: Arduino 101
« Reply #4 on: October 03, 2017, 07:54:19 AM »
Just curious... What is the advantage of using a microprocessor? Unless you have a complex automation scheme in mind it seems an overly complex solution to a relatively simple problem.

There are 69 tower controlled Tortoise/MP-5 machines with two mains diverging into 4 mains, a passenger lead crossing two mains to reach the north passenger platform approach tracks, six passenger station platform tracks, one house track, numerous double slips, somewhere in the range of a dozen signaled control points, signals for the platform tracks, a current detection layer for each block, and optical detection at each signal block boundary. It's a bit complicated for off the shelf OBUB-3 boards and I thought there might be another solution.
Jacob Damron
Modeling late 1950's Dallas Union Terminal in Free-mo+ modules

Texas Railway Modeling and Historical Society trmhs.org
trmhs.org

Alan

  • Conductor
  • ****
  • Posts: 1019
    • LK&O Railroad
Re: Arduino 101
« Reply #5 on: October 03, 2017, 08:13:07 AM »
Certainly sounds like a complex track arrangement. Still, unless you are automating you need a way to control each Tortoise. That means pushing a button somewhere, whether on a Arduino input or a panel. Which brings me to my original question. If you have to push a button why use a microprocessor?

FWIW My layout has 79 Tortoise machines, 36 detection blocks, and no microprocessors. Signaling, which is in the design process right now, uses plain ole 4000 CMOS logic gates. Even with look ahead and tumble down, it still doesn't necessitate a microprocessor. That is why I am curious about your need for Arduino. Unless it is simply because you want to which is cool.
Alan

LK&O Railroad website

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro

TwinStar

  • Conductor
  • ****
  • Posts: 505
  • Modeling a 1961 Rock Island Twin Star Rocket
Re: Arduino 101
« Reply #6 on: October 03, 2017, 08:27:40 AM »
Want? No. I want simple, easy, and affordable. The solution I found, and which I really like, allows for local control of switches, Tower control of switches, Tortoise position feedback, CTC signals, and a default to ABS signals when selected. The only downside is the cost which right now stands at roughly $20 per switch machine just for the Tortoise interface. I was simply looking for another solution which is why I looked at Arduino after reading a few articles about it and servo control.

All switches on this module will be tower controlled (save for a wye track to turn cars/power) with lockout panels for main line switches, position feedback of switch position, and control of signals with interface to the MSS (Modular Signal Standard). And I don't know how I want to build the panel but I don't think I want to haul around anything very large.

As I said, the original solution I found may be the best but I'm certainly open to other ideas.
Jacob Damron
Modeling late 1950's Dallas Union Terminal in Free-mo+ modules

Texas Railway Modeling and Historical Society trmhs.org
trmhs.org

Alan

  • Conductor
  • ****
  • Posts: 1019
    • LK&O Railroad
Re: Arduino 101
« Reply #7 on: October 03, 2017, 09:16:12 AM »
Sorry, I forgot you are mobile. I assume you need to interface with other peoples' modules. Please post your final solution. It may be helpful to others in similar situations.
Alan

LK&O Railroad website

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro

garyiii

  • Fireman
  • **
  • Posts: 7
Re: Arduino 101
« Reply #8 on: October 03, 2017, 03:52:07 PM »
a quick google search for "Arduino in model railroads"  will lead to thousands of useful articles,