PROJECTS: THE BRAIN MACHINE
makezine.com/10/brainwave
1e. Create a folder on your computer called slm. Download the firmware for
MiniPOV from the MiniPOV website into the slm folder and unzip it. Using a
text editor, open up the mypov.c file, and change the pattern in the image array
(near the top of the file) to the pattern at right. Since a 1 will light up an LED
and a 0 leaves it off, this will create a pattern on 4 LEDs that looks something
like “VVVVV” when you wave the MiniPOV back and forth through the air.
Switch off the MiniPOV’s battery pack, plug the MiniPOV into your computer’s
serial port, and switch it back on.
B8(10000000)
B8(01000000)
B8(00100000)
B8(00010000)
B8(00100000)
B8(01000000)
1f. Compile and program the microcontroller by following the instructions on
the MiniPOV website for your operating system. Under Windows, you’ll enter
the following (at right) into a command window. Turn the MiniPOV power pack
off and unplug the PCB from the serial port. Switch the power back on and the
4 LEDs will light up. Wave it around, and behold the VVVVV pattern you just
programmed in!
> cd slm
> del mypov.hex
> make mypov.hex
> make program-mypov
NOTE: make mypov.hex compiles the code into a hex file that the microprocessor can run,
and make program-mypov uploads the hex through the serial port to the microprocessor.
2. MAKE THE SLM CONTROLLER
2a. Download SLMfirmware.zip from makezine.com/10/brainwave into your
slm directory and unzip it. Let it overwrite the makefile with the new one if
asked. Program the microcontroller with the new firmware. Follow Step 1e
above to hook it up to your computer. Then compile and upload the firmware
to the micro. The process is identical to Step 1f, but we’re programming slm
instead of mypov. Under Windows, enter the code seen to the right.
> cd slm
> del slm.hex
> make slm.hex
> make program-slm
2b. Turn off and unplug the MiniPOV,
which is now an SLM controller,
although it won’t do much, since we
don’t have any outputs hooked up yet.
Solder the two 1µF capacitors into the
pads for LED3 and LED4. Solder the
two 1k resistors into the pads for R5
and R6. Clip the excess leads on the
back of the PCB.
NOTE: Adding the capacitors and resistors creates
low-pass filters that
smooth out the square
waves into sine waves, for
more pleasing audio.
2c. Cut a 2" length of blue wire for
hooking up the stereo headphone
jack (for ground). Cut two 2" lengths
of yellow wire. Strip 1" off one end of
each wire, and tin.
NOTE: To “tin” a wire
means to heat it up with
the soldering iron and melt
a little solder on it. This
makes it easier to solder
it to something else.
94 Make: Volume 10