Conways Game of Life - Running on an ATtiny13!

by lonesoulsurfer in Circuits > Microcontrollers

225 Views, 3 Favorites, 0 Comments

Conways Game of Life - Running on an ATtiny13!

Conways Game of Life - Powered by ATtiny 13
Conways Game of Life - Powered by an ATTiny13
5.jpg
1.jpg
2.jpg
3.jpg
4.jpg

The Game of Life is a cellular automation created by mathamatician John Conway. It's what is known as a zero player game, meaning that its evolution and game play is determined by its initial state and requires no further input. You interact with the Game of Life by creating an initial configuration and observing how it evolves.

The game itself is based on a few, simple, mathematical rules consisting of a grid of cells that can either live, die or multiply. When the game is run, the cells can give the illusion that they are alive which is what makes this game so interesting.

There's plenty of information on the Internet about the Game of Life. If you are interested in learning more then definitely check out the Wikipedia page which has some great resources and info.

This build is based on another Instructable by Sanuki Udon who created the code and project.

My contribution is, I created a PCB and front panel for the project and have tweaked some of the parameters in the sketch to make the game run faster and longer.


Supplies

IMG_2994.JPG
IMG_2985.JPG
IMG_2988.JPG
IMG_2991.JPG
IMG_2993.JPG
IMG_2998.JPG
IMG_3001.JPG

I've created a parts list which can be found in my GitHub page and in the PDF file attached to this step. The PDF includes links and images of each of the parts which will make it easy to order the correct ones for this build.

The parts list attached doesn't included the PCB or front panel. You'll need to jump to the next step which goes through how to get yours printed.

PARTS:

  1. Charging Module X 1 - Ali Express
  2. USB C connector X 1 - Ali Express
  3. 18560 Battery X 1 - Ali Express (or you can scavenge them from old computers)
  4. 18650 battery holders X 1(PCB through hole) - Ali Express
  5. JST 2.0 Micro connectors - Ali Express Qty will depend on whether you are planning to locate the switches on the case.
  6. On/off switch X 1 - Ali Express
  7. Momentary Switch X 1 - Ali Express
  8. 8 pin IC socket X 1 (for the Attiny) - Ali Express
  9. Attiny 13A X 1 - Ali Express
  10. 8 X * LED Matrix X 4 - Ali Express. I went with red but you can also get them in green or blue.
  11. Male header pins (single row) - Ali Express

Parts for the Case and Front Panel

  1. 2mm Opal acrylic (A4 size) - eBay or craft stores. This is used as a diffuser for the LED's. It isn't essential but I really like the effect it adds.
  2. Timber moulding to make the case - I get mine from the local hardware store
  3. M2 hex bolts and nuts. Buy an assorted pack - Ali Express
  4. M2 Screws - Ali Express
  5. M2 Spacers (assorted) - Ali Express

Getting the PCB & Front Panel Printed

Schematic.png
PCB.png
Game of Life - 3D Image.png
IMG_2982.JPG
IMG_2980.JPG

We all have different levels of knowledge, so when it comes to a build like this I want to make sure that I'm providing enough information so anyone with some basic soldering skills can make it. That includes ensuring there are instructions on how to get your own PCB's printed (which is super easy!)

So with that said, the first thing you will need to do is to get the front panel and PCB printed. I use JLCPCB (not affiliated) to get this done. The front panel is actually just a PCB without any components included! The front design is done in a program called Inkscape (available free) and the panel including the drilled holes is done in Fusion 360 (also free!)

The files that you need to build your own Bleep Drum Synth can be found in my GitHub page. This includes the parts list, Gerber files for the PCB & front panel, schematic, Arduino script etc. Download the files to your computer

STEPS:

  1. Send the Gerber files to a PCB manufacturer like JLCPCB who will print the PCB and front panel for you. Download all of the files from my GitHub page to your computer and send the zipped Gerber files off to the PCB manufacturer of choice.
  2. If you have no idea what any of the above means , then check out the Instructable I made on how to get your broads printed which can be found here.
  3. NOTE: The manufacture will include an order number on both the PCB and front panel. It doesn't really matter where it is on the PCB but you don't want it on the front on the front panel!
  4. Over at JLCPCB you can 'specify a location' once the Gerber files have been loaded so click this for the front panel and specify in the comment section that you want the order number on the back of the panel. The manufacturer will add it to the back where indicated.

Adding Components to the PCB Part 1

IMG_3005.JPG
IMG_3009.JPG
IMG_3013.JPG
IMG_3015.JPG
IMG_3016.JPG
IMG_3018.JPG
IMG_3017.JPG
IMG_3036.JPG

