Control Software
The Route Setting Software on Rowandale, is executed by a Raspberry Pi 3B
single-board computer. This interprets presses on the route push-buttons on
the control panel and sends the route number to a Pololu Servo Controller
located on the layout. The software is written in Python language.
The route number is sent as 5 data bits via an I2C data bus to an I2C I/O
board local to the servo controller. This then sets the corresponding bits to
inputs on the Pololu Servo Controller, which in turn sets the required points.
The points are operated by servo motors connected to a 24 channel
Pololu Mini Maestro Servo Controller. The arm of the servo motors also
operate micro-switches to set the polarity of the frogs.
An I2C I/O board adjacent to the Servo Controller, gets a route number
from the control panel, via the I2C data bus, and sets the corresponding 5
data input bits on the Pololu board, these bits are then decoded to give the
route number. The Pololu is in itself a fully programmable single board
computer. The various routes are defined within the Pololu software as
required servo position settings for each point that lies on the route.
The position settings for each point are individually defined so that each can
be tuned to exactly throw the correct amount for the individual point.
The current listing of the software can be viewed here:
as a plain text file to change it to a Python file
just alter the .txt file type to .py
The Python file is best displayed using the free text editor Geany, which has
syntax highlighting and many other code development features.
Geany can be downloaded from www.geany.org
The current listing of the Pololu script can be viewed or downloaded here:
as a plain text file.
The Pololu is programmed by a script which is interpreted during running.
The listing appears rather odd at first as it uses Reverse Polish Notation, in which
operators follow the operands. e.g. 3 4 + would result in the answer 7.
This form of notation is very efficient, for the computer, as it mimics how
calculations are performed inside the processor, in that numbers are pushed onto
a stack and then operated on.
The Turntable on Rowandale is driven by a small stepper motor, controlled is
by a Raspberry Pi-Zero single-board computer; which is stripped down version
of the 3B.
The Pi-Zero gets a turn command commands from an I2C I/O board on the
layout and then executes the programmed number of steps to exactly rotate
the turntable, with acceleration & deceleration. It also responds to local nudge
switches in case the zero position should need to be reset; would only be
required if power was lost during a rotation.
The outputs from the Pi-Z are buffered and sent to a cheap stepper motor
driver board, type StepStick A4988.
The current listing of the software can be viewed here:
as a plain text file to change it to a Python file
just alter the .txt file type to .py