Fully IR Customizable Electronic Set of Eight Dices

6,876

113

23

Introduction: Fully IR Customizable Electronic Set of Eight Dices

About: I am a professor at the Faculty of Sciences of the National Autonomous University of Mexico. I teach Computational Physics and Basic Computing. My students and I have a lot of fun with Arduino!

In collaboration with J. Arturo Espejel Báez.

Now you can have up to 8 dices from 2 to 999 faces in a 42mm diameter and 16mm high case! Play you favorite board games with this configurable pocket-size electronic set of dices!

This project consists of a pocket-size electronic set of up to 8 dices. The number of faces of each of them can be set from 2 to 999 by an IR remote control and stored in the internal EEPROM memory.

For this project we used an Arduino pro-mini, a microcontroller board based on the ATmega328.

The representation of the dice is selected automatically. For a 6-sided dice, the number is represented with dots as a classical dice (with square faces). For the 12-sided case, the number is presented within a pentagon, and for the 20-sided case, the number is presented within a triangle. For the rest, the number is presented inside a box. Also, the 3-faces dice can be presented with two different forms: as the "paper, rock, scissor" game and with the number. Also, for the two-faced dice, we represented it with thump up/down.

Supplies

For the Dice Set:

  • Arduino pro-mini
  • SparkFun USB to Serial Breakout - FT232RL
  • SSD1306 I2c 0.96" 128x64 OLED Display
  • Vibration Sensor Module J34 Knock Switch Spring
  • 3.7V 300mAh Lipo Li-polymer Battery
  • Infrared IR 1838B module of control remote wireless kit
  • 3D printed case (2 parts, please find the STL links)

For the Charger:

  • Two pieces of PCB; 17x10mm and 13x18mm
  • 3D printed case (2 parts, please find the STL links)
  • Micro USB 5V 1A TP4056 Lithium battery charger module

Step 1: The Circuit

Step 2: Place the Charger Contacts

Take two wires from a male header pin connector. Fold each one forming a hook as in the first photo. Insert one in the lateral side of the display case, and the other in the bottom lid as shown.

Step 3: Mount the Arduino and the Vibration Sensor

Place and glue the Arduino and the Vibration Sensor to the bottom lid (3D printed). Solder a wire from one connection of the sensor to the Arduino's GND, and other wire from the another connection of the sensor to PIN D12.

Step 4: Mounting the IR Receiver

Remove the metallic cover of the IR sensor. Fit and glue it to their place in the case as shown.

Step 5: Wiring and Mounting the Display

Solder a wire (of about 4 cm) to each contact of the display and glue it into their place in the case (as shown in the first photo). Solder another wire from Vcc pin to the charger contact in the lateral side of the case (as shown in the second picture).

Step 6: Wiring the IR Receiver

Cut the IR pins to 2mm approximately. Then, solder one wire from IR's Vcc pin to the display's Vcc contact, and another from IR's GND pin to the display's GND contact. After that, solder a cable from IR's signal pin to the Arduino's pin D10.

Step 7: Wiring the Display to the Arduino

Solder the SDA cable from the display to the Arduino's A4 pin, and the SCK cable to the A5 pin.

Step 8: Wiring the Switch

Solder two wires to the charger contact in the bottom lid. Solder one of these wires to the central pin of the switch and the other to negative terminal of the battery. Solder a third wire from the top pin of the switch to the Arduino's GND pin.

Step 9: Wiring the Battery

Solder the positive terminal of the battery to Arduino's Vcc pin. Cover the Arduino with isolating tape. Close and glue the pieces of the case.

Step 10: Programming

For upload the programs with the Arduino IDE, connect the the FT232RL programmer to the computer with an USB cable. Insert and hold their pins in the Arduino's holes as shown.

