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

  1. 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?

  2. 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.

  3. 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?

    ps:cs computer student here ;-)

  4. 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.

    Nice project btw :)

  5. 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.

  6. Overkill? The MAX7219 isn’t really needed. As well as the XTAL (AVR can run on internal oscilator with easy for a project like this) and the AVR can be smaller (ATTiny2313?)

    I still have a 4x7segment display… guess I’ll be proving my point a bit later. Let’s see if I can get on HAD with real fancy dice then.

  7. @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.

  8. @Daid
    I’m not sure what you mean, you have a broken 7 seg. or you don’t like the fact that they have spaces between numbers?

    Pretty cool di(c)e. Next up a nixie tube version?

  9. 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.

  10. Overkill? Hell yeah it was.. but really, I needed to get rid of some of the parts that I have. I’ve gotten a half dozen MAX7219s from free samples, and the AVR is always removable.

    As far as the random generation, its the built in Arduino random function. I have it seeded to an open analog pin reading, otherwise it will always be the same “random” when you power it on.

  11. 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!)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.