Selfmade Stackmat Display
What's it all about?
I am a Speedcuber, that means I solve Rubiks Cubes for speed. I don't like this thing very much, but the Speed Stacks Stackmat Timer has become the official timing device in the speedcubing community. Speed Stacks also offers a official "Stackmat Competition Display", a big external display extension for the timer so that at competitions, the audience can see the times of the competitor. Unfortunately, this display costs about 100 dollars. Beeing a poor student, this was way too much for me.
So I decided to build one on my own (which can be rebuilt for about 25 to 40 dollars). Here I will present my results. I am sure you will like it! Feel free to tell me what you think (flo at hackvalue dot de).
This is just a small documentation, not a tutorial! I am not going to explain every little detail about how to rebuild it. If you are really interested, read up about some electronics stuff and feel free to ask me by mail. It is not that hard, even it looks very complicated to a beginner, I know. If many people are interested, maybe I will create a FAQ.
Video and Pictures
CG previews / design proposals:
It can ...
- ... be connected to the stackmat timer to display the time, which is shown on the stackmat (in realtime, no delay)
- ... run on an internal battery or a external power supply
- ... calculate averages of saved times
- ... display which hands (left, right, both, none) are on the stackmat timer
It cannot ...
- ... work without a stackmat (at least the software can't, the hardware could! Feel free to rewrite the software!)
What you will need to use it:
- Stackmat cable (3.5mm to 2.5mm (TRS connector) audio cable)
- 9V block battery (or any other battery which gives something between 7V to 20V) or a extern power supply
- nothing else (especially no computer)
Schematics and board layout
I used CadSoft Eagle to design the schematic and board layout.
- Schematic (complete): PNG
- Schematic (controller pcb): Eagle file, PNG
- Board Layout (controller pcb): Eagle file, PNG, PDF, Eagle3D povray top / bottom
The board layout file is my layout which I etched into a printed circuit board. This is not necessary, you can also use a breadboard!)
How to build this thing?
You should be able to ...
- read a schematic
- understand some basic stuff about electronics
Things you will need:
- Atmel Atmega88 Microcontroller (datasheet)
- Maxim MAX7219 Display controller (datasheet)
- Maxim MAX232 Level shifter (datasheet)
- 7805 voltage regulator (datasheet)
- six 100 nF ceramic capacitors
- one 47 µF electrolytic capacitor
- five 1 µF electrolytic capactors
- three 10 kΩ resistors
- five LEDs (power, case light, three stackmat status LEDs)
- resistors for the five LEDs (value depends on the LEDs! Look at the datasheet!)
- optionally an ISP socket for easier software updates
- some kind of Atmel ISP programmer for getting the software onto the Atmel Microcontroller (don't buy a programmer from Atmel! They are very expensive. There are many cheap or easy to build ISP programmers)
- five 7-segment LED displays with common cathode (not common anode!)
- two diodes
- one two-state stereo switch for power selection, one two-state mono switch
- three buttons
Details / possible mistakes:
- connect all ground (GND) pins
- the pin positions of the ICs in the schematic vary from the "real" positions. Have a look at the datasheets!
- ceramic capacitors have no polarity, but electrolytic ones do! That means it is important how you arrange them (thats what the "+" sign in the schematic is for), otherwise the capacitor could literally explode!
- Power safe mode (display auto off if stackmat is removed / turned off or if it's idle), ...
How does it work?
The "stackmat signal" is essentially just a RS232 serial signal (1200 baud, 8 databits, no parity bits, one stop bit). This signal is converted to TTL level (5V/0V) by the MAX232 level shifter IC, so the Atmel microprocessor can understand it.
The payload is transmitted in 9 byte packets:
- 1: command byte as ASCII character ('I','A','S','L','R','C' or ' ')
- 2-6: time in ASCII chars (2:34:56)
- 7: checksum (64 + sum of time digits)
- 8: CR (carriage return, ASCII code 0x0D)
- 9: LF (line feed, ASCII code 0x0A)
- time: 0:25:27
- checksum: 64 + 0 + 2 + 5 + 2 + 7 = 64 + 16 = 80 = 'P' (chechsuk OK)
- 'I': timer initialized and reset to 0 (both hand pads open)
- 'A': timer ready to begin, both hand-pads covered
- ' ': timer running/counting (both hand-pads open)
- 'S': timing complete (both hand-pads open)
- 'L': left hand-pad covered (overrides 'I', ' ', 'S')
- 'R': right hand-pad covered (overrides 'I', ' ', 'S')
- 'C': both hand-pads covered (overrides 'I', ' ', 'S')
Thanks to ...
- ... Alexander 'fd0' Neumann for encouraging me, getting me started with microcontroller programming and for helping me reverse engineer the stackmat signal (I do not own an oscilloscope :-))
- ... Matt 'floater81' Burns for his open source java stackmat display
- ... the World Cube Association for organizing all this great speedcubing events around the world
- ... Lukas Kalkhoff, for creating the CG design proposals in Cinema 4D
I have questions!
Feel free to ask me by mail (flo at hackvalue dot de).