Electronics Started Working on a LED cube game.

Discussion in 'Modding' started by ConKbot of Doom, 14 Apr 2006.

  1. ConKbot of Doom

    ConKbot of Doom What's a Dremel?

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    I decided that I wanted to make a 3x3x3 LED cube and make it into a 3 dimensional Tic-Tac-Toe game. I needed a cheap source of Tricolor LEDs, so I got on eBay and ordered 1000 (yes, 1000, going to have some more fun later) red/green common anode LEDs. Easter break came up, so I went out to the lab last night and put together the cube.

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    I'm going to use a PIC 16F76 to run this, a 4-way tactile switch for each user, and a couple indicator LEDs The transistors are on their way, I just need to place an order for the uC and switches. Hopefully I can get this done before the end of the school year, and work on other things at home. :D
     
    Last edited: 15 Apr 2006
  2. bixie_62

    bixie_62 Minimodder

    Joined:
    17 Jun 2004
    Posts:
    1,595
    Likes Received:
    10
    now,if you could encase that in some sort of clear plastic/resin-y thing....!
     
  3. ConKbot of Doom

    ConKbot of Doom What's a Dremel?

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    It would be neat too... but its pretty strong as it is, I dont think it needs potting. so I'll leave it open for now... though later on a plastic case may be a good idea.

    I'd like to make a 5x5x5 or 6x6x6 cube with RGB LED's but I cant find them cheaper than $.8 each, and $100+ for led's isnt in my buget right now... :grr:

    I'm going to start programming tonight, my transistors should be here tuesday, I need to get ahold of some cheap prototyping board digikey sells it for like $20/board :blah: and radio shack for like $2/board I just need to either get out or order it from somewhere else.
     
  4. ElThomsono

    ElThomsono Multimodder

    Joined:
    18 Mar 2005
    Posts:
    3,359
    Likes Received:
    658
    That, is soooo cool :eeek:

    Nice soldering too, good luck with it and keep us posted :)
     
  5. m0ng0lh0rde

    m0ng0lh0rde What's a Dremel?

    Joined:
    5 Jun 2004
    Posts:
    146
    Likes Received:
    1
    Too bad that there aren't (that I know of) any 6 color LEDs...

    You could make an all-electronic Rubiks Cube (remember those?)

    Really cool, would love to see it lit up!
    :D :clap:
     
  6. star882

    star882 What's a Dremel?

    Joined:
    19 Mar 2003
    Posts:
    925
    Likes Received:
    1
    A single RGB LED can produce millions of colors...
     
  7. Wolfe

    Wolfe What's a Dremel?

    Joined:
    7 Sep 2003
    Posts:
    776
    Likes Received:
    1
    Jameco:
    http://www.jameco.com/webapp/wcs/st...storeId=10001&catalogId=10001&productId=20811

    The neat thing is that this unit breaks down into 3 seperate breadboards and 9 bus strips (they're just screwed to a sheet metal backplane). Pretty high quality too (I have one).

    Jameco is awesome. They have a lot of other things too.


    You actually bought transistors? Hell, i took apart an old casette deck a month ago and managed to extract somewhere upwards of 50 NPN transistors in about an hour. They work pretty well for low voltage, a few hundred mA. There is soooooooo much awesome stuff being thrown out all the time. I recently got a 17" LCD for the price of homebrewing a PowerSupply for it.



    Now i'm gonna have to do something like that...
     
  8. ConKbot of Doom

    ConKbot of Doom What's a Dremel?

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    No, I didnt buy them I had my source send them to me (friends are cool :naughty: ) but I'm now thinking of using a MAX6952 ( http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3379 ) and much smaller micro-controller to handle driving and multiplexing of the LEDs. I can probably get away with a 18-pin or 14 pin micro-controller instead of a 28 pin one.

    Oh, and I'm talking about prototyping board/perfboard not a breadboard (looking to make something permanent :D ) I'm finding a few sources... I just need to sort things out a bit more, before I end up making 4 separate orders... :p


    I was talking to a friend about that, a cube of 6 panels of frosted plexi, 9 LEDs on each side... would be interesting to do later
     
  9. BlackMan

    BlackMan Minimodder

    Joined:
    12 Sep 2003
    Posts:
    325
    Likes Received:
    0
    kool, i saw that somewhere the other day but i cant remember where, they are making an 8x8 one. pretty impressive
     
  10. Entropy78

    Entropy78 What's a Dremel?

    Joined:
    31 Jan 2006
    Posts:
    1
    Likes Received:
    0
    You probably meant this one:

    http://www.lomont.org/Projects/LEDCube/LEDCube.php

    Pretty impressive stuff indeed...
     
  11. Pygo

    Pygo Rick Relixed

    Joined:
    26 Jan 2003
    Posts:
    2,179
    Likes Received:
    8
    Do you intend to make it singleplayer as well?
    I could dig out the single player tic tac toe I wrote for my ti-83+ if you'd like.
    Though, it was 2d only, and had a couple bugs. (minor bugs. and easy to fix iirc).

    I had it to the point where the computer would ALWAYS win, or geta cats game.
    This was due to the computer checking every possible win it could make, and if not, then it would check all defensive offensive moves/defensive moves, etc.
    for a 3x3 square, the checking took about 9k of memory. I suppose I could have slimmed it down a lot more though.

    Let me know how it turns out!
     
  12. g0th

    g0th What's a Dremel?

    Joined:
    12 Apr 2005
    Posts:
    319
    Likes Received:
    1
    Looks cool.

    I've been going to make something similar myself.

    I'm planning to use 64 5mm tri-colour LED's - standard round 5mm ones.

    I'm going to use a wood piece with an array of 5mm holes as a construction jig.

    How do you have it wired up? Red anodes on the x axis, green anodes on the y axis, and each 'level' in the z direction with the cathodes connected together? I assume something like that would be the practical way to do it.
     
  13. ConKbot of Doom

    ConKbot of Doom What's a Dremel?

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    Hmm, I don't see why I couldn't, but I'm just going to concentrate on getting the cube working, and then the 2P version working, I'll see what I can do with :cooldude: Though hopefully I can get it down to less than 9k since I'm using assembly.


    Good luck with a RGB cube, I'm still looking for a decent source that's about $.20 each, or cheaper.

    I have it setup so that the red and green both run forwards and backwards (y axis), the red is interconnected between rows on the back, the green is connected in the front, so that each layer has a cathode for each color. The anodes run vertically, So it is interfaced the same as a 9 anode x 6 cathode matrix LED display.
    I could have tried to do 'real' cube style interfacing, where you pick the X, pick the Y and pick the Z, but I didn't think all the extra hassle was worth saving 3 pins.

    I want to do a 5x5x5 or a 6x6x6 later with the remaining 900 some LEDs I have, but I would want something faster than a PIC to be scanning the cube. Possibly building my own circuit from sequential logic, or maybe some sort of programmable logic.
     
  14. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    There might be a bit of confusion going on there. Tri-colour means that there are only two dies in the package, not three.
     
  15. ConKbot of Doom

    ConKbot of Doom What's a Dremel?

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    Haaa... Just glanced right over that. I call the ones like I'm using tri-color, the ones with 2 dies, but connected in anti-parallel, bi-color usually :blush:

    Well in that case, hit up ebay, I got mine for $.026 each, shipped.
     
  16. Wolfe

    Wolfe What's a Dremel?

    Joined:
    7 Sep 2003
    Posts:
    776
    Likes Received:
    1
    I've had pretty good luck getting perfboard on ebay..

    Jameco has some too.
     
  17. ConKbot of Doom

    ConKbot of Doom What's a Dremel?

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    heh, ebay has everything else that I usually want, why not perfboard :hehe:

    I found a joystick that I want to use for each player

    [​IMG]

    4-way navigational switch with select. Oh and for size reference, the spacing between the leads on that is standard .1" pitch.
     
  18. BlackMan

    BlackMan Minimodder

    Joined:
    12 Sep 2003
    Posts:
    325
    Likes Received:
    0
  19. Wolfe

    Wolfe What's a Dremel?

    Joined:
    7 Sep 2003
    Posts:
    776
    Likes Received:
    1
    Is that joystick SMD?

    Also, is there any way to add a "pull" switch? That would give you all 3 dimensions of controllability.

    And that... Would be awesome!

    Where'd you get the joysticks?
     
  20. Pygo

    Pygo Rick Relixed

    Joined:
    26 Jan 2003
    Posts:
    2,179
    Likes Received:
    8
    Very nice looking.

    I just checked my TI83 to see if the code is still there.. but alas it is not.
    and I know I don't have the cd I backed up the code onto any more.. and I doubt I've still got the code still on my old hdd now that I think of it.

    But I can sum up the code here:
    assuming the board is like:
    Code:
    1|2|3
    -----
    4|5|6
    -----
    7|8|9
    
    Code:
    if (1) and (2) == "x" then
        play on (3)
        goto won
    end if
    if (1) and (5)  == "x" then
        play on (9)
        goto won
    end if
    
    etc, for every possible move. starting with offensive wins, then going to defensive/offensive, then offensive, then defensive.

    I wrote out every single game play move.. starting with one game peice on the board, to one square left in every possible way. I used a lot of paper!! then I classified what move was for what etc.

    I'm sure you could simplify that down (in basic) by checking all the last moves on one line with "or" after every group of ands"

    I look forward to seeing this completed!

    I've got about 170 green LEDs to spare, and several yellow, and more red 5mm that I'd like to do something with. I was going to make a clock but was too lazy for that. I like this better :>
     

Share This Page