Introduction: The Asteroid Belt

About: Just a guy really. Like building stuff and like to help other people build stuff too. If you really need to know, am male in my 30's and live close to Brisbane in Queensland, Australia.

Lets start off with a FAQ What is The Asteroid Belt?

It's a belt.
It's a video game.
It's ridiculously awesome.

Why is it made out of brass?

'Cause I am so steam-punk-pirate-zombie and brass is the shizzle.

Seriously though, I don't have a 3D printer, I don't have a laser cutter, I don't even have a 7 axis CNC VMC. I don't have a lot of options to make a case for something that looks cool.

What I do have is an Etchinator . As the saying goes “To a 10 year old child with a hammer, everything looks like a nail”

Will it help me pick up {chicks|twinks|bears}?

Unlike many of the belts shown around here that include an "arc reactor", The Asteroid Belt will not give you any super human powers. If you where unable to lift any of the above items before donning it, you will still be unable to pick them up now.

It costs more to build than a RasPi and only runs at 16Mhz. Why did you bother?

If you don't understand already there is little I can do to help you.

Realistically though, the AVR is enough to play some retro games and pulls a few mA. This will let the unit run for 10 to 20 hours depending on how high you set the backlight current. A RasPi would run for about 2 hours

Can I make one myself?

I am sure you could. All the files you need to do so are here. There are bitmaps of the mask for the brass case. There are gerbers for the PCB (step 3), a Bill of Materials (step 4) and there is a ZIP file with the source (step 8) and HEX of the game "Rock Blaster"

If you are planning on building one yourself it would be nice if you could send me a message so I know who is having a go.

Can you make one for me?

At this stage that would be a big negative. There are a lot of Instructables out there that seem like thinly veiled adds for a Kickstarter campaign. This is not one of them. It takes a lot of time to make one of these and it is unlikely there would ever be enough interest to "tool up" to mass produce them.

Never say never though. If 1000 people all moan at me at once I could be persuaded. Don't hold your breath though.

How much will it cost me to make my own?

The BOM in step 3 lists everything needed. The prices are what I pay here in Australia to get parts and do not include shipping. So obviously your mileage will vary. I would budget somewhere between 70 to 100 USD

Will it play any other games apart from "Rock Blaster"?

At this stage no.

In the future though, I am planing on making at least three more games for the belt -

  • A puzzle game - Quad-tris
  • A platform scroller - Awesome Antonio Cousins
  • A side scroll shooter - AVR Type (almost completed the engine)

Is there a published API if I want to write my own games?

Calling it an API would be glorifying it a bit much. There is standard calls for sprites, vectors, scrolling and sound though. If you do want to try write your own game then I am more than willing to help you along.

You said "sound". Is there a speaker hidden somewhere I missed?

That's very observant of you. There is actually no speaker yet. You will see there is a "speaker out" on the schematic. In fact all the other hardware and software for sound is present. I have so far been unable to find a speaker I like. When I do The Asteroid Belt will be able to beep and bong with the best of them.

OK - Now onto the build

Step 1: Doing Three Tricks for Speed

OK. I lied about getting onto the build.

You probably need to be told WHY you are doing step one of the build.

Well it's all about speed and smoothness.

While I am telling you the "why" about the first step, I may as well sneak in the other two speed up tricks. Just to keep them all in the same place.

Some of you out there may have hooked an LCD up to an Arduino and tried to write a video game. You will have found that the screen tore and you could not update the screen very fast. I have had to do three tricks/hacks to solve these problems and get a satisfying video game experience.

1, Frame Marker on the LCD

I am not going to go into great deal about what screen tearing is as Wikipedia covers it quite well.

So to solve the screen tearing issue we need a "vertical-sync" or "frame-marker" signal. Unfortunately none of the cheap 16 bit LCD displays of eBay have FMark bonded out.

One thing I did notice on the cheap eBay LCDs is that they all had pin 21 on the 37 pin FPC marked as NC. More expensive displays I could buy with the same 37 pin FPC sometimes used Pin 21 for FMARK.

I took a punt and bought several LCDs from eBay. I got lucky at with one of them and Pin 21 went to an unpopulated resistor that had FMark connected to it.

The store that had a suitable LCD is called coldtears electronics. Note that not all LCDs can be modified this way. If anyone else has a known modifiable LCD then please leave a comment and I will update a list here of sources.

I was able to make a break out board for this LCD, solder in R3 on the FPC and hook it up with the mess of wires shown to get smooth moving picture display.

2, Saving clocks with diodes, resistors and capacitors.

The datasheet for the IL9238 shows that there should be a 5ns hold off time between Write-Strobe and Register-Select each going low or high.

To achieve this in code you need to do this,

out portx, Register-Select-Low
out portx, Write-Strobe-Low
out portx, Write-Strobe-High
out portx, Register-Select-High

This takes four clock cycles and 240nS.

