Electronic dice has option for 20 or 100 sides

[Bluewraith] built himself an electronic dice using a 555 timer and 4017 counter. This is a classic project and he enjoyed doing it but wondered about making a 20-sided dice. So he grabbed his Arduino and got to work. A switch on the final project selects between 20 or 100 sides. He used a MAX7219 to control the 7-segment displays, and a standalone AVR chip for the rest of it.

If you missed it back in October you should also look in on this 6-sided dice. It also uses an AVR running the Arduino bootloader but a mercury switch allows the player to shake the box in order to start a roll.

One last note, we made a conscious decision to use the word ‘Dice’ instead of the grammatically correct ‘Die’ which is its singular version. We think ‘Die’ can be a bit too confusing and we’re not the only ones.

17 thoughts on “Electronic dice has option for 20 or 100 sides”

100 sides would mean 3, 7 segment displays. I only see 2. So I assume that this ‘Dice’ includes the number 0? Which to me doesn’t really make sense since this is meant to be a digital representation of a real ‘Dice’ is it not, which can never roll a 0?

10 sided dice are numbered 0-9 and a 100 is always denoted by two 0’s. It’s the only way to make rolling two dice work for getting a value 0-100. He has obviously kept the convention here. Anyone who needs to roll 01-100 probably is familiar with that particular convention.

Or could think even more outside the box and go HEX.
Or be logical since a dice does not have to start counting from zero, that is it only has to have 100 discrete states (sides) so zero can be a prety valid state, no?

A simple trick for random number generation is to start a counter running when the circuit is powered up (a simple variable running between 1 and 100 on a polled loop) and then read the value when the button is pressed. Since the button press timing is ‘random’ so will be the result.

Using an MCU for this project seems like a huge overkill, but I suppose the price of the few extra logic IC’s might justify the use of the atmel processor alone. I don’t think you can justify the use of an “arduino”, at least not from the cost perspective. Makes it easy for other people to duplicate the project, I guess.

@Jake and Daid: I also thought that if the goal is the most efficient use of hardware, this is overkill. But I believe this is a project idea developed with the intention of learning how to use THIS hardware. So that makes it a success in my mind.

I have a broken 7seg (or a 4x7seg) one of the anode lines is broken internally making 1 segment not working for all numbers. A real shame.

I would have made a version with just that display a tiny2313, a button. Packed in a tight space, as the tiny2313 could be behind the 7segments. For software I guess I could fit a selectable number of die and different types, like ‘throw 4d6′ as you can show a d on a 7seg.

So citing a Wiktionary (not even a Wikipedia) entry gives a writer authority to ignore standard English grammar? Try citing an authoritative source that changes the singular usage, die, into the plural, dice. A more careful examination of the entry on Wiktionary reveals that its justification, “that some authoritative sources state that ‘In modern standard English, the singular die (rather than dice) is uncommon. Dice is used for both the singular and the plural’,” is an uncited quotation, and a look at the citations page reveals that every cited usage of the plural form for the singular comes from a British (except for one Canadian newspaper) publisher. Thus, in the most optimistic view, you are trying to substitute standard British grammar for standard American grammar, rather than simply being a lazy writer.

Do me a favour: can you get my fags from the boot of my lorry? (OK, I took a little poetic license with giving a lorry a boot, but that’s what my license is for!)