If you don't feel like gathering all stuff yourself, you can buy a kit with all needed parts and a pre-programmed microcontroller at the Tinker Store.
Step 1: Parts and Tools
- ATTINY2313V-10PU, microcontroller, 2 k flash RAM, Digikey
- LEDMS88R, 8 * 8 LED matrix, Futurlec
- Battery holder with switch for two AA batteries, Digikey
- 2 AA batteries or rechargeables
And as you see, there are no resistors. Normally you would need a resistor to limit the current through the LEDs. We are a bit adventurous here and attach the LED matrix the Evil-Mad-Scientist-way directly to the controller. The controller enables only one row at a time and cycles thru all rows that fast, that a steady image emerges.
With two AA batteries the display ran over two weeks non-stop. Battery life depends a bit on how much pixels are lit at the same time.
To build it, you need:
- Soldering iron and solder
- Wire stripper or knife
- Alligator clips
- Third hand (optional)
Step 2: Prototyping on a Breadboard
I used a breadboard to test the circuit and to try out new messages or animations. The controller on the breadboard is powered by the programmer with 5 Volts. That's the reason for the 100 Ohm resistors. These are only needed on the breadboard.
Please note, most of the time you need current limiting resistors for LEDs. Only in very special cases you may drop the current limiting resistor. Otherwise you may destroy the LED.
Attached is a zip that contains the source code and a Makefile.
Update May, 7th, 2009: If you have compiled it on your own and it won't fit on the ATtiny2313 (avrdude complaining about address 0xXXX out of range), then please try an older version of avr-gcc. Version 3.4.6 works fine for me. If you are using WinAVR, then look for WinAVR-20060421-install.exe.
Step 3: Prepare the Controller
Take the pliers and bend the pins slightly up. Afterwards, all pins should be somewhat aligned.
Step 4: Prepare the Display
Now take the matrix display and bend its legs as well. You can use a piece of plastic to bend the legs over it. That may make is easier.
Step 5: Attach the Battery Cables
Now take the cable of the battery case and wrap them around one of the middle pins. Insert the cable on the top side of the matrix. The bottom is marked with an inscription (NFM-12883AS-11), in this picture on the right side of the matrix. Make a simple knot around the pin. That serves as strain relief. Strip the black wire a bit.
Step 6: Align the Display With the Microcontroller
Fix the the controller in place with alligator clips. Place it on the matrix so that there are two pins on the top and on the bottom, that are not attached to the matrix. This can be a bit tricky. Maybe you have to realign some of the pins. There is a small notch on the microcontroller. That notch has to point to the left.
Step 7: Solder It
Now solder two pins, one on each side.
Then remove the alligator clips and recheck the alignment of all pins. If all fits, solder the rest of the pins.
Last job is to hook up the battery cables. Form tiny hooks on the end of each cable. The red one connects to pin 20, the top right pin. The black cable connects to pin 10 at bottom left side.
Step 8: Insert the Batteries
And that's it. Insert two AA batteries or rechargeables and switch it on. Every time you switch it on, it displays another one of the preprogrammed animation or text messages.
You're done. Hope, you enjoyed it.