Polyhedral Nixie Die calculator / roller w touch screen.

Ninefingers

First Post
Hello all,
I have finally finished my prototype Nixie Tube polyhedral die roller / calculator. I was inspired to start this project while playing 5E with friends, one of whom suffers from serious physical limitations, and must use an app to roll dice. First thought on apps rolling dice....boring! I had been wanting to build something using Nixie tubes for some time, however everyone already had a clock or thermometer etc, etc. Then BANG it was like being hit by a lightning bolt thrown by a pissed off sorcerer. I needed to build a die roller and use the tubes as the display.

As a quick intro, I am not a programmer, or an electrical engineer. I had made it through chapter six of the Arduino beginners guide before tackling this, so please be easy on me if you review my code, which is open sourced at github, (https://github.com/9fingers/Nixie_Die_Calc) along with the STL models for the case, and wiring schematics. The core of the system is an Arduino Mega 2560, and I purchased an off the shelf high voltage power supply from http://nixieclock.org for the tubes. Also a quick thank you to Nathaniel Burger for the early assists, and taking the time to show me some simple functions to make this project easier.

HVDC Power Supply:
y95zAjCl.jpg


Tubes were purchased on EBAY along with the driver chips, I used the IC 74141 chips on this project.

IN-18 Russian Tube.
dngVbCgl.jpg



This HVDC supply requires a minimum of 12 volts DC to operate correctly, and the Arduino Mega 2560 claims to be able to handle a 12VDC input, however what we learned (thanks Elliot Due) was that the Arduino heated up to a point of triggering a thermal shut down at about 120C. SO I hacked in a 12-USB car charger (operates at 5vDC) into the 12VDC supply to power the Arduino, and used the 12VDC to power the high voltage supply. By the way BE CAREFUL this HVDC supply generates 180VDC, it will hurt you!.
EybwYR2l.jpg





It started as a simple seven die (4,6,8,10,12,20,100) roller, and then well as my wife puts it "Over the Top Jay" happened. I just couldn't stop, I was learning so much about coding, and having so much fun it just grew into what it is now. By the way if someone wanted to take the time they could configure it for other platforms such as Pathfinder, or D20 Modern etc, but that will be a different story.

On my first attempt I planned on using mechanical buttons, with keys like a typewriter, however this posed many challenges, such as cost, and space, and the physical abilities of the end user. Unfortunately for me I did not think of this until AFTER I had the first prototype done. would that be a failed perception roll, or insight?

Proof of concept of mechanical buttons Image:
vlp4pB2l.png


Along with the mechanical buttons I used a TFT display for the user readout. Again looks like hell, but steadily making improvements.


So now its time to start researching which touch screens will work best. Trust me when I say ask a lot of questions BEFORE making a purchase, I now have 4 different TFT screens I am not using.
I finally decided on a "5.0" 40-pin TFT Display - 800x480 with Touchscreen" from Adafruit along with an RA8875 driver.
https://www.adafruit.com/product/1596
https://www.adafruit.com/product/1590

As stated above the first touch screen iteration was just rolling dice. But it looked like hell, and needed more functionality. It worked, but gah, might as well keep using the iPad.
First attempt at the touch screen interface image:
iTAqzJwl.jpg





In addition to a cleaner looking UI I also wanted to allow character stats to be loaded via an SD card to avoid having to plug a laptop into it and rewrite the firmware in order to make changes. Now all you have to do is simply edit a text file on the SD card, insert, reboot, done.
SD Card reader Bottom right of the picture:
XWPiGIbl.jpg




So what features were added to the die roller? Thought you would never ask, and by the way learning how to map sub menus on a touch screen for the first time is not easy, it was like trying to live through the first two levels of a new 5E character!


  1. generates a random seed on boot based off of an unused analog pin voltage read.
  2. displays rolls on the touch screen
  3. displays rolls on the Nixie tubes.
  4. Supported user variables / modifiers imported VIA an SD card.
    (Code credit for SD card reader (http://overskill.alexshu.com/saving-loading-settings-on-sd-card-with-arduino/)) Thank you.
    1. Character Name
    2. Attack 1
    3. Attack 2
    4. Attack 3
    5. Initiative
    6. AC
    7. Strength
    8. STR Save
    9. Dexterity
    10. DEX Save
    11. Acrobatics
    12. Slight of hand
    13. Stealth
    14. Constitution
    15. CON Save
    16. Intelligence
    17. INT Save
    18. Arcana
    19. History
    20. Investigation
    21. Nature
    22. Religion
    23. Wisdom
    24. WIS Save
    25. Animal Handling
    26. Insight
    27. Medicine
    28. Perception
    29. Survival
    30. Charisma
    31. CHA Save
    32. Deception
    33. Intimidation
    34. Persuasion
    35. Hit Poionts
  5. Hit points and AC can be modified on the touch screen for HP tracking.
  6. can roll multiple die of the same or different types and sum the sub totals.
    1. 4-D6 + 1-D4, or add 1D4 to your attack roll (Blessed)
  7. roll advantage or disadvantage rolls
  8. dynamic modifier can be added on a per roll basis if needed.
  9. cursor tracking to avoid over lapping text. (Thank you Cody Tappan, for this and the touch mapping fix.)


So on system boot you get a nice little personalized message, and all of your player stats loaded.
2zBUYuHl.jpg


Please pardon the burned out LED, I failed my intelligence roll and hooked it up to the wrong voltage.
yLivFezl.jpg



I used Fusion 360 to model the prototype case, and printed it on a Flash Forge Inventor 3D printer. Again this is just the prototype, to see if the angle of the screen fits the user and so we can play test it to make sure there are no math errors, or other bugs. Once this step is complete we plan on printing the head shown below to house it in. The tubes will be three front teeth and a 4" plasma ball will be mounted in the back of the throat like a lightning ball. Of course the head will be painted as a Blue Dragon.

Dragon head (Thank you Eli Delia for modeling this for us).
dFXuSk5l.png




[video=youtube_share;73BatHcnyPM]https://youtu.be/73BatHcnyPM[/video]


You can watch videos of different variations and milestones here:
https://www.youtube.com/channel/UCVXo1nLTN1cbVEYvZ9QRrrA

Full image gallery here:
http://imgur.com/a/8SWZ0



I will post updates on the final build as they happen. I hope someone else can use my code on another project, I would love to see variations of this.

Hope you enjoy it,
Ninefingers

 

log in or register to remove this ad

Remove ads

Top