The PCB is double sided so it's important that you add the components in the right order or you might find that you can't add some components. In version 1 of this PCB I had it powered by a 9V battery that was directly soldered to the PCB. It was only when I started to add components that I realized there was no way to solder the battery holder into place and also solder the 8X8 LED matrix's as well! Lucky for you I fixed the issue! Now it run's off a 18650 li-lo battery and there is less components to solder!

STEPS:

  1. You need to start adding components to the reverse side of the PCB so let's start there. First, add a header pin to each of the holes in the PCB. You could also just use resistor legs if you wanted to. Now place the charging module into place (making sure that the micro USB is facing outwards, and solder into place
  2. Now solder the IC socket into place
  3. Next add the JST connectors. I've included extra connectors for the switches in case you want to mount them into the top of the case. If you are adding the switches to the PCB, then just connect a JST connector to power and the charging connector.
  4. Now you can add the switches.
  5. Lastly, solder the battery holders into place.

Adding Components to the PCB Part 2

IMG_3021.JPG
IMG_3022.JPG
IMG_3023.JPG
IMG_3027.JPG
IMG_3028.JPG
IMG_3034.JPG

Now you can flip the PCB over and add the 8X8 matrix's

STEPS

  1. You will need to add male header pins to each of the IN and OUT on the matrix. Remove the LED setion from the board and trim the header so there is 5 pins.
  2. I find that the easiest way to ensure that the pins are straight in the PCB is to add a little solder to the soldering iron and dab it onto one of the pins. Check that the pins are sitting straight in the PCB and if so, solder the rest into place. Do this for all 4 matrix's.
  3. Place the first LED matrix into the top left section of the PCB. IMPORTANT! Make sure you align the 'IN' and 'OUT' pins on the matrix correctly to the PCB. The IN pins on the matrix need to go in the top section of the PCB.
  4. Solder the rest of the matrix's onto place.
  5. Now you can test the board by adding the battery and turning it on. If everything has been soldered right, a little glider will make it's way across the screen and then explode!
  6. If this doesn't happen, check all of the solder joints, especially on the matrix's it doesn't take much to connect a couple of the legs together which will cause you issues.

Adding the Front Panel

IMG_3039.JPG
IMG_3041.JPG
IMG_3047.JPG
IMG_3043.JPG
IMG_3046.JPG
IMG_3048.JPG
IMG_3050.JPG

After much toing & throwing I decided to add an acrylic diffuser to the front of the LED Matrix's. The LED's are a little raw without the diffusion. However, the movement of the LED's with the diffusion enhances the illusion that they are alive, moving across the screen with purpose.

STEPS:

  1. Place the front panel on top of the acrylic.
  2. Mark out the area to cut and drill on the acrylic. I'm lucky enough to have a band saw which makes cutting the acrylic simple. If you don't have a band saw, the you could use a fine tooth say to cut through it.
  3. To secure the acrylic to the PCB, I used some M2 screws, nuts and spacers (see parts list)
  4. I can't recall the length of the screw I used to connect everything together. So, place one into the front panel, then into the acrylic and then the PCB.
  5. Place the acrylic against the front panel. Place a screw though the PCB and then the acrylic and add a nut. Do this each of the 4 holes. This will secure the acrylic to the front panel.

Make a Case

IMG_3052.JPG
IMG_3055.JPG
IMG_3058.JPG
IMG_3060.JPG

The case is made from pieces of wood trim that you can buy from any hardware store. The wood is 8mm wide by 30mm high. The PCB has been designed to the wood fits perfectly. You could also use a less width wood as well but no more than 8 mm wide.

STEPS:

  1. Measure and cut the wood for the sides, top and bottom. I just used the front panel as a template to make my measurements.
  2. Use a nail gun to secure the wood together. If you don't have one, you can always just glue them together
  3. Place the game of life into the wood frame and mark out where to drill the holes to secure the front panel
  4. Secure the front panel into place using M2 screws. You can always use a sander to clean up the sides and edges if it isn't a perfect fit.
  5. Add some wax or stain or whatever you have to the wood to give it a nice finish

Adding the USB C Charger Port

IMG_3104.JPG
IMG_3105.JPG
IMG_3106.JPG
IMG_3108.JPG
IMG_3089.JPG
GOL.jpg

You could always just charge the battery up with a 18560 battery charger if you wanted to. However, It's easy to add the little USC charging port and connect that up to the charging module via a JST connector.

STEPS:

  1. Mark out where you want to add the USB C port.
  2. Drill a few holes and then use a file to clean up the edges etc.
  3. Connect a JST wire connector to the JST connector and push the wires out through the slot you made for the USC C port.
  4. Trim the wires and solder them to the solder point on the port
  5. Add a couple of M2 screws to secure it into place. Now you can charge the battery via the port!