You must select Arduino pro or pro mini in the Arduino IDE (for more information, you can check https://www.arduino.cc/en/Guide/ArduinoProMini).

First upload the DiceEEPROM.ino sketch in the Arduino for prepare the EPROM memory with the default configuration of the dices (the upload of this sketch apparently has no effect in the display). Then upload DiceIR.ino sketch. After this, a set of dices will appear in the display.

Step 11: How to Use It

To roll the dices, simply shake the device.

To change the number of faces configuration, point with the remote control and press "OK" button while the dices are rolling. A screen like in the second photo will apear. Use the left and right arrow buttons to select the dice to configure. Press the up or down arrow buttons to change the number of faces by 1; use the "1" or "4" buttons for change in 10, and "2" or "5" buttons for change in 100. Press "OK" button again for exiting the configuration mode. The configuration will stored in the internal non-volatile memory and can be changed any times as you wish.

Notes:

If you select...

    • a zero faces dice, this dice will not appear.
    • a one face dice, the result will be represented with "paper, rock, scissor" icon.
    • a two faces dice, the result will be represented with thumb up/down icon.
    • a 6 faces dice, the number is represented with dots as a classical dice (with square faces).
    • a 12 faces dice, the number is presented within a pentagon.
    • a 20 faces dice, the number is presented within a triangle.
    • any other number of faces, the result will be presented as a number inside a box.

    Step 12: Charger I

    Cut two pieces of PCB of 17 mm x 10 mm and 13 mm x18 mm. Drill a hole in the small piece that matches with the hole in the round 3D printed part, pass a wire through and solder it. Glue the PCB as shown in the photo.

    Step 13: Charger II

    Solder a wire in the 17x10mm PCB piece and pass it throw the slot in the 3D printed part. Glue it as shown.

    Step 14: Charger III

    Fit and glue the 3D printed parts as shown and solder the wires to the battery charger module. The wire soldered in the bottom part is the negative. Now you can charge the device's battery with a mini USB cable.

    Pocket-Sized Speed Challenge

    First Prize in the
    Pocket-Sized Speed Challenge

    Be the First to Share

      Recommendations

      • Make it Fly Challenge

        Make it Fly Challenge
      • DIY Summer Camp Contest

        DIY Summer Camp Contest
      • Fruit and Veggies Speed Challenge

        Fruit and Veggies Speed Challenge

      23 Comments

      0
      aledaniel1
      aledaniel1

      Question 23 days ago

      I made your project but when I point the remote control and press Ok, while dices are rolling, I can't get the next screen, why ?
      P.S: I finally found out the issue, it was the remote control.

      0
      raul7321
      raul7321

      Reply 3 months ago

      Great! Thanks for the cedit. It's a big improvement!

      0
      GabbytheLizard
      GabbytheLizard

      12 months ago

      I want to make this but am not sure where to get the supplies. Do you by any chance have links to where you got the things, or a recommendation on where to go?

      0
      raul7321
      raul7321

      Reply 12 months ago

      0
      GabbytheLizard
      GabbytheLizard

      Reply 12 months ago

      Thank you so much, Raul! I look forward to possibly making this project!

      0
      raul7321
      raul7321

      Reply 12 months ago

      0
      GabbytheLizard
      GabbytheLizard

      Reply 12 months ago

      Thank you again!

      0
      Gursimran Singh 425

      Liked the way you made charging dock :-).... Btw great project!!

      0
      raul7321
      raul7321

      Reply 1 year ago

      Hi! Thanks! We are very motivated by your comment.

      0
      ihart
      ihart

      1 year ago

      Really nice Instructable. I like how you combined, hardware, software and 3D printing design to make a cool object.

      0
      raul7321
      raul7321

      Reply 1 year ago

      Hi! Thanks! We are very motivated by your comment.

      0
      GabbytheLizard
      GabbytheLizard

      1 year ago

      This is soooo cool!!!!

      0
      raul7321
      raul7321

      Reply 1 year ago

      Thank you so much! I saw your designs and they are great!

      0
      GabbytheLizard
      GabbytheLizard

      Reply 1 year ago

      Thank you! If you have any suggestions for how to make them better, let me know. :)

      0
      Build_it_Bob
      Build_it_Bob

      1 year ago

      Hi Raul,
      Very nice project...I love how you modified the Compass case to make this build.
      You are creative and multi-talented.
      Bob D

      0
      raul7321
      raul7321

      Reply 1 year ago

      Hi! Thanks for you comment! In fact, my idea is to make a collection of several pocket devices with the same case. Hope you'll like them!

      0
      Build_it_Bob
      Build_it_Bob

      Reply 1 year ago

      Hi Raul, I do very much like the idea.
      I am just learning to use Fusion360, so seeing modifications helps get a better idea of what can be done...and how it can look with some creative planning.
      I will be following your journey!
      Bob D

      0
      raul7321
      raul7321

      Reply 1 year ago

      Thanks! Let me know if I can help you!

      0
      smbrown
      smbrown

      1 year ago

      Great work. You are talented and this is useful for places where dice are not convenient such as camping.