Laser Tag m0dul

r0ket Laser Tag with Robert FitzsimonsThis project was inspired by an off-the-cuff comment during Maker Faire UK in March 2011. Over the weekend I was hanging out with members from a number of UK hackerspaces. One day a small group went off to play a game of Laser Tag. The paraphrased comment that suck in my mind after that was “wouldn’t it be cool to have our own Laser Tag system”.

Laser Tag is a multi player shooting game like paint ball. But instead of paint, pulses of infrared light are used to hit opponents. Commercial Laser Tag game systems are commonly known as Quasar in the UK/Ireland or Q-Zar worldwide. These systems can be found installed in bowling alleys or amusement arcades. DIY Laser Tag game systems also exist like the popular MilesTag system.

So when I heard that a hackable event badge called the r0ket was being developed for Chaos Camp 2011 by CCC Munich. I felt it would be a interesting platform to try and develop a DIY Laser Tag system with.

r0ket Laser Tag m0dul Camp PrototypeDuring camp I documented my progress on the camps wiki. Over the days and nights at camp I produced three prototype m0duls using strip board and a selection of components I brought with me. I wrote basic software to allow the r0ket and m0dul to be able to shot and be hit. The hardware selection was inspired by the MilesTag system and software should be compatible with the MilesTag II Data Protocol.

Directly after camp I didn’t make time to work on this project. But when I heard that a new batch of r0ket’s would be available at 28th Chaos Communication Congress (28c3) I started working on the project again.

For the next step in the this project I did some quick research on the capabilities of the micro controller on the r0ket. The MCU is a LPC1343 32-bit ARM Cortex-M3 with 32k of Flash and 8k of RAM from NXP. I was particularly interested in it’s pulse width modulation (PWM) support which could be used to modulate the IR pulses. In the camp version of the m0dule I used delay loops which was far from optimal. PWM on the LPC13xx chips is implemented using timers and match registers which can directly toggle the GPIO pins when the timer’s registers match programmable values.

Unfortunately none of the select pins on the m0dulebus of the r0ket connected to these PWM pins on the LPC1343, so I needed to come up with an alternative solution. My proposed solution was to use an external oscillator to generate the 56kHz carrier signal and have the r0ket just turn it on and off as needed to fire the pulses. After a bit of research I settled on using a 555 timer IC in astable mode.

r0ket Laser Tag m0dul v0.8 Prototype 2Logically the improved Laser Tag m0dul v0.8 Prototype consists of three separate boards. A control board connecting directly to the m0dulbus, an IR transmitter board housed inside the gun barrel, and one or more IR detector boards placed on the players body.

On the control board I used a TS555CN, a low power 555 CMOS timer from ST Microelectronics which would work with the 3.3 volts provided by the r0ket. A quad NAND gate is used to turn on and off the 555 and to modulate the signal from the active low outputs of the m0dulebus select pins. Sound output on the control board was to be provided by an ISD1740 voice recorder and playback chip from Nuvoton. The ISD1700 range of chips are inflexible for this project and hard to program, so I will replace it in a future revision (I will document my findings on the ISD1700 for the record in a future blog post). A speaker, trigger button and connection headers are also provided on the control board.

r0ket Laser Tag m0dul v0.8 Prototype IR TransmitterThe transmitter board has an IR LED, a TSAL6100 High Power IR Emitter from Vishay Semiconductors. To greatly improve the range of the IR LED over 500 milliamperes is past through it and controlled a TN0106 MOSFET from Supertex Inc. Two additional LED mounting spaces are provided these can be used to provide a muzzle flash effect and are also switched by the MOSFET. A separate set of four AA batteries in series are used to power the IR transmitter board.

The detector board has space for two TSOP34856 IR Receiver Module’s from Vishay Semiconductors to detect shot pulses. The TSOP34856 receiver has a pin diode and pre amplifier which can filter and demodulate 56kHz modulated signals. With an active low output, multiple TSOP348 receivers can be connected one MCU pin. A MCU controlled LED is also provided to allow a visual indication of a successful hit.

r0ket Laser Tag m0dul v0.8 PCBThe physical arrangement of a tagger has the IR LED placed at the focal-point of a lens, Leif Bennett has a good page on choosing a Lens. I went with an acrylic plano-convex lens with a 40mm diameter and a 180mm focal length, a OPL8A from GreenWeld. This mounts nicely on a regular 40mm diameter white plastic waste pipe available here in Ireland. By cutting suitable slots in the waste pipe and shaping the PCB I was able to slot them together forming a rigid connection and at the same time mount the LED at the focal-point of the lens. I left extra board in the PCB layout which could be used to form a basic handle after shaping.

In order to have boards available for congress I had to get the boards fabricated in mid December before I had fully tested the design. In the mean time I etched a couple of boards myself, these boards proved the schematic and layout worked. But I did make some minor changes to make self etched boards easier to work with particularly because of the lack of through plated holes/vias.

