Introduction: The Die Tumbler
This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)
The idea behind the die tumbler is a simple one. However, with a modern twist, I decided to construct a die tumbler which not only can mechanically roll the die for the user but also read and display which die face is facing up after the machine has rolled it.
Step 1: Gather Materials
Many components were used to construct this device:
1) 3D Printer (Used to create a majority of the structural pieces)
2) Six tones of paint (Kelly Green, Cyan, Yellow, Blue, Pink, and Red)
3) 5V DC Step Motor
4) Arduino UNO Board
5) YwRobot Arduino compatibility chip (LCM1602 IIC) w/ QAPASS LCD Display
6) 3 1/2" X 2" breadboard
7) Pixy 2 Color Coordinated Camera
8) USB to printer cable
9) Assorted wires and cables (Female to female & male to male)
Step 2: Begin Printing Components
3D printing all the components necessary to build this project is a time consuming ordeal, but worth it once the end product has been achieved. The parts to be printed are as follows:
1) Tumbler Cage (Dimensions: 3.75" X 3.75" X 4")
- This unit will house the tumbler paddle used to roll the die
2) Breadboard Cage (Dimensions: 2.4" X 3.3" X 0.9")
- This unit will hold the breadboard housed inside the circuit assembly box
3) Circuit Assembly Box (Dimensions: 3.9" X 3.75" X 3.75")
- This unit will hold all vital circuit components used in the project
4) Circuit Assembly Box Lid (Dimensions: 3.75" X 3.8" X 3.8")
- The circuit assembly box will have a removable lid to allow easy access to the electrical components of the project
5) Die Capture Tray (Dimensions: 3" X 1" X 3.75")
- This unit will be used to contain the die after it has been rolled by the tumbling mechanism
6) Die Slope Case (Dimensions: 3.75" X 3.75" X 3.75")
- This will be the structure that causes the die to be propelled towards the die capture tray
7) Slope Case Ramp (Dimensions: 3.62" X 0.1" X 4.4")
- This unit will help the die slope case achieve it's goal of positioning the die under the Pixy camera
8) Die (Dimensions: 1" X 1" X 1")
- This is the object that will be painted on all six sides to facilitate a colored die
9) Spin Paddle (Dimensions: 2.5" X 3.25" X 2.5")
- This is the device that will tumble the die and eventually place it down in front of the Pixy camera
Step 3: Assembly of 3D Parts
Once all 3D parts have been constructed, one can begin to assemble the die tumbler case together. Set aside the circuit assembly case for that will be wired later on to allow ease of access to the box. Much of the components in this project can simply be held in place with concrete glue therefore no screws are needed.
1) To begin, connect the die capture tray and die slope case together
2) Position and secure the ramp inside the die slope case (this piece can actually just rest inside the case and no adhesive is needed)
3) Then, position the tumbler cage directly above the die slope case and secure it with glue.
4) Drill a 1/4" hole in the center of one of the faces of the tumbler cage. This is where you will place the DC step motor. The step motor can also be held in place with concrete glue.
5) Once the motor is in place, glue the spin paddle to the end of it. This will act as the tumbling mechanism.
Step 4: Assembly of Circuit Box
For this portion of the project, there are a multitude of ways to position the components inside the Circuit Assembly Box for there is ample room inside it, Therefore, it seems to me most efficient to leave a circuit diagram for the builder to decide how he/she wants the design to be. It is just important to note that one must leave space at the bottom center of the box for the Pixy camera to be facing downwards into the pre-printed hole to allow it to read the die that will inevitably be beneath it.
Now, going into the details of the circuit; The Arduino acts as the hub for all information and signals to be processed. It also acts as the power source for all the components in this build. Beyond that, the DC Step Motor at the bottom right will initiate the entire process of rolling the die. When the button is pressed, the motor will activate for two full revolutions and roll the die into the capture tray. The Pixy camera is represented by the object in the top-right hand corner of the circuit diagram. The Pixy camera will read the die face and send a block of information to the Arduino. This information will be processed and then displayed to the LCD display seen at the bottom left of the circuit diagram.
(Note: Once the Circuit Assembly Box has been fully constructed, the builder may then attach it to the face opposite that of the DC motor of the tumbler case. This will position the Pixy camera above the die capture tray.)
Step 5: Arduino Code
The next thing to make note of now that the circuit and case assembly is complete is the code that will be uploaded to the Arduino to make the entire project operate properly. The script which will need to be uploaded to the Arduino will be provided via the pictures attached to this segment. The script is fully commented and will answer any questions you may have about the code. Additionally, I organized the code by pre-defining functions to decrease the complexity of the code in the main loop.
Step 6: Wrapping Up
One final task you have to do is to paint all six sides of the die different colors with the colors listed in the materials section.
If you have performed all the previous steps, congratulations! You have constructed a die tumbler able to roll and read the die! Due to the extra room in the circuit assembly box, one could potentially make some expansions to this device such as a keypad entry that would allow the user to view previous die rolls or maybe even add a password in order to unlock the system.
I hope you enjoyed constructing this project as much as I did. Have a nice day!