Pfad: Home => AVR overview => Applications => Dice ATtiny13
Tumbling dice

Tumbling dice with an ATtiny13

This application describes a cute, real tiny cube, a real rolling dice. It is a small exercise for programming an AVR in assembler and a pretty give-away from those that are knowing how to program and to solder electonic devices and for those that love to play with a die.

The schematic

Scheme tumbling dice Lamp numbering That's all: seven LEDs, seven 100Ω resistors, a 10k resistor for the Reset input, a pushbutton for starting the die and a small swith to prevent the battery from unloading in long pauses between two games, two AAA batteries with a battery case and a 100nF ceramic condensator. All in all parts for max six US-$. On the right the LED numbers in the scheme.

The Software

The software for the timer is listed in HTML format here or as Assembler source code here.

The software works as follows:

Printed circuit board

This is the layout of the PCB.

Printed circuit board layout

Linux users now have an easy life: they open the GIF image with Gwenview, select Printing from the menue, in the print dialog they select Image settings and Enlarge and type in 80 by 50 millimeters, insert a transparent film sheet into the printer and start printing. All others have to downsize the output on their printer in a trial-and-error mode until the image has exactly these margins.

If the sheet is ready, we start to expose an exactly cutted piece of foto-positive-PCB. We can use the sunlight, a UV lamp or the UV exposure device described elsewhere on this webpage to expose the piece. The transparent sheet should be placed on the piece so that the letters on it are read in perfect shape.

The PCB piece is now devellopped in sodium hydroxide solution (12 g per litre). Then the piece is flushed with water and smashed into our favoured etch solution (I prefer iron-III-chloride). Looks really like already consumed, but etches perfect. After a good have an hour this evolves:

Devellopper Etching Completely etched

With a drilling machine the 0.8, 1.0 and 3.0 mm holes in the PCB are excavated. The component side now looks like this:

Drilling Component side

And so the components are assembled:

Component plan

The complete PCB looks like this:

Fixing the LEDs Complete PCB

Now only the batteries are missing.

Battery case

©2012 by