Some time ago I needed a gift for a friend, who plays DND. So, the obvious choice was self-made dice in the favorite color of said friend. This is how my journey “dice making” began, hence this project.
I bought a cheap silicone mold for dice and epoxy colors from Amazon (d4 to d20). I already had epoxy resin at home. At my first try, the dice were already pretty good, but had too many bubbles inside. So, I spent a lot of time optimizing every step of casting them and finally got them as bubble free as possible. It wasn't until later that I learnt to get them completely bubble free I'd need a pressure pot (I still don't have one, though).
Next, I played with liquid cores in the dice, but that got boring fast.



I wanted to technologize the dice. First, I put wireless LEDs into them, but the light of those wasn't spreading enough. Because of that I added some LEDs to them, which led to some interesting structures. I am not sure if they are still completely fair, but it looks pretty so I won't change that.
But it was still not enough, surely, I could put more technical stuff into it.
And this is where I start:
The project in his humble beginnings
A big thank you to PCBway, as they sponsored this project and I wouldn't
have been able to do this without them. But more about that later.
What if the dice could automatically detect in which position they lay?
And then broadcast this to any device close enough to hear it?
My first instinct was to go with an ESP32, as it supports WiFi and Bluetooth, is relatively easy to set up and I have lots of experience using it.
The downside: it's too big.
If I cast this into the dice, there won't be any kind of connector to charge the battery, that's needed to power the ESP32. That’s why I chose wireless charging instead.
To regulate the voltage for the ESP, an LDO is needed. There had to be space for the sensors. I at least needed a 3-axis accelerometer, but the more sensors fit in there, the more functions the dice could have.
The ESPs start at 4x4mm footprint, I think, so they are already big. And with external periphery, like the antenna or the necessary crystal it's getting even “bigger”, without any external flash or RAM.
So, the ESP32 does not really fit for this project. I researched small microcontrollers with the ability for, at least, Bluetooth.
And I found one: the Renesas DA14531.
It has a size of 2x1.7mm and the ability to communicate via Bluetooth. Only downside: it only has an OTP memory. Once programmed, there is no updating code or changing it. Luckily, it can boot from SPI flash or I2C EEPROM.
It still needs a crystal and an antenna, but even combined those parts take less space than the bigger members of the Esp32 family, and for sure less than the smallest with periphery.
My 'far from perfect' design
As I had zero experience with the DA14531 or Renesas ICs in general, my design is sadly nowhere near perfection and contains some mistakes.
Most of the parts I chose were found by searching for whatever I needed (for example the crystal) on Mouser or Digikey and then filtering by size. The sensors were chosen with the help of ChatGPT. It helped me find out what would fit my project the best or makes the most sense when cast into resin (my PCB could also be used for other things than dice I guess).
I just wanted to cram as much functionality as possible into a very limited area. Which, in retrospective, may have been a mistake to begin with. But that's to be discussed later.
Power supply
After choosing the microcontroller, I focused on the power supply. I somehow had to get power into the dice, without a USB (or any other) connector. My first idea was using NFC and the power it provides. (Funfact: my first idea for this project was, to not use Bluetooth, but instead to use NFC.)...
Read more »
Leon
Xasin
Matias N.
Matthias