Tamalpais Valley Railroad

We move stuff there and back again

 

Home

Community

Contact

Humor

Links

Wireless DCC

Arduino

Articles

Micro Book

X2011 Convention

LED Lighting

Donner Summit Progress

Feb 18 Frog Power

Jan 18 DIY DCC Decoders

Jan 8 - Donner Summit v3

Jan 6 09 - Slim Princess

Oct 23 - Sound Xperiment

Oct 15-Construction Start

Sep15 - Main St Colfax

Sep 1 08 - Focus Stacking

Aug 15 08 - Colfax Depot

Aug 4 08 New Layout 2

Jul 31 08 New Layout Plan

Jul 22 08 - Snow in Ogden

Jul 19 08 McCloud Railway

Jul 8 Solar and Profits

Jun 27 08 AC-12 4294

Jun 23 08 Donner Trip

Jun 19 08 SP GP9 #5623

Jun 18 08 Depth of Field

Jun 16 2008 Craftsman Kit

Jun 15 2008 Cab Forwards

Jun 14 2008 Rivet Count

Jun 13 2008 Why?

Jun 12 2008 White Balance

Jun 11 2008 Photography

Blog

Gallery

Gallery 2

Videos

Construction

How-to

Water

Trees

Grass

Terrain

Servo Switch Decoder

Trackplan

Prototype

SP Railroad Atlas

 
My first decoder for controlling 4 servos to switch 4 turnouts. The little black boxes at teh bottom of the board are realsy for switching the frog power. The little PCB is for manual control and a typical servo is on the right side.
Jan 18 2009 - Do-It-Yourself DCC Accessory Decoders

I took a break from the carpentry of building the Donner Summit and decided to work on something I have wanted to get into for a while - DCC hardware and software.  Like many people I have been a user of DCC and have installed a lot of decoders.  However, for the last five years I worked for a Japanese instrumentation company and spent some time looking into using DCC to replace some of the systems they use for machine control.  It became apparent that DCC would NOT work well for this kind of instumentation - most ntably because of the lack of easy two-way communication.

Now that I find myself with more time on my hands having been laid off from that company, I started seriously getting into building some decoders.  Specifically I wanted to use model airplane servos for switching turnouts.  They are small powerful and cheap and I happen to have a few dozen around the house leftover from my RC model airplane and battlebot hobby days.

I chose to use the Parallax SX system of chips (www.parallax.com) rather than the PIC family of microprocessors that virtully all the DCC manufacturers use.  Mostly because the SX chips are really well suited to running mutliple servos while simultaneously interpreting the incoming DCC system as they are very fast.  Also Parallax makes a BASIC compiler available for their chips and the programming system is a bit nicer.  The picture on the right shows the first successful design.  A nice thing about microprocessors for me is that they are 90% software and 10% hardware.  Since I have been programming since the 60's and I built and sold a software company, the programming aspect was very appealing to me.

The servos are mounted with double-sided foam "servo" tape and the wire sticks up to move the points. What could be easier? Notice how thin the servo is - perfect for double-deck layouts with thin upper decks.
Now that I find myself with more time on my hands having been laid off from that company, I started seriously getting into building some decoders.  Specifically I wanted to use model airplane servos for switching turnouts.  They are small powerful and cheap and I happen to have a few dozen around the house leftover from my RC model airplane and battlebot hobby days.

I chose to use the Parallax SX system of chips (www.parallax.com) rather than the PIC family of microprocessors that virtually all the DCC manufacturers use.  Mostly because the SX chips are really well suited to running multiple servos while simultaneously interpreting the incoming DCC system as they are very fast.  Also Parallax makes a free BASIC compiler available for their chips, there is a lot of nice code available at their web site and the programming system is a bit nicer.  The picture on the right shows the first successful design.  A nice thing about microprocessors for me is that they are 90% software and 10% hardware.  Since I have been programming since the 60's and I built and sold a software company, the programming aspect was very appealing to me.

The controller for my decoder has 2 LEDs to indicate the turnout state and a small button to switch the turnout mounted on a small PCB board. It is meant to be mounted behind teh fascia with the LEDs and button sticking out 3 holes.
Frankly the hardest part of the project was trying to understand the almost completely opaque and totally dry NMRA DCC specs.  These specs could use some real life examples and some code psuedocode to show how to implement it.  The standards also layered with lots of legacy stuff left in to maintain backwards compatibility.  However, once I got through all the layers it turned out to be straightforward to implement.  I now have a number of decoders happily switching on my Tam Valley layout.  It turned out to be trivial to adapt the decoder to drive my old Tortoises so I removed the DPDT switches I used for these and replaced them with my decoders.  Now I can control the turnouts from my hand controller.  The real advantage though is the ability to set up routes - one button switching of groups of turnouts.  This really makes running the railroad a lot simpler.

I am getting back to the carpentry this month and moving forward on getting the staging basement built.  I'll get back to you when that is done!

Next->


Blog List
Jan 18 09 - DIY DCC Decoders
Jan 8 09 - Donner Summit Plan v3
Jan 6 09 - Slim Princess
Oct 23 - Sound Xperiment
Oct 15 - Construction Started
Sep 15 - Main St Colfax
Sep 1 - Focus Stacking
Aug 15 - Colfax Depot
Aug 4 - Donner Summit 2
Jul 31 - Planning the Next Layout

Jul 22 - Snow in Ogden
Jul 19 - McCloud Railway
Jul 8 - Solar and Profits
Jun 27 - AC-12 4294
Jun 23 - Donner Pass Trip
Jun 19 - SP GP9 #5623
Jun 18 - Depth of Field Test
Jun 16 - Craftsman Kit
Jun 15 - Cab Forwards
Jun 14 - Counting Rivets
Jun 13 - Why MR is cool
Jun 12 - White Balance
Jun 11 - Photography

RSS feed

Subscribe in a reader
Blog Roll

Confessions of a Model Train Geek
CNJ Bronx Terminal
Modelrailroading.wordpress.com
Dan's Train Blog
Lebanon Railroads
Westport Terminal RR
Rob Hinkle's Blog
Espee Mike



© Copyright 2012 by Duncan McRee, All Rights Rreserved - dmcree at tamvalleyrr dot com

Website powered by Network Solutions®