How to Use Electronic Dice

When we think of electronic dice, we typically envision some kind of computer-controlled device that will roll a number for us and display the results on a screen. However, it’s not impossible to create a physical electronic dice that will do the same thing — and do it in style. That’s what [Cristiano] has done with this project.

This is a simple yet fun and useful electronics project that anyone with basic soldering skills can tackle. The main part of the project is an LED display that shows a random number between one and six, when the push button is pressed. The display is driven by a microcontroller which is the brain of the dice. It turns the LEDs ON and OFF in a pattern that is similar to that of a standard dice.

The microcontroller is controlled by a mercury tilt switch, so when it is tipped in a certain direction it will stop counting. This is a convenient way to make sure the dice will always start fresh when it’s being used. Once the counter is stopped, the PIC microcontroller will use a combination of its internal random number generator and a seed from an internal timer to produce a number that will be randomly displayed on the seven-segment display.

To keep the circuit running and avoid accidental stopping of the counter, a 1000uF capacitor is used to provide power to the IC 555. When the push button PB1 is pressed for a short period, this capacitor charges up and then keeps the IC 555 switched ON. It then starts providing clock pulses to a counter cum decoder IC 4017, which then begins sequencing its outputs rapidly. Six of the ten possible outputs from this IC are wired to LEDs in order to represent the numbers one through six. Diodes are used to block the current in one direction from other outputs of the IC, so only the LEDs that need to glow are lit up.

Once the output sequencing of IC 4017 reaches pin 5, it will reset. The seventh output from the IC is then given to an LED that will light up, representing the number thrown. The other five LEDs are connected in a matrix to give the appearance of a real dice.

The dice are encased in tough resin to protect the delicate electronics inside, and it’s not just for show. Pixels are built to be rolled, tossed, and thrown (with some care). The electronics are protected by the same process that is used to protect electronics on rockets, so they can take a beating.

Pixels are compatible with a variety of popular dice apps such as DnD Beyond, Roll20, and Foundry VTT. They will also charge conveniently from a USB port when they’re not in use. The project was backed on Kickstarter and is now available for purchase in its own case. It’s a pretty cool way to get into electronics while still being able to enjoy your favorite board games.