Animated Space Invaders Clock

33K58230

Intro: Animated Space Invaders Clock

Many of us have played the classic arcade game Space Invaders. Here's a way to implement it into your daily life!

This nifty clock is packed with groovy animations and sound effects. It's perfect for your desktop, and will make work/study much more interesting.

STEP 1: Gather Materials

Parts and Components

Note: You do not have to use Adafruit's Pro Trinket. Any Arduino-based 5V microcontroller should work as long as it has enough I/O pins and fits in the project enclosure.

Tools

  • Soldering Iron (with solder of course)
  • Helping Hands or PCB Vise
  • Needle-nose Pliers
  • Sand Paper
  • File
  • Hot Glue Gun
  • Loctite 5-minute Epoxy
  • Computer
  • Micro USB Cable

STEP 2: Designing the Enclosure

In addition to the inner electrical workings, you will need a nice looking enclosure. This consists of three major parts: the clock body, the clock back, and the clock face. The body and the back are both 3D printed ABS (if you do not have a 3D printer, I highly recommend 3D Hubs). You will need to order the laser cut face with Ponoko; just upload the attached svg file and checkout.

Note: When ordering the laser cut acrylic from Ponoko, it is important that you select "Acrylic - Gray Tint" as the material, "3.0 mm" as the thickness, and "P1" as the size.

STEP 3: Prepare Software and Code

To begin with, make sure you have the latest version of the Arduino IDE.

You must then install the proper software to support Adafruit microcontrollers (assuming you are using the Pro Trinket). Open up Preferences and paste the following link into the box for Additional Boards Manager URL:

https://adafruit.github.io/arduino-board-index/package_adafruit_index.json

Go to Tools > Board > Board Manager and install "Adafruit AVR Boards" under Contributed. Now when you open Tools > Board, you should see a whole list of new Adafruit boards. Select the option for "Pro Trinket 5V/16MHz (USB)", then set Tools > Programmer to "USBtinyISP".

You will also need to install the following libraries through the library manager:

  • RTClib
  • Adafruit_LED-Backpack
  • Adafruit_GFX

For more information on working with Arduino libraries check out this tutorial.


After you have properly set up the IDE, download the attached Arduino file and upload it to your Pro Trinket.

Note: To upload code to the Trinket, it must be in bootloader mode (indicated by a pulsing red LED). To put the Trinket into bootloader mode, simply press the reset button.

STEP 4: Preparing the Breakout Boards

You will need your soldering supplies for the next three steps. While your iron heats up, start cutting off the number of header pins needed for each breakout, then solder them on. Using a breadboard helps a lot.

When soldering the LED matrices onto their backpacks, make sure the side with printed text is on the same side as the silk screen circle. On the back, short the I2C address pads as follows:

  • A0 (address 0x71)
  • A1 (address 0x72)
  • A0 and A1 (address 0x73)
  • None (address 0x70)

The Real Time Clock breakout requires some extra assembly. Start by melting a small lump of solder onto the battery holder pad (this will give the coin cell a nice and snug fit). Next, solder each component into their respective locations marked by the silk screen.

Don't forget to snip off any component leads.

Note: You may need to file down the sides of the backpacks so that the matrices sit flush next to each other.

STEP 5: Solder Up the Display

Lay the LED backpacks out from left to right so that the I2C addresses are in decreasing order. Solder up some hookup wire so that the Vcc pins of each backpack are all connected and a longer length of wire extends from the leftmost backpack. It is a bit tricky to get the the heat-shrink tubing on in the right order (see pictures above) so be very careful. Repeat for the GND, SCK, and SDA pins.

STEP 6: Solder Up the Main Board

Now for the main circuit board.

First, solder the Pro Trinket and RTC onto the proto-board. Then solder hookup wire to connect all 5V and GND pins. Also connect the I2C lines (SCK and SDA). Next add the speaker to digital pin 9 and the pull-down resistor to digital pin 4.

Once again, snip off any long leads.

Note: In some of the photos the placement of the pull-down resistor is erroneous. It should be connected to pin 4.

