A model town in Wimborne has a separate model railway attraction. When it came time to upgrade parts of it, a Raspberry Pi was the natural choice
In the beautiful town of Wimborne, very close to where The MagPi is made, is a superb model town that has existed for almost 70 years. It’s a lovely tourist spot and a wonderful attraction, of a type that’s fairly rare these days. As part of the model town, there’s also a great little model railway. During the off season just past, the lights that make up part of this miniature railway were upgraded using a Raspberry Pi, by a team led by Terry Coles, an engineering manager who helps out at Wimborne Model Town.
“The fundamental requirement for the lighting is simple,” Terry tells us. “Simulate daylight, dim the lighting to simulate night-time, and then bring on lights in the trackside houses and streets. However, these were not the difficult goals; a bit more work was necessary because the finished system needed to be reliable, easy to use and maintain, and capable of being upgraded readily in the future.”
After a lot of discussion, the team settled on a Raspberry Pi Zero for the task: “This allowed for future upgrades and was considered more accessible to the average volunteer than, say, using an Arduino.”
The system isn’t just made up of a Raspberry Pi, though: there’s much more to it. The lights being used weren’t just a few LEDs stuck to a breadboard, as Terry explains:
“The WiringPi2 library was used to allow programming of a pulse width modulation (PWM) signal. This dims and brightens a 48W LED strip on GPIO pin 18 (the hardware PWM pin) to simulate the ‘Day’ lights. A MOSFET driver was used to carry the current needed. The lighting in the houses and elsewhere was switched by four other GPIO pins via a relay board.”