- How to use a max7219 chip to drive up to 8 seven segment LED displays with just a few pins of your microcontroller.
- How to recover from minor flaws in a board.
- Re-purposing parts of obsolete electronics, and make a virtue out of pack-rat-ery.
Remove these ads by
Signing UpStep 1: What you need
You will need the following tools:
- Soldering iron.
- Dremel and/or other tools to cut and shape the enclosures if needed. I used a hobby knife to cut my box.
- Diagonal cutters.
- Hot glue gun (optional).
- Vice or Helping Hands to hold the board while soldering (optional, but highly recommended).
- Multimeter for testing.
- USBTinyISP or other AVR programmer to program the firmware. See step 7 for other options.
| 1- | MAX7219 8 Digit LED driver | -- $10.50 |
| 1- | 24 pin dip socket | -- $0.27 (for MAX7219) |
| 1- | AtTiny2313 microcontroller | -- $1.91 |
| 1- | 20 pin dip socket | -- $0.21 (for AtTiny 2313) |
| 1- | 0.1 uF ceramic capacitor | -- $0.05 |
| 1- | 10 uF Electrolytic capacitor | -- $0.06 |
| 1- | 100 uF Electrolytic capacitor | -- $0.06 |
| 3- | Flat Cable .050 20 COND. 28AWG ROUND | -- 3 X $0.58 = $1.74 (how many inches/feet you need depends on how far apart you are mounting the displays. I bought three feet but probably only needed one or two.) |
| 8- | 3M 10X2 socket (89120-0101) | -- 8 X $1.23 = $9.84 |
| 8- | 3M strain relief for socket (3448-89120) | -- 8 X $0.19 = $1.52 (optional) |
| 2- | 2 X 36 pin break off headers | -- 2 X $1.88 = $3.76 (You are going to break these into 8 different 2X9 pieces) |
| 2- | 9 volt battery connector | -- 2 X $0.44 = $0.88 |
| 1- | LM78L05 5v voltage regulator | -- $0.23 |
| 1- | 9 volt power supply | -- $?? (any 9 volt power supply should work. Optional, but it will save you a lot of 9 volt batteries) |
| 1- | 2 X 3 break off pin header | -- $0.14 (For ISP, same as the 9 row hears so if you buy extra, you can just snap 3 more rows off) |
| 1- | Munchkin counter circuit board | -- ~4.6 square inches = $?? (Depends on how you get it printed) |
| 4- | Munchkin counter display daughter boards | -- ~1 X 4 square inches = $?? (Depends on how you get it printed) |
| 4- | Common cathode 2 digit 7 segment displays (red) | -- 4 X $1.76 = $7.04 (Also comes in Yellow, Green and Blue) |
| 1- | SPST Slide switch | -- $0.79 |
All 5 boards from batchpcb with shipping and handling (setup fee) would be around $40. See the next step for other options.
Other materials:
-
3 (or 4) momentary contact push buttons. They are not included in the list above because (a) I scrounged mine from an ancient control panel and (b) the choice should be an aesthetic one, to go with whatever you are mounting the displays on. Mouser has 812 choices ranging from $0.21 each to $1,438.41.
Personally, I'd stay away from buttons that look like a house payment.
Arcade buttons would make a snazzy choice. - Solder.
- Wire (for connecting buttons)
- Velcro or other means of tidying up loose wires.
- Glue (I prefer hot) to attach bits to your device.
- Small bit of heat shrink tubing.
- The box or other object you are mounting the displays in.
I'll talk about options for getting the boards printed in the next step.

















































Visit Our Store »
Go Pro Today »




If I were to do this project again today, I would probably either use an arduino to simplify the construction or if I were redoing the whole board, redesign it to be arduino compatible.
I love my box and enjoyed making it, but I'd mostly recommend recreating it only if you are interested in process of doing the electronics and fabricating it. Otherwise, (I hate to admit this) the munchkin iphone/android app does the job pretty well and takes up a lot less space on the table.
I have not tried it, but I think mostly you can use avr gcc conventions inside Arduino, like defining function prototypes and using the port notation, and it will still work.
I'm pretty certain you are correct. I believe the arduino IDE actually calls an included copy of AVRdude, so it's not that far away. I'm not sure what else it does before it sends the sketch to AVRdude besides automatically include some libraries, but I often find that when I can't figure out how to do something with the arduino libraries, the answer will be on the AVR forums.
I haven't tried it yet, but apparently you can go the other way and extend the arduino IDE to let it work directly with attinys. http://code.google.com/p/arduino-tiny/