A fully autonomus dice-roller for determining if a dice is "fair"
I've spent way too much time on this project, and I no longer believe it serves its purpose, but is a time-waste for me. There is many problems, of which most could be solved easily, but im quite unvilling to at the moment. The major issues are listed below:
- The stepper reset routine is not consistent, resulting in inconsistent lighting(which causes further problems)
- the tresholding alg is simple but doesnt work for certain dice and is incredibly sensitive to lighing
- the current models(found in this Github Repo) are imperfect, due to trashy data(caused by issues above)
- while workable, the code itself is mostly slop.
- collecting data/training for other dice types is a huge pain.
There is 2 distrinct subsystems, the "mechanisim" and the "software", the former is the physical part and the motor controls while the latter is the image-detection pipeline
- the mechanisim must be able to able to roll all standard dice(4,6,8,10/100,12,20) in a way that's similar to how a human would.
- the software must read the dice and record the results(all except D4's)
- The mechanisim should be able to accomodate larger than standard dice
- The mechanisim should be able to roll multiple dice at once
- The mechanisim shouldn't rely on too many actuators less than 2 motors is optimal
- The mechanisim should be mostly custom-made
- The software should support both dice with dots and numerals
- Should also include lights etc. for usage in all env's
- Make the system double-sided for measuring both sides
- add ridges/slopes to the inside to increase entropty or something
- The software should support rolling D4's
- The software should auto-detect the amount of dice rolled and record accordingly
- The software could detect dice size, or maybe it doesnt need to know it at all?
- The dots-vs-numbers could be automatic?
- Could include a magazine and load the dice one set at a time for overnight tests?
- Could Detect multiple dice with different colours and record them independtly?
- Could use a RP-zero-2-w as the processor?
- No custom electronics
- No display/GUI past running scripts
Hardware used:
- Raspberry Pi Camera Module 2
- Raspberry Pi Zero 2 W
- Has a camera port, thats basically the requirement
- Kinda slow but we'll probably run at ~0.5 fps either way.
- € 20
- any arduino board
- easydriver stepper
- LED strip + relay
- The cad is hosted on onshape, Public Link. If you'd like to contribute, let me know!
- Model Training has been done for D6 and D6 with pips, the architecture is there for the rest but i dont have the data yet
This project takes heavy inspiration from the following projects:




