Published:2011/8/2 21:29:00 Author:Phyllis From:SeekIC
By Paul Goossens
Three-dimensional electronics
Projects for electronic dice have previously appeared in Elektor Electronics. Different designs and shapes have found their way into the magazine, but one thing they had in common: they were all two-dimensional dice. But now that is about to change!
Electronic dice are usually constructed on flat boards. To give the impression of a "real’ dice, seven LEDs are often used in a pattern similar to that on a dice. The original intention was to base this circuit on a traditional ’flat’ design, until somebody from the editorial staff suggested that you should really be able to throw a dice. After all, a dice is not an item that lies still on the table.
’But that is the advantage of an electronic dice!’ you’ll say. You don’t need extra space to throw it and it won’t roll off the table either. And this was exactly how our design staff reacted to this unusual suggestion. But the editor was adamant: this dice has to roll!
Fortunately the team at Elektor Electronics handles such situations smoothly and it wasn’t long before the labs were prepared to have another look at it.
It didn’t take long before the first ideas were put on paper. One obvious design for an electronic rolling dice is to mount LEDs onto a cube, showing the proper value on every side. The LEDs are driven via current limiting resistors from a 9V battery and Bob’s your uncle! It quickly became apparent that with a homemade dice it was extremely difficult to get the centre of gravity exactly in the centre. Such a dice would therefore have a bias. The chance that the lightest side ends on top is greater than for any of the other sides. The value on that side will therefore occur more often than the value on the ’heavier’ side.
How else?
After some more thought we came to the conclusion that a dice with seven LEDs on every side was the best option. After throwing the dice, the six sides would each take on a different random value. In this way you can guarantee that the dice is completely ’honest’.
This solution does require a bit more electronics. First of all, you have to detect when the dice is in the process of being thrown. For this we used a mercury tilt-switch. This also makes it possible to ’roll’ the dice just by shaking it.
The electronics then has to generate the random numbers that appear on the six sides of the dice. The use of a microcontroller comes to mind straight away. This keeps the circuit relatively small, which comes in handy for a dice. Another part of the design that required some thought is the method used to connect the boards together. It doesn’t look very nice if dozens of connections go from a main PCB to the other five boards. To keep the number of connections down we’ve chosen serial connections between the boards. On every board a shift register takes care of driving the LEDs. This way only four connections are required: two lines for the supply, one for data and the fourth for a clock signal.
Another area that needs to be considered is the current consumption and on/off switch. In this design a standard switch can’t be used of course, because nothing may protrude from the dice. It would otherwise roll very strangely and at worst switch itself off. We got round this problem with the addition of a (recessed) push-button to turn the circuit on. It is turned off completely automatically.
Reprinted Url Of This Article: http://www.seekic.com/blog/project_solutions/2011/08/02/Rolling_Dice__(1).html
Print this Page | Comments | Reading(322)
Author:Ecco Reading(32820)
Author:Ecco Reading(3526)
Author:Ecco Reading(3246)
Author:Ecco Reading(3801)
Author:Ecco Reading(5331)
Author:Ecco Reading(3315)
Author:Ecco Reading(3462)
Author:Ecco Reading(3604)
Author:Ecco Reading(4009)
Author:Ecco Reading(3807)
Author:Ecco Reading(3748)
Author:Ecco Reading(3780)
Author:Ecco Reading(6094)
Author:Ecco Reading(3764)
Author:Ecco Reading(4579)