Orac - The key

What key can't open a lock? An Orac key.... unless the lock is computer controlled, in which case activating Orac is a good way to get it opened. The heavy mechanical lock connected to a nuclear charge on a dead-man countdown timer between the 7 and the only way off planet Xeon (Blakes 7, Series D, Episode 2 - "Power") was built to stop just this sort of thing.

Orac has a key. This is a small box that is inserted into a slot in its top to activate it. I am using a similar small acrylic box with an embedded magnet and a reed switch in the main case to provide this effect.

Closeup of my Orac Key

(Technically, Orac isn't 'off' when the key is abscent - just out of communication mode*. It can also deactivate comms mode itself even if the key is present. At one point, Orac is 'posessed' by an inter-dimensional being using Orac's tele-space chanels and the key is lethally electrified to stop deactivation. I am unlikely to add this feature, or the small explosive charge Avon added to Orac in case it happened again).

* I get the feeling, that removing the key was originally meant to be 'really' off, but the needs of plot intervened. Just how 'off' Orac is without the key tends to vary from episode to episode.

For the moment I am going to leave my original key as-is: the epoxy is still holding on fairly strongly. I might notch one corner with a file and fill in the corresponding corner on the "socket" with a triangle of acrylic so the key can only be inserted the correct way around.


The circuit for the key is a standard push-button circuit:Key circuit

R1 pulls the digital input to 0V when the switch is open. When the switch is closed, the 5V supply pulls the digital input up. The switch itself is a magnetic reed switch. It is two small strips of metal in a glass tube that make contact when a magnet is close by, the magnet being in the bottom of Orac's key. Magnetic reed switches are commonly used in security systems to detect when a window or door has been opened - the switch on the frame and the magnet on the window/door. (WARNING: without the resistor, closing the switch would short the 5V rail to GND, at best depriving the Arduino and everything else in the circuit of sufficient power to function, and at worst damaging your power supply!)

The code for reading the key's reed switch is just the standard digitalRead(pin) command.


Next: Other Junk