Figure 01. shows how to connect a Schottky, a resistor and a capacitor to form a one way low pass filter. With this circuit in place the code can be reduced to the following and still keep the 5nS set-up/hold times

out portx, Register-Select-Low & Write-Strobe-Low
out portx, Register-Select-High & Write-Strobe-High

Down from four clocks and 240nS to two clocks and 120nS

Figure 02. shows the resulting waveforms. The top trace is Register-Select and the bottom trace is Write-Strobe.

3, Pseudo DMA

In "Rock Blaster" the screen has to be cleared totally before each frame is drawn. With 320x240 pixels that is 76800 writes. With normal optimization and some slight loop unrolling that would take the CPU 1/90th of a second. That is 1/3 of the total time the CPU would be having to do nothing more that write out black pixels.

Seeing as writing out a single colour pixel is nothing more than toggling a pin, we can actually get the AVR hardware to help us out. If we hook up the Write-Strobe signal from the LCD to one of the AVRs Timer-Output-Compare pins we can just turn on an 8Mhz sqaure wave to clear the screen in exactly 153600 clocks and the CPU is free to run game logic. All we have to do is have another timer interrupt running to tell us when to stop the screen clear.

Now really onto the build

Step 2: Hacking the Cheap EBay LCD to Give FMark

There is not very much too this step at all, but it is fairly tricky. Mainly due to the 0402 sized resistor.

An 0402 resistor is 40 thousandth of an inch by 20 thousandth of an inch. That is 1mm x 0.5mm in metric. Anyway all you have to do in this step is get the suitable LCD from eBay and solder in a 1K0 resistor in the location called R3 as shown in the photo.

Step 3: Make the PCB

I have intentionally designed a large easy PCB. The components are 0805s, TQFPs and the like. Also the thinnest trace is 12 thou and the board is only double sided. Unfortunately the number of vias was unavoidable and you need to drill 60+ holes.

There are excellent tutorials on Instructables about making PCBs so I will only give a brief overview of the process.

  1. Print the photo tool
  2. Expose the board
  3. Develop
  4. Etch
  5. Tin plate
  6. Drill
The Gerbers and the gEDA PCB and schematic are included in the ZIP file here.

Step 4: Solder the Components

Apart from the LCD and the battery, this is pretty straight forward.

As shown in Photo 01. the LCD FPC is soldered straight to the PCB. Do this by pre tinning the pads on the PCB. Then lay the FPC over the pads carefully aligning then. Finally lightly press each pad on the FPC on top of the PCB pad with the tip of the soldering iron. The solder will flow together.

The Samsung Galaxy S3 battery does not come with flying leads. So you will need to solder your own leads onto the battery. This is fairly easy, just be mindful not to overheat the battery when doing this.

Here is the BOM with Digikey part numbers for the items you can get there.

BOML Desc Price Digikey # Qty Total 4u7 0805 Cap $0.18 445-1605-1-ND 2 $0.36 10u 0805 Cap $0.18 445-1388-1-ND 1 $0.18 100n 0805 Cap $0.20 C2012X8R1H104K125AA 5 $1.00 18p 0805 Cap $0.11 C0805C180J5GACTU 4 $0.44 WM3756CT Mini USB B $1.02 WM3756CT-ND 1 $1.02 MCP73832T Li-ion batter charger IC $0.68 MCP73832T-2ACI/OTCT-ND 1 $0.68 LM3670MF-3.3 3.3v buck regulator $0.97 LM3670MF-3.3/NOPBCT-ND 1 $0.97 10uH inductor 10uH inductor $0.27 587-2376-1-ND 1 $0.27 ATMega644 ATMega644 $6.51 ATMEGA644A-AUR-ND 1 $6.51 16Mhz XTAL SM 16Mhz Crystal $0.82 887-1104-1-ND 1 $0.82 SM SPST SM Tactile switch $0.56 CKN10361TR-ND 10 $5.60 3K9 0805 SM Resistor $0.10 P3.9KACT-ND 2 $0.20 2K0 0805 SM Resistor $0.10 P2.0KACT-ND 3 $0.30 1K0 0805 SM Resistor $0.10 P1.0KACT-ND 2 $0.20 560R 0805 SM Resistor $0.10 P560ACT-ND 2 $0.20 56R 0805 SM Resistor $0.10 P56ACT-ND 2 $0.20 30R 0805 SM Resistor $0.10 P30ACT-ND 5 $0.50 470R 0805 SM Resistor $0.10 P470ACT-ND 2 $0.20 680R 0805 SM Resistor $0.10 P680ACT-ND 2 $0.20 39K 0805 SM Resistor $0.10 P39KACT-ND 2 $0.20 10K 0805 SM Resistor $0.10 P10KACT-ND 1 $0.10 220K 0805 SM Resistor $0.10 P220KACT-ND 2 $0.20 1K0 0402 SM Resistor $0.10 P1.0KJCT-ND 1 $0.10 IRLML2502 IRLML2502 MOSFET $0.63 IRLML2502PBFCT-ND 1 $0.63 BAT54S BAT54S schottky diode $0.23 568-1614-1-ND 2 $0.46 LED 0805 SM LED Red $0.58 516-1429-1-ND 1 $0.58 Digikey Total$22.12             TM028HDH15 eBay LCD $12.90 n/a 1 $12.90 Brass 150 x 75 x 0.7mm $6.00 n/a 1 $6.00 Brass 6.5mm unthreaded standoffs $0.50 n/a 4 $2.00 Brass 12mm threaded standoffs M3 $0.50 n/a 4 $2.00 Screws 15mm M3 screws $0.23 n/a 4 $0.92 Al-Plate 125 x 55 x 3mm Aluminium plate $13.00 n/a 1 $13.00 Al-Hook 3mm aluminium rod - n/a 1 $0.00 Li-Batt EB-L1G6LLU Samsung phone battery $18.90 n/a 1 $18.90 Total Other$55.72Grand Total$77.84

