Professional Documents
Culture Documents
Final Write Up
Final Write Up
Final Write Up
Sound impact boards, like the one shown below, are commonly used to detect sound for
applications such as sound activated alarm systems, and various other props, such as DJ
equipment. The sound impact sensor from Parallax includes an on-board potentiometer
which adjusts the range from just a few inches up to 3 feet. On the bottom of the board
are three pins. The left side is the ground pin, the middle the input voltage, and the right
side the signal output pin. When a sound is detected, the board sends out a high voltage
signal, which can be taken as an input on a BS2. The simple design of the board makes it
exceptionally easy to use.
In this activity, you will use an LED to test the functionality of a single sound impact
board.
• With the power disconnected from your Board of Education, build the circuit
from the diagram shown on the next page.
• Reconnect the power.
• Clap near the sound impact board. LED should flash.
• If LED does not flash, verify polarity of LED is correct, and then check for proper
placement of hardware into pins.
Wiring Diagram
Sound
Pin 15 Impact
Sensor
470
Vss
Pin 0
Vdd
‘ {$STAMP BS2}
‘ {$PBASIC 2.5}
DO
IF (INO = 1) THEN
DEBUG “Sound Detected!”, Cr
HIGH 15
PAUSE 50
LOW 15
ENDIF
LOOP
The sound impact sensor waits for a sound to trigger, at which time the board
sends a signal to Pin 0. When Pin 0 receives the signal, the BS2 tells the Pin15 to
send a high signal, via an IF...THEN loop, and the debug window displays
“Sound Detected!”.
Activity #2: Using Multiple Sound Impact Boards
In this activity, you will use two separate sound impact boards to flash two separate
LEDs independently from one another.
• With the power disconnected from your Board of Education, build the circuit
from the diagram shown below.
• Reconnect the power.
• Clap near the sound impact board. LEDs should flash.
• Test one side out, then the other. LEDs should blink independently of one
another.
Wiring Diagram
Programming the Multiple Sound Impact Board Circuit
‘ {$STAMP BS2}
‘ {$PBASIC 2.5}
DO
IF IN0 = 1 & IN2 = 1 THEN
HIGH 15
HIGH 13
PAUSE 5
LOW 15
LOW 13
ELSEIF IN0 = 1 THEN
HIGH 15
PAUSE 5
LOW 15
ELSEIF IN2 = 1 THEN
HIGH 13
PAUSE 5
LOW 13
ENDIF
LOOP
Activity #3: Using the Sound Impact Board to Flash an LED Array
In this activity, you will use the sound impact board to flash multiple LEDs
simultaneously.
Array Circuit
• With the power disconnected from your Board of Education, build the circuit
from the diagram shown on the next page.
• Reconnect the power.
• Clap near the sound impact board. LEDs should flash.
• If LEDs do not flash, verify that polarity of LEDs are correct, and then check for
proper placement of hardware into pins.
• Color of wires is very important in this step. Proper utilization of wire color
coordination makes the lab much easier, and also safer in terms of hardware.
Without doing so, the next step of the lab will be extremely difficult from a wiring
standpoint.
Wiring Diagram
470 Sound
Pin 1 Impact
470 Sensor
Pin 2
470
Pin 3
470 Vss
Pin 4 470
470
Pin 5 Pin 0
470
Pin 6
470
Vdd
Pin 7
470
Pin 8
‘ {$STAMP BS2}
‘ {$PBASIC 2.5}
Do
If (INO = 0) Then
High 7
High 2
Pause 50
Low 7
Low 2
Pause 100
High 5
High 8
Pause 50
Low 5
Low 8
Pause 100
High 3
High 6
Pause 50
Low 3
Low 6
Pause 100
High 1
High 4
Pause 50
Low 1
Low 4
Pause 100
EndIF
Loop
This circuit is basically the same as that found in Activity #1, but with more LEDs. If the
board detects a sound, then all LEDs will flash at the same time. This Activity is also
useful for checking the functionality of both the Board of Education, and the LEDs. Both
are important pieces of the next activity.
In this activity, you will use multiple LED arrays along with two sound impact boards to
create a visual compliment for music.
• With the power disconnected from your Board of Education, build the circuit
from the diagram shown on the next page.
• Reconnect the power.
• Clap near the sound impact boards. LEDs should flash.
• If LEDs does not flash, verify polarity of LEDs is correct, and then check for
proper placement of hardware into pins.
• Since there are four LEDs connected in series on each pin, the voltage is broken
down to safe levels, as per Ohm's Law, and therefore no resistors are required to
protect the LEDs.
Wiring Diagram
Programming the Sound Beast
With this program running, the LEDs will flash when a sound is detected, and fall
back to a default pattern when no sound is present.
Summary
This concludes the Sound Beast lab. With the knowledge and hardware from Activity #4,
a great many projects become possible. The LED iPod dock is just one of them. Other
projects could include a beefed up version of the Sound Beast dock, giving it more LEDs
and better speakers. The possibilities are nearly endless.
Appendix
Troubleshooting Tips
¾ MAKE SURE LEDS ARE PROTECTED!!
LEDs are very easy to burn up. Try not to do that.
¾ KEEP WIRES COLOR CODED!
Wiring is difficult enough already. Just make things simpler by color
coordinating the wires. Ground black, Hot red, etc..
Hardware Information
¾ Sound Impact Board
http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/Pro
ductID/614/Default.aspx?txtSearch=sound+impact+board