At the last minute while testing the prototype with an oscilloscope and frequency counter I noticed that the frequency of the 555 didn’t match with what I had calculated, about 42kHz instead of 56kHz. I had to search through my selection of resistors to find a suitable combinations of values which would generate the correct frequency.

During congress I assembled a second prototype and updated the firmware to work with the hardware changes. In tests inside the Berliner Congress Center (BCC) we found that the hits could be registered over about 30 meters, in a test we tried outside the hits worked over 100 meters. On reflection these long range tests worked too well and probably show that the optical arrangement needs to be tuned so the beam spot is much smaller.

A pdf of the schematic can be downloaded here:
Laser Tag r0ket m0dul v0.8 Schematic

The TODO list includes documenting the board assembly; and releasing the schematic, layout and source code.

Chaos Communication Camp 2011

Next week I’m going to Chaos Communication Camp which takes place near Berlin. Every four years the camp provides an exciting opportunity to hang out and work on projects, attend various talks and socialise.

At the camp I’m planning to spend a lot of time in the Hx2 Hardware Hacking Area. I had originally signed up to give a hands on workshop on Introduction to PCB Etching, but I can’t bring the chemicals on the plane. So I’ve come up with another project for a workshop.

The project for the workshop will be to create a custom m0dul for the r0ket badge which can be used to form a Laser Tag system. This m0dul will be designed from scratch including hardware and software starting this weekend and during the camp, though inspiration for parts has come from DIY discussions on the Laser Tag Forums. Materials cost will be approximately €50.

In addition I’ll be bringing ten soldering sets for use in the Hardware Hacking Area, Mini Mood Light v1 Kit, I Can Solder Badge v1 Kit and other bits & bobs.

Just hopping all the parts arrive in time.

MindField

This weekend April 29th to May 1st I’ll be helping to run a hardware hacking area in the Hackerspace Tent at MindField – International Festival of Ideas. Taking place inside Merron Square park in Dublin’s city centre MindField offers a diverse programme of talks, debates and workshops covering various topics on culture, technology, politics and inspiration.

Members from Irelands hackerspaces and makerspaces have been invited to build a temporary hackerspace in the park over the weekend. Giving visitors the opportunity to experience the possibilities of hacker and maker culture in Ireland. We’ll be showing off existing projects, teaching new skills through activities and workshops, and working on new projects with visitors and the resources we’re bringing over the weekend.

In MindField Hackerspace I’ll be helping to run a hardware hacking area teaching people to solder repair and re-propose, and giving a free Introduction to Arduino Workshop. I’ll also be talking part in the Hack the Planet! panel discussion on hackerspaces.

In the hardware hacking area I’ll be selling some of my kits including the Mini Mood Light v1, Dual LED Matrix Display and other LED based displays. All along with Arduino Uno’s, TI LanuchPad’s, electroluminescent wire and hundreds of LEDs.

One very special item I’ll have for sale is a basic I Can Solder kit which is in the form of a badge. The I Can Solder badge was inspired by the Electronic Merit Badge from Make:. Which I had the pleasure of using to help teach hundreds of kids and adults to solder during the Maker Faire UK in March in New Castle, England.

LED Matrix Display

Last Sunday I gave a workshop in TOG as part of it’s Engineers Week 2011 activities. We spent the day assembling a 8×8 Red/Green LED Matrix Display circuit which I designed in strip board.

The circuit forms an interface between a micro controller and a 8 by 8 Dual Colour Common Anode LED Module. This type of module has two LEDs per pixel, each row has 8 pixels, with 8 rows. The anodes of each LED in a row are connected, with 16 columns formed by connecting together the cathode of an LED from each row.

A high side switch is needed to turn on/off a row and must be able to source approximately 240 milliamperes (16 multiplied by 15 milliamperes). A low side switch is needed to turn on/off a column, but only one LED is on per column so it only needs to sink 15 milliamperes.

For the high side switching I used a TD62783APG 8 Channel High-Voltage Source Driver from Toshiba Semiconductor. It’s very important that only one output from the TD62783 is on at any one time so I used a 74HC238 3-to-8 Decoder from NXP to control the row selection. For the low side switching we used two 74HC595 8-bit Shift Registers from NXP.

Only one row of LEDs is on at a time, the display uses persistence of vision to give the illusion that all the LEDs are active at one time.

The basic operation for displaying a single frame is. The data for a row is shifted into shift registers one bit at a time, the shift register output is turned off (OE), the row is selected on the decoder, the shift register data is loaded into the output registers (LE) and then the shift register output is turned on. These steps are repeated for each additional row of data. All the steps are repeated indefinitely until the next frame of data is to be displayed.

The circuit was designed around the Arduino micro controller but should work with other micro controllers. The connections are shown in the image. The left hand side of the display is the row select pins the central pins are for power and ground, with the columns connected to serial peripheral interface (SPI) pins on the Arduino on the right.

Dual 8×8 Matrix v0.1 Schematic

I’ll do a follow-up blog post with the source code and a Java program I’ve written to create animations.