Simple Electronic Dice




Ever wanted to make an electronic dice? I designed a simple and small circuit, that fits into every pocket.

You might wounder why this is better than a normal die. It significantly increases your geekiness level.

The biggest part is the battery, because we're using a 9V battery.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts

It's hard to understand, why some people build circuits with so many parts. You can build the same thing with less parts and it still works.

You will be surprised by the number of parts needed:

-1x ATTiny26
-7x LED (preferably diffused)
-7x 160 ohm resistor
-push button
-9V battery clip

This part is for the voltage regulator:
-1x 60 ohm resistor (power rating 0.3W or more)
-1x 5.1V zener diode (power rating 0.5W or more)

Sadly, I never take pictures of my parts. I always forget.

Step 2: Soldering It Together

It is time to solder it on a board. The size of mine was 80x55 (mm). That would be about 3x2 inches.
You are free to use wires on the board, so that it is easier to connect the parts. Don't worry about how it looks, because you can/will put it in a "box". Although my "box" is more like a bag.

Step 3: Software

It's a no brainer that it can't work without a brain. We're using the ATTiny26 because it's small, cheap and powerful enough for the dice to work.

I had some problems changing the random number to a number between 1 and 6. The ciel function is just too strong for the little avr. Then I got an idea. I devide the number with 6 and take the remainder and increase it by 1. As you can see, it works :)

Step 4: Diffusing the LEDs

Chances are that you bought normal LEDs and now they are too strong. After looking directly at them, you get partially blind for a while.

A good way to diffuse them is by using paper. You simply put it over the LEDs and it's done. I even made an entire enclosure with paper for that purpose.

Step 5: Showing It Off

Now it's time to take your dice and show them to people. Use them to play games. It can do whatever a normal die can do, but looks better at it.

Pocket-Sized Contest

Participated in the
Pocket-Sized Contest

Be the First to Share


    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    10 Discussions


    9 years ago on Introduction

    u should make it more clearly what led is wich one...
    in the diagram it only says led1-led2 etc, but its hard to figure out wich one is led1 in the 7led display...

    4 replies

    Reply 9 years ago on Introduction

    btw, when i say hard to figure out, i mean the only way is to compare the solder tracks and the components to eachother to backtrack wich attinypin is connected with what led...
    il show the pic as soon as im done, with the connections...


    Reply 9 years ago on Introduction

    hmm,  a bit slow...

    anyway here's the result, its in the pic, but a bit to small to see good...
    heres a small txt version, the numbers are the pins the leds are connected to, and the place theyr standing are the place the leds are.

    |20|     |14|
    |18|     |12|

    i hope its clear...


    Reply 9 years ago on Introduction

    oh dmn, just figured out why the VCC and GND arent on pin 20 and 10, its attiny26, i thought all along it was attiny2313...

    well, im gonna try and alter the code for attiny2313, il post it if i can figure it out...


    10 years ago on Step 1

    excellent idea! its useful to the hobbyists n a mini project...thanq...


    10 years ago on Step 2

    it's kind of hard to understand how you soldered it should do a drawind on paint or something to simplify it


    10 years ago on Step 1

    very nice!

    i'm going to do this as my first real project.

    thanks for the instructable

    P.-S. :do you know where to get the materials?radioshack?



    Reply 10 years ago on Introduction

    That was a great idea. But even if i thought of that, I still couldn't have made it. I only had enough leds for one and the avr would probably be too weak.