Wednesday, 27 March 2013

Sparkfun serial LED display bracket

Visit Tagbits to see the full range of tagger products described in this blog.

The Milestag UMT lasertag system uses Sparkfun serial LED displays to show health, rounds etc. They are nice units but difficult to mount so I have designed a bracket to allow them to be neatly fitted and protected:

This has an integral 2mm acrylic sheet to protect the display, and a 2mm flange allows some leeway when making the cut out for it.

A small bracket is screwed in place at the back to hold the display in place, this also has a cut out to provide access to the display terminals:

It is available at the Tagbits shop here.

Sunday, 24 March 2013

Clocking on

Visit Tagbits to see the full range of tagger products described in this blog.

I've been trying to get the Sparkfun serial LED display working with my Milestag UMT lasertag software. This is used to display clips, rounds, health etc. But I couldn't get it working.

The display can accept commands via either a standard serial port or a SPI port. I'm using SPI as with all the other interrupts going off in the software, I cannot guarantee bit timings so synchronous communications make more sense.

I'd already written a software SPI routine for the ISD1790 sound playback chip, so I went ahead and used this routine to access the display.
I could not get it to work, so I resorted to sticking my logic analyser on it:

From this I can see that the first byte sent to the display is 0x78 which is a blank segment. But it is being sent most significant bit first. This is normal for SPI, but the ISD1790 expects least significant bit first. I'd written the ISD SPI routine to spec.But had forgotten the none standard bit order.

I implemented a second routine to send MSB first and hey presto:

Tuesday, 19 March 2013

Milestag UMT software

Visit Tagbits to see the full range of tagger products described in this blog.

Update: Code finished here

I'm making good progress with my own version of the Milestag UMT software. Since getting the IR receive routine working, I can now control the ISD1790 audio playback chip and have implemented the IR clone and system message processing.

I've also implemented most of the game code. This is implemented as a state machine, with each gun mode having its own state. e.g. InGame, Dead, Re-loading, Hit, Game Over etc.

The interrupt driven IR receive routine passes a packet event (as a flag) to the foreground task, which then takes the appropriate action depending upon the current game state.

I've also got the IR transmit routine working. The PIC generates a 600uS periodic interrupt and implements (yet another) state machine to allow it to track which part of the IR signal it is currently sending. The IR packet consists of a 2.4mS header followed by one's of 1200uS and zeros of 600uS. Each bit has an inter bit delay of 600uS.

Here is a snapshot of the start of a packet:

The long header can be seen at the LHS of the display in between the two vertical lines. Following are a series of long and short pulses for 1's and zeros.

Here is a full packet sending a gun ID of 20 (0x14) and a team ID of 1, and shot power of 2 (0x12). Data is transmitted least significant bit first.
The vertical lines on the show show the start bit (bit 0) of each part of the transmission. The gun ID is 8 bits long and the shot power/team ID is only 6 bits long. See the full Milestag IR protocol documentation here.

All that remains is to modulate the IR signal to 56kHz using the PICs on board PWM.

Thursday, 7 March 2013


The first prints I did on my Mendel90 were from clear PLA. These came out really well. However, I changed to fire engine red PLA from Faberdashery and I just could not get it to stick to the glass bed.

In the pub with nophead on Friday lunch and he suggested I increase the hot end temperature. This didn't help, even when I also raised the bed temperature.

I've used this PLA on my other printer with no problems, so I decided to try replacing the glass bed. I bought some 0.9mm aluminium sheet from ClickMetal ordered to match the heated bed dimensions. I then covered this with kapton tape. The next print I did the PLA stuck well and completed as expected:

Another reason for me taking this approach is that I regularly print parts in ABS that have a large surface area in contact with the bed. I use kapton tape as these parts tend to lift from the bed, and ABS sticks very well to kapton. The problem I have is that it sticks so well the only way to get the parts off is to flex the bed. Obviously it is easier to flex a thin metal sheet than one of glass.

Here is my Mendel90 doing its first ABS print: