A couple of friends have encouraged me to post this, an extract from my blog stpetrock.blogspot.com. I hope some of you find it interesting.
Once upon a long time ago I was privileged to be a regular operator on Peter Denny's famous Buckingham model railway. My station for the best part of 37 years was Grandborough Junction, where one of my important jobs was to communicate with the signal box up the line at Quainton Road... except that there wasn't a Quainton Road on the model! To simulate this station, Peter built an amazing electro-mechanical computer that ran the timetable, controlled the clock, set points in the storage sidings and communicated with the 'up' block instrument at Grandborough.
Hitherto, the 'Quainton Road' storage sidings had been operated by Peter's youngest son Crispin, but sons don't stay at home for ever. The computer that replaced him was therefore known as the Automatic Crispin. Peter wrote an article about it for the Railway Modeller and I well remember the title - "Buckingham Goes AC".
It will therefore come as little surprise to friends and followers of the St Petrock saga that my station should also have a computer to simulate the signal box up the line. However, time and technology move on, so rather than building it from plywood and Meccano, I've used a Raspberry Pi single-board computer. In honour of its illustrious ancestry, though, it too is known as the Automatic Crispin.
Mine has a slightly simpler job to do as I don't have points on my storage sidings, but I did want it to display operational notes and the timetable for the St Petrock operator.
My first task was to learn how to instruct the Raspberry Pi to perform to my wishes, so I spent several weeks teaching myself Python, then writing a program. Here's a little bit of the code that checks the St Petrock bell button and trip rail near the storage sidings, and displays the 'hours' value. It would probably turn expert programmers to drink, but it works and I'm actually rather proud of it.
if (GPIO.input(20) == GPIO.HIGH):
if (GPIO.input(16) == GPIO.HIGH):
if (minute == 0):
rect = Rectangle(Point(377,10), Point(417,50))
txt = Text(Point(397,30),clockhr)
txt = Text(Point(407,30),clockhr)
The screen is an Elecrow 5 inch LCD display that plugs directly into the Raspberry Pi and sits on top of it. Here's a close-up. You'll see that the operator has a couple of instructions to carry out before train working No.2 can depart for Tregarrick North at 6.40am.
Now the M7 has been attached to its auto coaches and waits at platform 2. A light beneath the bell-push reminds the operator that the clock has stopped – trains at St Petrock never run late! After checking that the rotating storage sidings are set to road 5, the operator presses the bell once (call attention). The signalman at Sladesbridge responds with one beat on the bell.
The St Petrock signalman (or frequently signalwoman) sets the points, then pulls off signals 15 (platform starter) and 12 (advanced starter). The Gas Street crossing keeper also obediently opens the gates.
St Petrock now rings '3 pause 1' – 'Is line clear for a stopping passenger train?' Sladesbridge responds by turning the block instrument to 'LINE CLEAR' (green). The M7 then sets off with its train.
As the train passes the signal box, the signalman observes that it has a tail lamp (and therefore hasn't left its tail behind) and rings 2 bells (ding...ding... train entering section). Sladesbridge turns the block instrument to 'TRAIN ON LINE' (red).
As the train enters the storage sidings it crosses this trip point (two breaks in the nearside rail) that momentarily energise a relay, instructing the Automatic Crispin to ring '2 pause 1' (train out of section).
The clock restarts and the Gas Street crossing gates close once more. The sequence is complete.