Justice Unlimited DRUID Gadget


The DRUID is the primary gadget in the Justice Unlimited game. There were many goals for the DRUID.

  1. tell teams when the game is over
  2. provide atmosphere for the game
  3. provide teams with information they need to solve puzzles
  4. be an integral part of certain puzzles
  5. keep "score"
  6. accept cofirm codes and give teams directions to cluesites
  7. accept arrival codes and give teams instructions on solving clues
  8. help teams find clues once they are at the cluesite


Not all the goals for the DRUID gadget were met.

The most glaring ommision was that the DRUID did not accept confirm codes (ie the solution to the clue) and did not give directions to the next cluesite. Instead teams had to call in and confirm with Game Control in order to find out their next destination.

This was due to a lack of planning on my part. The final version of the text including the Confirm and Arrival codes turned out to be about 40KBytes. Since we had about 3K of program, and only 32K of ROM memory total I decided to write a compressor/decompressor to fit all the text in. The compression/decompression software worked, but the decompression was slow and the changes caused instabilities in the software. I finally had to revert to an earlier version of the software which did not have many of the features that we wanted. At that point there was no time to shrink the messages to fit into 32K and we decided to just abandon the confirm codes and their messages (since the alternative was to not have a working gadget).


On the plus side we built 34 DRUIDS of which 27 actually worked, and during the game not one of them failed. There was one that broke open, but it was still working at the end of the game. I heard that one actually got run over by a van, but I never got that confirmed.

How it works

The DRUID is based on a Microchip PIC18F252 microcontroller. A microcontroller is basically a small computer on a chip, and they are often used for controlling car engines, appliances, etc. Below is the circuit diagram.

Here is the DRUID circuit schematic diagram

Click on image to enlarge
Here is the final layout of the DRUID circcuit board

Click on image to enlarge

Notice how the Transmitter circuit uses up the extra space around the Bat Bli nker.

You can also see the printed circuit board layout, the schematic diagram, the parts list, and read about creating the printed circuit boards.


The display is attached to J1. It is controlled with a 4 pin parallel port. The DB4-DB7 pins are the 4 bit data, RS determines whether the data goes to a control register or the data register, and E is toggled to tell the display that the data is valid and should be grabbed off the other pins. LEDA and LEDK are the power for the backlight.

Encoder & knob

The knob on the druid controls an optical rotary encoder. It uses a wheel with slits cut in it in conjunction with 2 LEDs and 2 phottransistors to tell when the encoder rotates. It works just like a computer mouse (a computer mouse has 2 rotary encoders, one for the X direction and one for the Y direction). The encoder uses a lot of power so I turn it off 1 second after its last movement and only check it once every 10th of a second. When the DRUID is turned off it only checks the encoder 3 times per second. The 2 signals from the 2 phototransistors are fed into the PIC pins 26 and 27.

When the encoder is clicked (pushed in) it connects pin 3 to pin 2. This pulls pin 3 low (0 volts), which pulls the PIC pin 28 low. PIC pin 28 is pulled high by a resistor inside the PIC when the button is not being pressed.


The PIC controls several circuits with PNP transistors

  • Q1 turns the encoder on and off
  • Q2 turns the display on and off
  • Q3 turns the backlight on and off
  • Q4 makes the speaker click
  • Q5 turns the short-range-sensor on and off


The short-range-sensor is an infra red light detector with a bandpass filter that looks for 40kHz IR pulses. The transmitter circuit emits pulses at 40kHz which the detector can see. When the detector is on and it sees a 40kHz IR signal it makes pin3 of the detector (and pin21 of the PIC) go low (0 volts). Otherwise that pin is high.

Printed Circuit Board

Creating the printed circuit board for the DRUID is described here. You can see the PCB diagram here.

PCB Construction

It took many people and several days to put together and soldcer all the DRUID circuit boards. You can read more about the pcb construction (and see more pictures) here.


I wrote the software for DRUID entirely in PIC18F252 assembly language. The main file, gadget.asm, includes all the other files.

The data (text of all the messages) starts in regular text files. The top level text file, gadget_strings.str includes all the others. I wrote a C program, ju_convert.c, which reads all the .str and .sstr files included (directly or indirectly) by gadget_strings.str and creates gstrings.inc, gfuncs.inc, gdefs.inc, and gschar.inc. These output files, which are PIC assembly code, are then assembled into the DRUID program.


The parts to make the DRUID cost us about $17 per DRUID, or $23 per team (we made extras for backup). You can see the parts list with suppliers and costs here


Development Page

For a complete list of files see the development page.

You can also download ju_gadget.tgz which contains all the original sourcecode. You can use this to build your own version of the gadget microcode!

Case Design

Corby, one of our playtesters, came up with the shape for the DRUID case. We manufactured them by Vacuum forming sheets of plastic into the top and bottom shape, and then glueing them together with the guts of the DRUID inside.

You can read all about our vacuum forming experiences.

Feedback and Questions

Click here to send feedback to Acorn! All questions, comments, suggestions, etc. are welcome!

Click here to see feedback that others have posted!

Click here to post your own comments on this website!

This file Copyright (C) 2004 by Nathan (Acorn) Pooley
Return to Justice Unlimited Homepage
Return to Gadgets of Justice Unlimited
Go to Acorn's personal webpage
Contact Acorn
See comments from others
Post your own comments