Hackolog
seperator seperator seperator seperator seperator seperator seperator seperator seperator seperator seperator seperator

Considered as a personal light-show to wear after dark is the Hat Hack which employs an AVR ATmega32L microcontroller to provide the control using the normal 40-pin DIL version of the AVR. As seen in the image below, there are two 21×10 dot displays with each made from 6 LED modules and are driven by the project. Prototyping the hardware on a breadboard and doing some very simple software is the first thing to do.

Building The Hat Hack

To keep the number of wires under control and due to the nature of what the LED modules support, the displays are driven as a matrix as shown in the photo below. A shift register built from TTL on each display board which is loaded serially from the AVR is used to handle the matrix that needs 31 signals on each display board. Only 4 signal wires are needed on each display board due to the arrangement of the clock, data, and register control.

Building The Hat Hack

The graphics is made a lot easier because the whole row is treated as a single long variable since the display is less than 32 bits as the software is written in C on the WinAVR environment. SMD components were used in some places including the AVR to get the boards down the required size as shown below. The system includes a microphone and amplifier which feeds inn to one of the A/D ports on the AVR in order for the display to respond to its environment. The display can do things like VU-meters and beat detection, by correlating with some simple signal processing since the AVR only samples up to 9600 samples/s.

Building The Hat Hack

All the firmware and fonts are stored in the PROM while the display strings are loaded into the EEPROM. The programming header and the user interface of 3 surface-mount switches can be seen in the below image. The user interface allows the display mode to be chosen and preferences to be set by editing the strings.

Building The Hat Hack

The images below show the front and rear displays of the hat where all the wiring hidden in the lining. There are various effects for the sound input including controlling the speed the invaders march across the screen. The Text, Invaders, Pong, and Beat Box are the display modes supported by the Hat Hack.

Building The Hat Hack

Building The Hat Hack