Introduction: Fully IR Customizable Electronic Set of Eight Dices
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.
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.
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.
First Prize in the
Pocket-Sized Speed Challenge