The Controller


I finished building the controller in September 2018 although the programming will continue until the clock is finished. When the clock is first powered up, the controller will check that all relevant motors are set to their home positions. If all is well, the voice of the HAL computer in “2001: A Space Odyssey” will announce “I’m completely operational and all my circuits are functioning perfectly”! If anything goes wrong at any time or doesn’t happen when it should, the clock will sound an “ahooga” claxon noise and display an error code by flashing a light a certain number of times in the control box. If all is well, this light should just do a single flash every two seconds as a confidence indicator that the controller is working.


I have incorporated a Test Mode which allows me to energise any of the motors or play any of the audio files at will. The instructions for this are stuck to the inside of the enclosure door.


The main controller is an Arduino Mega 2560 controller, programmed from a laptop using the free Arduino application. The programming language is an Arduino variant of the C programming language. The source file I have simply called “Clock.ino”. I shan’t bore you with any of the details.


The controller and electronics.

Looking at the control panel in the picture above, you will see a number of switches and knobs. I shall detail the function of each from left to right for posterity.

  • Main Power switch in series with the Emergency Stop button on the front of the clock tower. This switch, unlike the Emergency Stop button, also cuts the output of the power supply so all power is removed instantly. If the Emergency Stop is pressed, the power supply may still have some capacity to power things for a second or so.

  • Volume simply controls the volume of the audio. The "ahooga" klaxon sound will always be at maximum volume though. There is a separate volume control on the bass speaker and two additional controls to vary the individual volumes of the treble speakers and bass speaker.

  • Activate controls:

    • Now. Press this to start the clock sequence after a short delay.

    • 1 Hour. Set to On (down) to start the clock sequence on the hour.

    • ½ Hour. Set this and the 1 Hour switch to On (down) to start the clock sequence every half hour.

    • ¼ Hour. Set all three switches to On (down) to start the clock sequence on every quarter of an hour.

  • Random Order. When this switch is down the sequence of events will be largely random to add extra fun.

  • Wind controls:

    • Limit switch. When this switch is on, certain events (as yet undetermined) will not occur due to the possibility of damage from high winds.

    • Limit LED lights when wind speed is too high for some events.

    • Speed. This knob sets the wind speed at which certain events will not occur; the more clockwise the knob, the higher the allowed wind speed.

Below is a circuit diagram of the entire clock – happy reading!

All I will say about the circuitry is that there are eight motors (top centre) that drive either forwards or backwards depending upon the state of the Global Direction relay. These all have limit switches to cut off the motor when they have reached the desired position. A current sense circuit indicates to the controller so it also “knows” when the motor has reached its position as the current will drop to zero. If the limit switch is not reached within a certain time, the power is cut to that motor and the ahooga klaxon sounds and the error LED flashes to indicate what has gone wrong. The remaining eight motors (lower right) are all single direction and run continuously on demand without the need for limit switches.

Four photo-sensors are mounted behind the clock face and detect a small reflector on the end of the minute hand. The signals from these are used to trigger the sequence of events at each quarter hour. I just hope a spider doesn’t take up residence here!

Wiring Diagram V2 A4.bmp

Electronics schematic and wiring diagram.