## What you initially see

The Bat Blinker clue is a small (1 inch by 1.5 inch) circuit board with a hole at the top containing:

• 5 red LED's (which are clear white when turned off) all on one side
• 2 green LED's (one on each side)
• a black pushbutton switch (S1)
• an accelerometer switch which consists of a blob of lead on the end of a spring next to a copper plate (S2)
• some batteries, a chip, some resistors, and other stuff

The circuit board also has a construction paper "arm", or "tail" hanging off of one side.

When you press the button (S1) the green LED's blink a number of times, and then the red LEDs begin to blink very rapidly. Each press of the button (S1) results in a different number of green blinks followed by the rapid red blinks. While the red LEDs are blinking the green LED also blinks several times per second.

## How to solve the clue

Attach a string (use the one from the Supply Box earlier in the game - it has a nice swivel on it to keep the string from tangling) to the hole at the top of the circuit board. Then swing the circuit board around in a vertical circle (horizontal axis) with a radius of about 2-3 feet. You will notice that the red LEDs are now spelling out a message as they fly through the air.

Every time the button (S1) is pressed a different number of green LED blinks occur and a different message appears on the red LEDs. The different messages tell a story:

1. (1 green) "What will you do now, Batman?" asked the Riddler as the dynamic duo dangled over the hostages.
2. (9 green) "If you stay still, one of the hostages gets showered!"
3. (3 green) "And the wetter they get, the more they'll attract the rabid rats!"
4. (5 green) "If you move, all the hostages drop into the Bay!" The Riddler laughed and ran off.
5. (12 green) "Holy bursting bladders, Batman!" Robin cried. "I can't hold it any more! I have to pee!"
6. (5 green) "You've got to hold it a little longer, Robin!" said Batman as he tapped his utility belt.
7. (4 green) "Once this solvent dries, the rope will be brittle enough for you to break free!"

To solve the puzzle use the green blink number to count words into the sentance. The words that you get are:
"What gets wetter the more it dries"

The solution to the puzzle is the solution to this riddle: "a towel"

## Tips for making it easier to read the text

First of all, make sure the Bat Blinker is *dry* (as a couple of teams found out this is pretty important).

As the blinker spins the accelerometer (the spring & copper plate) tells the Bat Blinker that it is still moving. Soon after the Bat Blinker stops moving it shuts itself off to save power. If it detects movement while turned off it will wake up again and continue blinking the same message.

The accelerometer also synchronizes the message. If the accelerometer makes contact at the same point in the swing each time then the message will start in the same place and the message will appear stable and readable. A good way to ensure that the accelerometer makes contact at the same point is to slightly jerk the string at the same point in the swing by having it slip off your finger as it swings around.

If the accelerometer is broken then another way to synchronize it is to adjust how fast you are swinging the string so that the green LED lights up in the same place each revolution. The green LEDs always light up for a brief period just prior to the start of the message. This is why the green LED is on both sides of the board - so the person swinging the string can see it too. It works best if the people reading the message stand several feet away from the person swinging the string. It also helps a lot if it is very dark.

## How it works

The red LEDs blink on and off in a pattern determined by the microcontroller (the chip). The blinks are timed so that the light is on when the LED is in a spot where there should be a dot to create a letter. Of course it only works if the board is swung at about the right speed.

The accelerometer just tells the microcontroller when to start the message. If the accelerometer has made contact at anytime in the last few revolutions then after the message is complete the microcontroller waits before re-starting the message until it again sees the accelerometer contact. This way if the accalerometer contacts at the same point each revolution then the message will also start at that same point. If the accelerometer does not contact for a while then the microcontroller assumes it will not contact and stops waiting.

### Circuit

The Bat Blinker uses a simple circuit employing a Microchip PIC16F630 microcontroller. The LEDs are driven directly by the PIC. The feedback to pin 12 from the green LED is for measuring the voltage of the battery. When the battery is new I turn the LEDs on and off very quickly to save power. When the battery voltage drops I turn the LEDs on longer and off shorter. These on-offs are very fast (much faster than the red LED blinks that you see), so they are not visible to humans. This way less current flows through the LEDs when the battery is new (which keeps the LEDs from burning out), yet when the battery dies down the on-time is increased so the average current stays about the same and the LED's do not get dimmer (or at least not as fast as they would otherwise).

#### and here is the printed circuit diagram

In the PCB diagram:

• Red = traces on top
• Black = componants on top
• Grey = componants on the bottom
• Other colors = traces on the bottom

See my description of the Justice Unlimited PCB design process if you are interested.

The J1 jumper is the 5 holes under the chip on the circuit board. It is a programming header. If you want to, you can reprogram the bat blinker with your own messages.

2. modify the spinwords.c program with your own messages
3. Obtain the ICP (in circuit programming) hardware from Microchip/Digikey.
4. Remove the batteries from the Bat Blinker
5. Cut 2 jumpers just under the text "Bat Blinker" in the upper right hand corner of the board on the side with the red LEDs.
6. Program the new version of the software into your board
7. re-connect the jumpers that you cut in step 5.

### Software

The software for the gadget is written in PIC assembly language. Part of it is written by a C program that I wrote, spinwords.c, which generates the character set and forms the sentances that we wanted. The rest is hand coded. The program is written to work with both the pic16F628 (which I used for development), the pic16F84 (which Cary and I did our original design around), and the pic16F630 (which is used in the final version).

• spinwords.c - takes the story and a description of the shape of each character and generates swords.inc which is PIC assembly code to draw the sentances.
• swords.inc - generated by spinwords.c
• game_2.asm - this is pic assembly language which sets up the chip, handles interrupts, decides when to sleep, etc
• volt.c - a program used to figure out how to detect battery voltages
• volt2.c - another version of volt.c

## Cost

The parts to make the Bat Blinker cost us about \$6 per clue, or \$8.20 per team (we made extras for backup). You can see the parts list with suppliers and costs here

.

### Development Page

For other information visit the Bat Blinker Development Page which has links to all files used in creating the Bat Blinker as well as a link to a zip file containing all the files you need to program a Bat Blinker of your own!

## 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!