Step 5: Etch the Brass Case

Figure 01. and 02. are the etch mask for the front and back side of the brass.

You will need a spray etcher for this. Trying to etch good detail into 0.7mm brass with a bubble etch tank is going to be very unsatisfying.

Fortunately I can recommend a good spray etcher that is up to the task that you can build yourself for under $100.

I am using the toner-transfer-method here for the brass etching. The general steps taken are also shown in the photos.

  1. Use a modified laminator to transfer toner to brass
  2. Apply TRF green foil
  3. Etch
  4. Cut out tabs and clean up brass

Also shown here in Photo 05. is the results of etching one side 50% more than the other. This has made the two "sides" 0.5mm and 0.2mm. This serves two purposes. Firstly the fold-line weakening is enhanced. Secondly it makes the buttons stand about 0.2mm proud of the surface.

Step 6: File the Sides and Fold Up the Case

Before the case can be folded up, the edges of the sides have to be filed to 45 degree bevels as shown in the 2nd photo. The outside edge of the bevel should be just inside the fold line. The top edge of the 45 degree bevel should be in line with the inside edge of the fold line.

The etched fold line makes the brass very easy to fold up. It is still a good idea to clamp the brass between two pieces of wood in a vice for the two long folds. This will give the weak sections around the LCD some support.

Step 7: Cutting the Back Plate

The back plate for the buckle needs to be made from 3mm thick Aluminium or Stainless.

Follow the template shown either in the PNG or the gerber.

I printed out the template onto some paper and then stuck this to the aluminium plate. I then used a hacksaw and file to cut the outside shape. I then chain-drilled and filed the loop for the belt. Finally I drilled and counter bored the holes for the screws that hold the front on.

Finally one last hole needs to be made for the belt hook. I drilled a 3mm hole. Then I cut a short length of 3mm Aluminium and placed it in the hole. I then used a ball peen hammed to rivet the hook into the hole. If you have a TIG welder then welding the peg would also be an option

Of course if you are lucky enough to have CNC equipment then knock yourself out. I chain drill and file because I have to, not because it's fun

Step 8: Program

Due to space restrictions there is no ISP header on the board. You need to solder 6 wires straight to the PCB. They are the normal order running away from the LCD

  1. GND
  2. VCC
  3. Reset
  4. SCK
  5. MISO
  6. MOSI

Program the HEX file as usual. The fuses should be set for +8mhz-xtal, no-BOD, no-CKOUT, no-WDT.

Step 9: Assemble

The standoffs are too long and need to be cut to length.  The threaded standoffs need to be reduced to 3.6mm and the unthreaded ones need to be reduced from 6.4mm to 5.6mm.  Hacksaw and file as necessary.

Once the correct length, you need to glue 4 stand offs into the 4 recesses in the back of the brass. These line up the the 4 x 3mm drill holes in the back plate.

The back of each brass button needs a 2.7mm spacer glued to it so it can reach the PCB switch below.  I have used some thick double sided tape and offcuts of FR4 PCB material (photo 10).  The combination of tape and PCB added up nicely to the needed spacer.  The tape also aids in holding the buttons while assembling.

After the glue has dried you just need to do final assembly.

Place the brass box upside down on the table. Place the three brass switches in their cutouts. Slide the electronics into the brass box, USB connector first. Place the four 5.4mm spacers where the screws will attach to the stand offs. Attach the base and tighten the four 15mm M3 screws.

Attach your belt to the loop, as you would any less awesome detachable belt buckle.

Step 10: Strut

Put on The Asteroid Belt and strut.

Pants ARE optional. No one is going to notice anything else after they see the LCD goodness in the belt buckle.

Everyone will want to have a turn.

Epilog Challenge V

Runner Up in the
Epilog Challenge V

Game.Life 3 Contest

Runner Up in the
Game.Life 3 Contest