Giant D20 Is A Critical Hit In More Ways Than One

[Mikael Vejdemo-Johansson] is a member of the NYC Resistor hackerspace and an avid fan of a D&D themed improv theatre called The Campaign. To show his appreciation, he decided to gift them a Christmas present: a giant D20. The original plan called for integrated LEDs to burst alight on a critical hit or miss, or let out pulses if it landed on another face. Cool, right? Well, easier said than done.

[Vejdemo-Johansson] figured a circle of 4 tilt sensors mounted on the one and twenty face would be enough to detect critical rolls. If any of the switches were tilted beyond 30 degrees, the switch would close. He mounted eight ball-tilt switches and glued in the LEDs. A hackerspace friend also helped him put together an astable multivibrator to generate the pulses for non-critical rolls.

This… did not work out so well. His tilt sensor array proved to be a veritable electronic cacophony and terribly sensitive to any movement. That and some other electronic troubles forced a shelving of any light shows on a critical hit or miss. [Vejdemo-Johansson] kept the pulsing LEDs which made for a cool effect when shining through the mirrored, red acrylic panes he used for the die faces. Foam caulk backer rods protect as the die’s structure to stop it from being shattered on its first use.

Before The Campaign’s next show, [Vejdemo-Johansson] managed to stealthily swap-out of the troupe’s original die with his gift, only for it to be immediately thrown in a way that would definitely void any electronic warranty. Check out the reveal after the break (warning, some NSFW language)!

Continue reading “Giant D20 Is A Critical Hit In More Ways Than One”

7 LED’s, 2 Pins – Beat That, Charlieplexing

[Tim]’s Dice10 is an exercise in minimalism. Building an electronic dice using an ATtiny10 with code that fits within 1kB is not too difficult. Charlieplexing the LED’s would have used three of the four available GPIO pins. [Tim] upped the game by using just two GPIO pins to drive the seven LED’s for the dice. A third GPIO is used as a touch button input. Besides the ATtiny and the LED’s, the only other component used is a capacitor across the supply inputs.

2 GPIO for 7 LED's
2 GPIO for 7 LED’s

The LED’s are grouped in three pairs of two LED’s and a single centre LED. Usually, Charlieplexed LED’s are connected across pairs of GPIO pins. But his scheme includes connections to the 5V and GND terminals, besides the two GPIO pins. Building a truth table makes it easy to figure out what’s going on.

STATE PB2 PB0 LED's
1     Z   Z   --
2     L   Z   LED 1/2
3     H   Z   LED 3/4
4     Z   L   LED 5/6
5     Z   H   --
6     H   L   LED9
7     L   H   --
8     H   H   --
9     L   L   --

Only the logic states used are listed in the table. It’s possible to add two more LED’s between PB0 and GND and one more anti-parallel with LED9, making a total of 10 LED’s driven by two pins. That’s quite a hack. The important thing here is to have two LED’s in series in the arms that connect to either 5V or GND.

[Tim] has posted  the code and hardware source files on his Github repo, and his blog post has some additional details on how he solved the problem.

If you’re looking for more inspirations on minimal dice designs, check this “PIC powered pair of electronic dice” which uses a PIC 12F629 with five outputs driving a pair of 7 pips to make a dual dice.

1kb-thumb

If you have a cool project in mind, there is still plenty of time to enter the 1 kB Challenge! Deadline is January 5, so check it out and fire up your assemblers!

Automated Die Testing

Are the contents of a Crown Royal bag fair? No, they never are. What about dice? In a quest for good randomness, [Apo] designed and built an automated die tester. Not only does it shake the die up, it captures images so real, actual statistics can be done on each individual die.

The setup is a n acrylic box made with BoxMaker attached to a 3D printed adapter for a stepper motor shaft. Randomizing the die happens exactly like you think it would: a stepper shakes the box, and a camera underneath takes a picture. With a bit of computer vision, this image can be translated into a number, ready for the statistics package of your choice.

There were only 559 rolls before the 3D printed mess of duck tape fell apart, but a test of the distribution revealed this die to have a 92% probability that it is fair. That’s not good.

Creating a cheating die is much more interesting, and to find out if he could do it, [Apo] stuck a die in an oven at 100° C for a few minutes. Surprisingly, the fairness of the die got better, suggesting it’s possible to correct an un-fair die. Putting it back in the oven after that threw the fairness out of the window but there was still no visual difference between this modified die and the original stock die.

