Close

RGB Dice prototype

A project log for Electronic Dice

A set of smart dice, the same size as traditional ones, full of LEDs and Bluetooth-enabled.

Jean SimonetJean Simonet 02/04/2018 at 22:471 Comment

Hey all,

I finally finished the second board for the Dice, the full RGB one this time! It's pretty awesome already! I don't have a flexible PCB version yet, but this here is a prototype board.

Those APA102 2x2mm look really awesome!

---------- more ----------

Of course I had to make a few changes to the schematics and the case design. For starters, I replaced the Linear voltage regulator with a switching one. Switching voltage regulators are much more efficient than linear ones (which end up mostly dissipating the voltage difference between the input and the output as heat) but they require a few more supports components, not least of which is a decent inductor.

Fitting all the components inside the case was also another level of Tetris mastery. The reduced size combined with the more aggressively rounded corners left me with very little room to fit everything. At this scale, even deciding where to put the folds is a major consideration, as a 1mm or 2mm bending radius will mean that that edge of the board can't be as long and there won't be as much room for components. In fact, fitting the Simblee chip on the board was almost impossible.

(The hatched areas are either bends or another component poking through to this face)

Then, of course, there are the APA102s. Because these are typically 5V devices, I wasn't sure if they would accept a 3.3v logic level. I knew they could be run on 3.7v, there is evidence of that all over websites like Adafruit, but I wasn't sure about 3.3v logic... In the end, I found out that they work just fine. They are, relatively speaking, huge though. Compared to the previous LEDs (that used a 0603 footprint) they are really thick, an ENTIRE MILLIMETER! :) I laugh, but at my scale, I couldn't afford to pull the PCBs inward any more, and so I had to make cutouts in the case to accomodate the LEDs.

Eventually I submitted a new prototype board to my favorite PCB house, Oshpark. The board came back, and I proceeded to try and assemble it by hand. It's funny, after you've soldered a bunch of 0402 resistors, a 0603 looks positively huge! :) I used a combination of techniques to do this, sometimes applying a bit of solder paste over all the pads, and then letting the solder flow to the chip pins as I heat it. It works surprisingly well.

I made a few bozo mistakes of course, most notably on the APA102 footprint and regulating inductor. First I dimensioned the regulator for a 2.2nH instead of the required 2.2uH, only 1000 times too small :)

The APA102s were somehow completely wrong, but in a rare stroke of luck, I was able to get them connected correctly by rotating them 180 degrees and flipping the clock and data pins. So, so lucky, but then again, that's exactly why I made a prototype board before sinking a bunch of money into flexible PCBs. But hey, they work, and OMG they look so nice. I can't wait to get the final boards made. I did notice a couple things in the process though.

The first is that the actual LED elements (the R, G and B) are not actually centered on the chip, but offset to one side.

This means that if I want the light to be correctly in front of the number dots, I'll need to shift the component positions slightly here and there. Of course because space is so limited, that in turns means that there are certain component orientations that I can't support, specifically next to the bends in the PCB.

The other is related to the fact that  I power the LEDs directly from the battery in order to keep their supply voltage as high as possible (3.8v instead of the logic 3.3v of the rest of the board). It works great, except that it means the LEDs are CONSTANTLY powered, even if they are not technically turned ON. This has 2 side effects. The first is that they unnecessarily draw a little bit of current even when the die is supposed to go to sleep, which is no good for battery life of course. The second is that sometimes, if a LED is powered but not 'initialized' properly, it may decide to turn ON! That's really not cool because it means that when I try to forcibly 'turn the die off' with a magnet, the LEDs may just stay on forever...

Fortunately, that's something we can fix with a very-low-dropout transistor! In fact the same magnetic switch that will turn the voltage regulator off will now also turn off the power to the leds. Great!

Wireless charging is still a bit tricky too. Since I picked a chip that follows the Qi standard, I thought I'd be able to use an off-the-shelf charger, which would be great moving forward. Unfortunately, at first it just didn't work. Poking through the different signals with my scope, I finally figured out that the voltage on the receiver coil just wasn't high enough to turn the chip on. I replaced the coil with a much larger one, stolen from a known working receiver I bought from Adafruit, and low and behold, the connection worked! The problem was obviously a poor coupling between the two coils, which in a way made sense. The transmitter coil was so much bigger than the receiver that most of the magnetic flux was wasted.

Looking for a solution, I stumbled upon an application note from Wurth that specifies which transmitter coils work best with which receivers, and guess what? The transmitter coils compatible with my receiver are way smaller than the one in this charger! I now have some new coils coming in the mail so I can try a few different combinations and see what works best!

In the interim, I tried replacing the transmitter coil with one of my receiver coils, and it sort of works. The two coils (transmitter and receiver) have to be very, very close together to get a good enough power transfer to start the charging circuitry, but it works. Here's hoping that the proper matching coils makes it that transfer works from a few millimeters aways, that's all I need really!

Finally, I've been testing out if and how I can paint the cases. The difficult part is that I need a way to leave unpainted areas in front of the LEDs. It looks really nice when only the dots light up, not the entire plastic case. I imagine I'll probably make a hundred or so dice in this next batch, so that I can have some for other people to develop for, and so I don't really see myself painstakingly hand painting each die like a miniature. I need a process that is fairly fast, accurate and repeatable. What I've settled on, although it needs a bit of refining, is to print the cases with raises number dots. That way I can paint over the entire thing and then sand the face back down such that the dots are transparent again. I am still sorting out how many layers of paint I need, as well as what kind of paint to use in the first place, but I think I'll get there. Here is a test that mostly worked out!

So as you can see, things are moving along. There is still a lot of work to be done, of course. I think I'll pretty soon need to make a carrying case that will double up as a charger, sine it looks like off-the-shelf chargers won't quite work. That will be another whole thing, of course!

And obviously, I still need to create a GOOD game that takes advantage of the dice :) With the RGB dice coming soon, I am thinking of something centered around elements (fire, water, earth, etc...), where each die represent an element, and you pick and roll the dice you want to cast spells to defeat monsters. It'll be fun!

Discussions

Ian Liddle wrote 04/19/2018 at 22:00 point

I love this project. Have you played House of Borgia? (https://boardgamegeek.com/boardgame/166569/house-borgia) It's got a really nice mixture of liar's dice + secret identity. Something like that using dice like this could be really interesting!

  Are you sure? yes | no