Hardware met Software on the road to Changtse. Software said: ``You are Yin and I am Yang. If we travel together we will become famous and earn vast sums of money.'' And so they set forth together, thinking to conquer the world.
Presently they met Firmware, who was dressed in tattered rags and hobbled along propped on a thorny stick. Firmware said to them: ``The Tao lies beyond Yin and Yang. It is silent and still as a pool of water. It does not seek fame, therefore nobody knows its presence. It does not seek fortune, for it is complete within itself. It exists beyond space and time.''
Software and Hardware, ashamed, returned to their homes.
-- The Tao of Programming, 8.4
At the heart of the Scare-O-Matic is a distributed computer system. The graphical user interface and event server processes both run on a Pentium-class Windows machine; the device control processes run on embedded microcontrollers which are part of the Alpha Systems A-Bus.
Device control
There are currently two Scare-O-Matic panels, each with its own configuration of controllable devices. Each panel has a power supply, an A-Bus motherboard, and a number of input and output connectors.
Each A-Bus motherboard contains one microcontroller, which communicates to the event server through an RS-232 serial cable; and a variety of special-purpose interface cards. The interface cards include:
RE-140 Relay Board
LI-157 Latched Input Board
SC-149 Smart Stepper Controller
XT-159 X-10 Interface Board
The microcontrollers are on A-Bus SP-127 Boards. The SP-127 has an 11MHz 80C31 controller, and comes with MCS-52 BASIC in ROM. The SP-127 boards are each equipped with 8k of RAM and 8k of EEPROM.
Software
Event server
The server is aware of each panel, and serves as a central point for communication between the panels. Each panel is connected to the server's host computer through an RS-232 serial connection. The server also accepts connection requests from clients, and sets up sessions through which the client GUIs may operate the sequences controlled by the server.
User interface
Two different Graphical User Interfaces (GUIs) allow humans at a computer console to make requests of the event server.
A Server GUI provides control over all the systems's functions. In addition to operating the sequences controlled by each panel, the Server GUI offers its user device-level control over the embedded processors on each Scare-O-Matic panel. This GUI must be run on the same computer with the serial connections to the panels.
A Client GUI can be run on any computer connected to the Scare-O-Matic server through a TCP/IP network. The client provides control over the sequences controlled by each panel, but does not provide device-level control. Multiple clients can be open simultaneously on any number of networked computers.
Embedded control
Each panel operates one or more event sequences. These sequences are defined in relation to a starting point in time, and may consist of any number of events (e.g., strobes 1,3, and 4 flash once, spolight 2 on, start motor sequence "PORCH", etc.) that are scheduled to occur at given times after the starting point. The software employs a simple round-robin EDF event scheduler. All the embedded control software is written in MCS-52 BASIC, supplied by Intel to run on their 11MHz 30C51 controller.
Hardware
Sound sources
The Scare-O-Matic 1000, deployed in 1994, used a pair of cassette decks as sound sources. These decks have been modified so that their drive motor circuits can be opened and closed by one of the Scare-O-Matic controllers. This allows for precise control of the position of the tape (once it has been completely rewound), and it allows the system to start replay of a stereo sound track at a well-controlled time.
This design required a lot of attention from the operator to keep it running. Each time a guest arrives, the operator must press a button on the GUI -- which starts the tape motor running -- then wait for the sound track to finish, press the tape deck rewind button, wait for the deck to rewind, press another button on the GUI to turn the motor circuit off, press the tape deck play button, press a GUI button to cue the tape to its start position, and wait until the software timer turns off the relay -- all before starting the sequence over again! After about the 50th time through on Halloween night, this procedure begins to lose its charm.
Operating ordinary cassette decks by remote control presents a special difficulty -- pressing the play button does more than merely close a circuit. This physical action also moves the tape heads into place next to the tape. This means that I needed some mechanism for physically pressing the buttons under software control.
In 1996 I introduced the Scare-O-Matic 3000, which had solenoid-actuated piano hammers operating the play and rewind buttons on the two tape decks (The piano hammers were left over after a friend had his piano reconditioned). The solenoids that set these wooden fingers in motion are powered by a 24V circuit and switched by the A-Bus RE-140 relay card. This model was much easier to operate -- it only required the user to press a single button to start each sequence. The Scare-O-Matic computer would then start the appropriate sound source, turn the lights on and off in sync with the noises, and reset the sound source to its ready position when the sequence was over.
Still, I had to vigilantly watch out the front window all night for visitors, and this interfered with my ability to properly enjoy the other aspects of the holiday. I resolved that the system should be even more self-operating, and start its sequences automatically by detecting visitors as they arrived. To accomplish this I added four infrared photosensors that monitor the sidewalks and driveway.
The Scare-O-Matic system controls a total of three stereo sound sources:
Scare-O-Matic panel 1 can independently trigger six different strobe lights, one flash at a time. The strobes really get a workout during the Bad Weather sequence!
Panel 1 also includes an X-10 controller, which is used to switch various spotlights on and off.
Panel 2 has two heavy duty relays for switching AC devices. These relays are activated by the lighter-duty relays on a standard RE-140 card. One of these switched circuits is used to power a Haunt Master Plus. The Haunt Master powers a bank of red incandescent lights that are used during Garage O' the Damned.
Sensors
The Scare-O-Matic 4000, rolled out in 1997, featured three infrared beam sensors -- the kind you trip when you walk through the front door of many stores. The sensors let the Scare-O-Matic computer know when guests are at various locations, so it can start the appropriate sequences.
1n 1998 I added a fourth photosensor to monitor the sidewalk right next to the house. This sensor triggers the Spectre sequence just as guests are about to step onto the porch.