Sunday 14 August 2011

Italian Job in Toytown

The XYL's father is something of a model railway enthusiast - the photo below reveals the ironic understatement...


During our last visit (in which I took the photo), he asked me to make a traffic light controller - no doubt in an attempt to bring order to the anarchic road-rage one otherwise meets at a 1:76 scale crossroads.

Of course, a traffic light controller is a pretty trivial problem in Finite State Machines 101, so I quickly whipped up a system based on a PIC16F676, with on-board LEDs to monitor progress and open collector outputs to switch on and off the "grain-of-wheat" bulbs which the Toytown traffic engineers have used.

Here's the system under prototyping, connected to my PICKit2...

and here's the translation to a PCB...


All pretty dull. So I decided to fool around a little...

Readers will remember the havoc that can be wrought by messing with traffic lights, as demonstrated in the movie classic "The Italian Job".


I decided it would be fun to introduce an occasional state of confusion in the traffic signals on my father-in-law's railroad - so I programmed in a display which would look good on the Golden Mile...




(Interesting how the video - captured by my iPhone in low light conditions - is incapable of resolving the colour of the bright monitor LEDs)

The traffic light chaos only kicks off every 200 complete cycles, so you have to be watching the lights (or driving past at just the wrong moment in a 1:76 scale car) to see it.

Let's see if he notices!

...-.- de m0xpd

1 comment: