Operation
I wanted to be able to generate D&D (and other TTRPG) dice rolls, and random numbers between an upper and lower bound. There is switch to change between the two modes. The three encoders allow you to change details. For dice rolling it is the quantity of dice, number of sides and a modifier. As you turn an encoder, it will switch the nixie tube display to that mode and allow you to change the value. In bounded mode you just need an upper and lower bound, so the middle encoder is not used.
The Teensy is constantly listening to the Geiger counter in the background and filling a circular buffer with 12bit integers. There aren't enough clicks to generate the values for big dice rolls on demand (like a fireball 8d6). So when you click engage, it will take values from the circular buffer and map them to the dice size required then add the modifier.
I added a preset option by clicking left encoder that will let you load a dice preset, I can't show the full dice line on the Nixies (e.g. 4d12+5) so you'll have to have a list of presets handy.
I also wanted to have my DM see the rolls, I decided to add an optional external display. I chose an Adafruit OLED since it's what I had around. The display shows the dice to rolled and the results. It's been helpful to have it around debugging as well.
Randomness
I am reading the time interval between three clicks to generate the random numbers. If the interval between clicks 1 and 2 is bigger than 2 and 3, it's a 1, otherwise its a 0. The bits are combined to make 12 bit integers. I chose 12bits since I'm trying to optimize the clicks I am getting and the dice rolls that I'm likely to make. I'm using the Arduino map() function to map the 12-bit integer to the required size. I let the counter run for a while generating a couple thousand d20 rolls it appears to be random (I gave the data to the AP Stats class in the building to verify).
Design
I'm used Autodesk Inventor for the 3D modeling of the panels, and supports. For the panels I made a 1:1 drawing of the panels exported it as a PDF, that I could pull in to Corel Draw to do the graphics (Corel Draws plays nicely with my laser).
I did the circuit board in Fusion 360, it's my first circuit board, so it was quite the learning experience.
Components
Geiger Counter & Radioactive Source
I purchased a Mighty Ohm Geiger counter, which has an output pin that I can read with the Teensy. For the radioactive source, I choose a test card from United Nuclear since it would sit under the tube and be out of the way. The card generates enough clicks that I'm able to keep the number buffer happy.
Electronics
I chose to use a Teensy 4.1 for it's size and number of pins (I'm currently using around 2 dozen) plus an I2C bus. I decided that I had to make a circuit board to simplify the wiring which quickly got out of control. This is my first circuit board, I plead ignorance on the best practices that I likely ignored.
Nixies
Nixies emphasize retro, and I've always wanted to use them on a project. I chose IN-12s since I didn't wanted to have them on a panel. I am using four IN-12A for the digits and one upside down IN-15A signal tube (i wanted the P (which upside down is a d) and + and - symbols. I was going to use SN74171 chips and level shifters, but then I found the Nixie Tester Driver boards which just simplified everything. I have a 12v to 220v power supply to generate the high voltage. I'm using nixie indicator dots on the knobs, these are switched with transistors.
Uranium Marble & LEDs
I wanted to be able able to have something that looked like it was generating the random numbers. I chose to use a 1" uranium glass marble and 3 UV LEDs around it to generate the glow.
Fit and Finish
I found a bunch of old components on eBay to get the retro look I was going for:
- Hickok model 203 meter to take the case from on eBay.
- 12V DC Cole Hersee Momentary toggle switch
- 3...
Interesting! Makes me wonder how the GM tube RNG is built.
Gives me an idea to get myself two E1T tubes (for the sheer coolness of them) and make a configurable multi-sided die.