Previous Posts

Sep 2013 23

Addressing many LEDs with a single Arduino

A fun little side project of mine is Arduino C/MRI, a library that lets you easily connect your Arduino projects up to the JMRI layout control software, by pretending to be a piece of C/MRI hardware. Hence the name.

A common problem when using Arduino C/MRI is dealing with lots of inputs and outputs. As an example, lets wire up a simple non-CTC crossing loop here in New Zealand. It is about as simple as you can get:

Each end consists of:

A turnout. We'll need 1 digital output to drive that. A route indication signal on each leg of the turnout. We'll need an LED for red, and one for green (technically it'd be blue here in NZ). That's 3 pairs of outputs = 6 more. A push button ...
Read full post...
Sep 2013 22

Driving many outputs with Arduino C/MRI

A fun little side project of mine is Arduino C/MRI, a library that lets you easily connect your Arduino projects up to the JMRI layout control software, by pretending to be a piece of C/MRI hardware. Hence the name.

Hello World

The basic "hello world" example is fairly straightforward, wiring up a JMRI light to a physical LED on the Arduino board.

#include <cmri.h> CMRI cmri; void setup() { Serial.begin(9600); // make sure this matches your speed set in JMRI pinMode(13, OUTPUT); } void loop() { // 1: main processing node of cmri library cmri.process(); // 2: update output. Reads bit 0 and sets the LED to this digitalWrite(13, cmri.get_bit(0)); }

It's easy enough to extend this example to handle 5, 10, even 15 outputs... if you have an Arduino Mega, you could have a LED on...

Read full post...
Sep 2013 20

Making snow

To prepare my module for snow I started the slow process of building up a base for the snow. To start with I wanted the snow nice and level with the tracks, as per the original inspiration photo. I grabbed the nearest caulking gun and squirted out big fat beads along the track, then with a putty knife and some water smoothed it off nice and level.

To simulate piles of plowed snow, I crushed up some dried plaster and embedded it in the caulk while still soft:

To disguise these mounds I mixed up some sloppy plaster and drizzled it over the top. Much sanding, filling, more sanding, painting, smoothing, sanding followed. At the same time, I experimented with snow materials:

Woodland Scen...
Read full post...
Sep 2013 20

Illuminating my first city building

In between making points, I've been playing with some of my recently acquired buildings. I decided to tackle a small one initially to get the feel for things. First step was to dismantle the building, something Kato have made fairly easy. I dug out some LED strip tape, which unfortunately had green LEDs. It was a simple enough job however to desolder them and solder on some tiny replacement white LEDs.

While at it, I put some blue LEDs into the end spot so that the stairwell would be a different colour. Then I drilled holes and made space for the lights and mounted a row for each floor. Some more holes at the back to run the wires down.

Read full post...
Sep 2013 15

City scene takes shape

It's official: the long-rumoured, oft-hinted, city scene has finally started to take shape.

Trackwork

The Utrainian Workshops have been busy churning out points for the complicated yard ladder trackwork; that is, the tracks that will route trains from two main lines onto one of eight platform lines. To further complicate matters, the station trackwork is all located on a curve to maximise the available space for the station platforms.

For the first set of points, I drew out the plan full size and used pieces of flexi-track and a length of metal to trace out the curves and track centrelines. I then traced these onto other bits of paper and painstakingly built up the points over these rough outlines.

Read full post...
Sep 2013 12

Windy Day

Windy day here in Utrainia, with a very strong winds making their way through the country. Unfortunately Sod's law was in full force today with numerous delays affecting all trains. First of all the power went out for 7 hours, taking with it the signals. Trains had to tip-toe over road crossings and radio through the paperwork for every signal. Slow to say the least! Then a loco break down meant one loco too few to run the morning services, and no time for a replacement to arrive either. As if that wasn't bad enough, the morning Shinkansen service had a rather nasty surprise when it rounded a corner to find a very large tree, split clean down the middle and all over the track!

That was the end of any kind of regular service for the rest of the day. Busses were brought in to ferry people to work, however then it was discovered that Utrainia doesn't own any busses, and so everyone got a day off work instead. Everyone except for the hard working Utrainia crews, who had to get ...

Read full post...