ChipKIT Powered Electronic Dice

Electronic Dice Replaces Human Influence

[Will] likes his board games but can’t seem to keep from loosing the dice. He’s been using a dice-rolling smartphone app for a while now and decided that it was time to make a dedicated microcontroller dice roller.

The brain behind the dice roller is a chipKIT uC32 microcontroller. Seven output pins are connected to 7 appropriately-arragned LEDs in the top of the dice. There is only one more electrical component, a momentary switch, that is used to re-roll. When the button is pushed, a random number between 1 and 6 is generated and then displayed via the LEDs in true dice fashion. [Will] wrote his own code for this project and makes it available for anyone to download. The case is 3D printed and was designed in Tinkercad, the files of which are also available. The chipKIT is attached to the 3D printed base by a pair of zUNO clips. Find a short video of this thing in action after the break….

Digging the randomness of the roll but miss the realness of the dice? Check out this real dice roller. Need two electronic dice? Check these.

Continue reading “Electronic Dice Replaces Human Influence”

Hackaday Links: June 29, 2014

hackaday-links-chain

Ever see a really cool build on YouTube with no build details at all? Frustrating, right? That’s us with the NES Keytar covering the Game of Thrones theme. He’s using a Raspi with the sound chip in the NES to do live chiptunes. Freakin’ awesome. There’s also the ST:TNG theme as well.

A few years ago the folks at Oculus had an idea – because of cellphones, small, high resolution displays are really cheap, so why not make VR goggles? At Google IO this week someone figured out everyone already has a cellphone, so just wrap it in some cardboard and call it a set of VR goggles. You can get a kit here, but the only difficult to source components are the lenses.

What happens when you put liquid nitrogen under a vacuum? Well, it should evaporate more, get colder, and freeze. Then it breaks up into solid nitrogen snow. No idea what you would do with this, but there ‘ya go. Oh, [NC], we’re going to need a writeup of that LN2 generator.

About a month ago, the House4Hack hackerspace in South Africa told us of their plans to bring a glider down from 20km above the Earth. They finally launched it, The CAA only allowed them to glide back from 6km (20,000 feet), but even from there the foam glider hit 230kph (124 knots). That’s a little impressive for a foam FPV platform, and we’re betting something with a larger wingspan would probably break a spar or something. Shout out to HABEX.

All the electronic dice projects we’ve seen have one thing in common: they’re not cubes. Thus uberdice. It’s six nine-pixel displays on the faces of a cube, powered by a battery, and controlled by an accelerometer. Yes, it is by far the most complicated die ever made, but it does look cool.

Roll With Dicebot, The Tweeting Dice Roller

dicebot

[David] modernized a 1920’s dice rolling game to bring us DiceBot, a twitter enabled dice rolling robot. DiceBot started with an antique dice tin. The original tin was human controlled. Pushing a button on the side of the tin would spin the bottom, rolling the dice.

It’s a bit hard to push a button from across the world, so [David] added a small motor to spin the tin. He connected the motor to a simple L298 motor driver chip, and wired that up to a Raspberry Pi. The Pi runs a few custom Ruby scripts which get it on the internet and connect to the Twitter API.

Operation is pretty straightforward. A tweet to @IntrideaDiceBot with the hashtag #RollTheDice will cause the Dicebot to spin up the dice. Once things have settled, DiceBot captures an image with its Raspberry Pi camera. The dice values are checked using OpenCV. The results are then tweeted back, and displayed on DiceBot’s results page.

Continue reading “Roll With Dicebot, The Tweeting Dice Roller”

A PIC Powered Pair Of Electronic Dice

[Timothy] is honing his microcontroller skills with this electronic dice project. In addition to giving him an opportunity to work on some code, the use of an 8-pin chip provides a design challenge for driving the twelve pips and providing a user input.

The project started off with some $4 strings of LED Christmas lights. He promptly disassembled the strands, each yielding 100 LEDs. The microcontroller he chose to work with is a PIC 12F629. It’s DIP8 package provides six I/O pins to work with. When examined closely you will find that the pips on a die are always present in pairs with the exception of the center pip. This means that only four pins are needed to drive one die. You can see a pair of transistors above; one is a PNP, the other an NPN. These are both driven from the same uC line, which toggles between the pair of die. This accounts for 5 of the available pins, with the sixth monitoring the push button.