STEP 7: Putting It All Together

Fit the DC jack through the hole on the clock back and secure with the included nut. Then solder the leads to the Vbat and GND pins of the Pro Trinket.

Use the glue gun to hot glue the LED matrices into the clock body (it will be a tight fit), and solder the four long wires to the 5V, GND, SCK, and SDA pins of the Pro Trinket.

Install the button and secure it with the included nut. Solder one wire to positive power and the other to digital pin 4 of the Pro Trinket.

Finally, gently fit the proto-board and speaker into the clock body, snapping the clock back into place.

You have finished all the soldering for this project so take a quick break and grab a snack :)

STEP 8: Final Touches

The last thing to do is to attach the clock face using some Loctite 5-minute Epoxy.

It helps to roughen up the area you will be gluing, which can be accomplished with a file.

Following the directions on the bottle, apply a thin line of epoxy around the bevel of your clock. Carefully place the acrylic face on top, aligning the edges with that of the body. After the glue is set, you can lay the clock face down to dry.

STEP 9: Going Further...

Yoo hoo! You just built your very own Space Invaders desktop clock!

I hope you enjoyed this project, but don't stop there. I encourage you all to implement your own ideas and make this project even cooler!

In conclusion, I would like to give a special shout-out to the great Tomohiro Nishikado, designer and creator of the world's greatest arcade game.

EXTRA: I have added some modified files which should provide a better fit for the LED matrix backpacks. Keep in mind that they have not been physically tested yet, so their function is not assured.

34 Comments

Do the matrices troublesome flicker?

I like the idea and the clear instructions on how to make it. Thanks.

Yes, the electronics were about $100 and the enclosure was about $40 (both the 3D printed and laser cut parts). If you are looking for something more affordable, you could try using two of these one color displays for about half the price: https://www.adafruit.com/products/2042

However, you will most likely have to modify the design files for the enclosure.

Awesome design. I'm thinking about doing a similar build. One question though, what program do you use or recommend to modify the 3d designs you attached? I would like to modify your design and add a few more buttons to it.

Also, what do you suggest to get a nice smooth finish such as yours? There's a 3d printer at work that I could use but I would like to know if you have any tips to make it look as nice as your build.

I found SketchUp (there's a free version) to be easy to use and accurate. Making holes can be tricky though. As for the finish, I just printed with ABS on a medium resolution printer; nothing else.

Got it. I ended up importing your files into 3ds max and doing some small edits like adding some more buttons and adding a few openings for a speaker. Hopefully it works fine...

I"ll try to do a print in the next two weeks and will try to use ABS as you suggest. Don't know much about 3d printing so this should be a fun ride. :)

When I was assembling the clock, I found that the LED matrix backpacks were a bit too tall (just the PCB not the actual matrix) so I had to file them down to get them to fit in the enclosure. So I suggest you make the 3D model taller. This will require editing all three parts. I apologize for not updating the files myself, but I will try to do that soon.

How much bigger do you think it has to be? You had to file a lot or just a tad?

I had to file down a couple millimeters, but too close to the copper traces for comfort. Hopeful you won't have to file at all. I have just appended some modified files that should address that issue.

Why the 5v switching PSU?, optional?, use an external 5v supply?

The 5V power supply was the simplest/quickest way to provide external power to the circuit. It has kept the Trinket running decently so far, but 9V supply would probably be better.

I LOVE IT? HOW MUCH 2 MAKE ME ONE..MY EMAIL IS,..vali8nt@bigpond.com[bob james]

What he said! How much to make me one as well?! Pretty please. I love this thing!

Me gustaria hacerlo, muchas gracias x la idea

It may be a stupid question, or at least I just dont look well, but how can we change time? Can we change the time zone 12 for a 24? Can we set up an alarm?

As of now, the only way to change the time is to reprogram the Trinket. I originally planned on using extra buttons to set the time and alarms, but due to time constraints I had to reduce the scope. I am open to any suggestions on the best way to implement such a feature.

kk good .... so I'll wait to your next update

More Comments