How to Build Your Own DigiDice | Electronic LED Dice

4,994

100

10

Introduction: How to Build Your Own DigiDice | Electronic LED Dice

About: I'm a 16 year old robotics enthusiast from South Africa. I've created a logo and name to represent my projects, Dynagon Robotics. Along with a friend I build robotic creations using Arduino and 3D printing.

Here is an Instructable on how to build a digital dice that uses LEDs as well as an Arduino Nano to generate random numbers and display them in vibrant colours. The housing is fully 3D printed and some circuits have to be custom made. To use the dice, a button is simply pressed and after a quick animation a number will be displayed.

Supplies

Tools:

>3D Printer

> Soldering iron and solder wire

> Screw drivers

> Wire stripper and side cutter

> Scroll saw (Or anything that can cut proto board)

> Rotary tool with cutting disc (Optional)

Off-the-shelf parts:

> 1x Arduino Nano

> 1x Pushbutton

> 7x 5mm LEDs (Choose your favourite colour!)

> Resistors: 7x 220 Ohm; 1x 10 kOhm

> Self-tapping screws: 5x M3x8mm; 3x M3x5mm (Alternatively, use 8x longer M3 screws and cut them to length)

> Machine screws: 6x M2x6mm

> 9V Battery & battery snap

> Small slide switch, mounting holes 20mm center-to-center

Other materials:

> 3D Printer filament (PLA works just fine)

> Strip grid proto board (We will use this to make custom circuits)

Step 1: 3D Printed Parts

First you need to 3D print the enclosure wich will house all the other parts. The STL files are attached to this step. The only part that needs support material is the base.

Step 2: Main Circuit Layout

Now we will create a custom circuit board to seat the LEDs in the right positions, and distribute power among them.

Cut a piece of proto board that has 20 holes in width and 19 holes in height. Drill 3.5mm mounting holes along the center row of solder holes, spaced 36mm apart center-to-center (See picture). Solder the LEDs in the positions as shown in the image. These positions need to be exact as the LEDs need to line up with the holes in the 3D printed enclosure.

Step 3: Main Circuit Assembly

Now build the circuit shown in the schematic above by adding a 220 Ohm resistor to each LED's positive (anode) as well as some wires to connect to the Arduino. The loose ends in the schematic represent wires that connect to the Arduino according to their individual labels. It doesn't matter too much how you place all the components, as long as you end up with a circuit that is representative of the diagram. The photo shows a quick and dirty job I did that worked perfectly.

Step 4: Small Circuit Board for the Pushbutton

Using the same process as before, we need to make a smaller circuit to seat the pushbutton. This circuit will be built on a piece of proto board with an 8x8 hole footprint. Refer to the pictures for the placement of the button and holes as well as the circuit diagram. A 10 kOhm resistor is being used to pull the button's default output to LOW (0 or OFF) by deviding to ground. 3.5mm Mounting holes should also be drilled here, spaced 12mm apart center-to-center.

Step 5: Remove the ICSP Pins on the Arduino

For this step you simply need to desolder the ICSP pins on the Arduino or else it won't fin in the enclosure.

Step 6: Initial Assembly

Next, mount the Arduino Nano to the base using 4x M2 screws. Also mount the two circuits we made to the shell with M3 x 8mm screws using the plastic washers to prevent the screws from shorting out the circuit. The pushbutton circuit has 2 standoffs that it can mount to and the button should align to the cutout button in the shell. You can test it by pressing the button on the shell and listening for a click sound to hear if the button is beign actuated.

Solder one lead from the battery snap to the slide switch so the dice can be toggled on and off later.

Step 7: Final Assembly

Now we will put it all together. For this step, you will need all the components you've made so far, in addition to the 9V battery and the remaining screws.

Install the slide switch into the casing, securing it with two M2 screws with the wires poking through the hole.

Connect all the wires from the two custom circuit boards to their respective pins on the Arduino (refer to the diagrams from steps 3 & 4) , as well as the power connectors from the battery and switch which has to connect to VIN (positive) and GND (negative) on the Arduino. Bring the base and shell together so that the gap on one side of the shell aligns with the USB port on the Arduino. Shove all the wires in until the two parts sit flush agaist each other. Note that the battery snap has to be loosely placed in the battery compartment so that the battery can be easily connected.

Fasten the two parts together using three M3x8mm screws as shown in the photo.

Now simply connect the battery to the snap and slide it into the compartment. Close it off using the battery cover and an M3x5mm screw.

And that's it! Your DigiDice is now fully assembled and ready for some code.

Step 8: Upload the Arduino Code

The final step is to upload the Arduino code attached to this step. You will need to install the Arduino IDE (unless you already have it installed, of course). It can be downloaded here. Connect the USB port on the arduino to your computer. You will notice a cutout in the casing where you can directly plug into the Arduino. Next open the code and select the correct port and board in the toolbar. Once you did that, click the upload button in the top left corner of the screen and the code should upload.

You can now unplug the dice, toggle it on and press the button. It should display a short rolling animation and then a random number. Enjoy!

Microcontroller Contest

Participated in the
Microcontroller Contest

Be the First to Share

    Recommendations

    • Micro:bit Contest

      Micro:bit Contest
    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge

    10 Comments

    0
    TheQubit11
    TheQubit11

    5 months ago

    I got an email showing that I have a comment asking where the +5V pin connected in step 4, but for some reason it's not showing up here... But to answer the question, it connects to the 5V pin on the arduino. All the labels show directly which pin to connect. You asked if it connects to VIN... That is not the case. The VIN is used to power the arduino directly from the source (9V Battery).

    0
    jorrit__
    jorrit__

    5 months ago

    Very cool project!

    0
    Rogerino
    Rogerino

    6 months ago

    Nice project, instead of the push button you could use a vibration sensor switch, just move the dice and the random lights change, what about a double dice in the same box?

    0
    TheQubit11
    TheQubit11

    Reply 6 months ago

    Yes, I have actually considered these options. I decided on the button to keep it accessible and a single dice design to keep it compact.

    0
    The_ccm
    The_ccm

    6 months ago

    This is a nice design, but you could change 9V battery with 2small cr2016 ? Or even One small 1S lipo used for quadcopter , let’s say 200mah , they are really cheap.

    0
    TheQubit11
    TheQubit11

    Reply 6 months ago

    The Arduino Nano has an onboard voltage regulator, so you should be able to use any battery between about 7 to 12V. I'm not going to change the design because the whole thing was built around the idea of using a 9V battery. I you'd like I can email you the F360 source file and you can try to modify it to your needs.

    0
    The_ccm
    The_ccm

    Reply 6 months ago

    You are right I confused with pro mini which has 3.3V version and ldo regulator. Ok for the source files thank you.

    0
    craftisan
    craftisan

    7 months ago

    This is very cool!

    0
    TheQubit11
    TheQubit11

    Reply 7 months ago

    Thank you so much!