Introduction: Simple Electronic Dice
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.
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:
-7x LED (preferably diffused)
-7x 160 ohm resistor
-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.
Participated in the