Arduino Adventures :: Day 4

Published February 24, 2010
Advertisement
So I've been thinking about what I want my first big project to be, tossing around a lot of ideas. Trying to balance complexity & difficulty VS coolness. (Also, I want the project to be fun to make!) One of the things I've been interested in doing ever since I heard that you could do it at home, was acid etching your own circuit boards, so I wanted that to be a part of the project too.

With those requirements in mind, I finally settled on a project: John Conway's Game of Life. I've written two different versions of it in software previously:
Game of Life
I am absolutely fascinated by the whole thing. At one point I was in the planning stages of a hardware based version using only logic gates. But the complexity was astronomical, I would have ended up building an ENIAC sized machine :P

But now with a micro-controller to do all the heavy lifting, it's feasible! With that as my goal, I began planning and research in earnest. So what do I need. Well all I really need is a way to display a grid. There are some LCD screens you can buy and hook up, but thats no fun, and doesn't look very cool. So I began looking into LEDs.

Now, in the software version I wrote, the longer a cell had been alive, the more it's color would change. So I wanted multi-color LEDs that I could modulate the color on. The plan was to have a grid of NxN multi-color LEDs. But after thinking things through a little, I decided I had enough issues to deal with anyway, without adding in the whole analog aspect, so I opted for digital (one color, on or off) LEDs.

My next step was to prototype. I needed to determine what the value of N would be. This would determine a lot about the circuit complexity and how I would go about implementing things. Now in the theory behind the Game of Life, the grid is infinite, there for the larger your actual grid is, the more interesting the result will be. So size is key.

The grid in my software version is 64x64. But after looking at things from a hardware perspective I figured roughly 8x8 was the largest I could manager. So I tweaked my software to be 8x8 to see if it was still interesting. It wasn't...

Until I wrapped the world that is! (So each edge is connected to each other edge.) Satisfied that it could still be interesting at 8x8 as long as the edges wrapped to each other, it was time to start thinking seriously about how I was going to implement this in hardware.

The key here, is I need to be able to individually address each LED. An 8x8 grid means 64 individually addressable LEDs, but the Arduino only has 14 digital I/O pins! (and even less analog I/O pins.) So the question became: "How to drive 64 LEDs with only 14 digital I/O pins?"

The first thing that jumped into my head was multiplexing (well, demultiplexing to be accurate). But that meant researching and ordering ICs, and during some research on the interwebs I found a possible alternative called "Charlieplexing". No ICs were required, just a few current limiting resistors. It allowed you to address N(N-1) LEDs where N is the number of I/O pins. Thus with only 14 pins, I could address 182 LEDs! (Plus the circuit looks fun to design)

So I ordered parts for that: 100 red LEDs and some 68 and 82 Ohm resistors (I'll get into why that is later) and I will write up another entry on that build soon :)
(Probably do a video too, I'm still exploring video editing software, trying to figure it all out.)
0 likes 3 comments

Comments

benryves
Sounds like an interesting project! [smile] If you don't mind someone else doing some of the work for you, you can get relatively cheap LED display panels on eBay with an integrated driver (I have one of these, for example; 32×8 LEDs, and you can chain up to four of them together on a single cable). You do learn less by doing it that way, of course...
February 24, 2010 05:26 PM
Wavesonics
ya i briefly explored that option, but where is the fun in that :P

Though I may use them for future projects.
February 24, 2010 07:11 PM
techzie223

ya i briefly explored that option, but where is the fun in that :P

Though I may use them for future projects.

192.168.1.2 IP

November 27, 2019 05:40 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement