Working on the train layout...
22 December 2011
By Michael
The source code for the Arduino lighting controller I used in my 2011 layout. In addition to this code, it requires the Metro timer library and the EZExpander library. Download the TGZ for the full package. Some of the files include:
- debug.h - enables/disables debug messages over the serial console.
- layout_lighting.ino - the main program.
- leds.h - maps individual bits to the LED they control.
- MelodyPlayer.cpp - Allows music to be played while the LEDs continue to blink.
- samples.h - list of christmas carols converted to be played by melodyplayer.cpp.
08 December 2011
By Michael
I found a pre-assembled shift-register board that did almost exactly what I had designed mine to do, for $20. After all the pain of trying to get my soldered, this was a big win - although I eventually realized that the problem might have been the batteries - they don't provide enough current to drive all the extra LEDs.

Christmas 2011
30 August 2010
By Michael
Way back in March (I think) I bought an Arduino to add some flash to this train layout. I played with it for a few days, said "This is going to be cool" and went back to riding my bike.
The problem is that, while the software is obviously going to be easy the mechanics of the assembly isn't - not for me, anyway.
For example, I need to run 8 (up to 16, really) white LEDs out onto the layout, and maybe 4 tri-colors. Took me 2 hours to set up the soldering iron and make a single LED+wire-harness. A lot of that was "find all the junk and get it in one place" time, but still.
Sigh.
08 March 2010
By Michael
Okay - so before I can automate (and I have plenty of ideas for that) I need to finish the deck-work. The design for the 2009 layout looked something like this:

2009 Layout (more or less)
Although the actual layout was somewhat different.
Currently, this is all on a 2x4' sheet of plywood with 1/4" rubber feet. To make room for the electronics and wiring underneath, I need to lift it up onto a base - but it also needs to be able to come off the base again for storage. (And "storage" means "in a protected spot where neither cats nor children nor spouses nor self will smash the landscaping".) The best idea I've been able to come up with is this:

Proposed Deck Work
27 January 2010
By Michael
So, by the end of 2009, the train layout was fundamentally complete but also fundamentally boring. So I decided to set two goals: (1) completely computerize the train layout while (2) spending as little money as possible.
Because I want to do this cheaply I decided to do in stages, one stage per year. Here are the goals for the 2010 stage:
- Finish the scenery.
- This means adding a few more buildings and an ice skating pond. I already have the kits for the buildings and a box of goop that promises to look just like water when it's done.
- Add realistic lighting to all the houses
26 January 2010
By Michael
When we were putting away the Christmas stuff from 2008, Mary found the remnants of my old N-gauge train set - the buildings, mostly, which hadn't really been set up in 20 years. She suggested that we build a "Christmas village" for the next year.
Well, Mary lost interest after a bit and I did too, until just before Christmas, when my work was closed for the week and I had nothing to do.
At that point, I decided to get busy and, with help from Mike, I pulled together a four foot long layout - just big enough to sit on the bricks in front of our fireplace. The buildings were all from my 20 year old layout, except for the "Cricket Shirt Factory" and one of the row homes. (Actually, all the row homes are 20 years old, I just never assembled one of them.)

Christmas 2009