Hardware Reference
In-Depth Information
This shows the view of the board looking from the top or component side. The dotted lines
indicate the copper strips on the underside of the board.
Running the Circuit
After you have built the circuit you need to attach it to your audio input and wire the output,
5V and ground into the PiFace board. Adjust the threshold knob until it is at the mid-point,
and boot up your Raspberry Pi. Then run the sequence program and switch to the external
step. Start off the music and adjust the volume until you start to see the sequence advance.
If it won't turn up far enough then you might have to increase the value of R2; try changing
it to 470K. Then adjust the threshold until you see the sequence pick up the beat of the
music. You might have to go back and adjust the volume. It works better on some types of
music than others.
Over to You
Well that comes to the end of my bit but not of your bit. You can extend and improve this in
many ways. You can use transistors or FETs to drive longer LED strips and have many of
them on all the time. You can extend the software to save your sequence in a file. Then make
it so you can save different patterns in different files. You can implement a shift function
where you can concatenate several sequences to make a much longer one and even display an
extended sequence by drawing the new pattern when the old one is done. Better yet you
could have the display scrolling. Or make the window bigger and the boxes smaller to fit
more steps in.
You can add some software that keeps the sequence kicking over if you have switched to an
external input and have not had a trigger for a certain amount of time. You could add a small
delay after an external trigger to stop them from happening too rapidly. You can add an extra
control button to set the sequence to a random pattern.
On the hardware side, you might have noticed that the dynamic range of some music makes
it drop out of the trigger zone. There are special amplifiers called gated compressors; they are
made so that things like walkie-talkies have a constant audio signal into the transmitter. The
gain of the amplifier is adjusted automatically to keep the output constant. The SSM2165 is
one example of such an amplifier.
You might want to replace the envelope follower's discharge resistor with a pot, something
like 220K. Finally you might want to adjust the filter capacitor, or even have a more sophisti-
cated second or fourth order filter on the input. However, whatever you do, keep on dancing.
Search WWH ::




Custom Search