Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Web Site: www.parallax.com Forums: forums.parallax.com Sales: [email protected] Technical: support@parallax.

com

Office: (916) 624-8333 Fax: (916) 624-8003 Sales: (888) 512-1024 Tech Support: (888) 997-8267

Sound Impact Sensor (#29132)


The Sound Impact Sensor provides a means to add noise control to your project and responds to loud noises such as a clap of the hands. Through the on-board microphone, this sensor detects changes in decibel level, which triggers a high pulse to be sent through the signal pin of the sensor. This change can be read by an I/O pin of any Parallax microcontroller.

Features
Detection range up to 3 meters away On-board potentiometer provides an adjustable range of detection Single bit active-high output 3-pin SIP header ready for breadboard or through-hole projects Built-in series resistor for compatibility with the Propeller microcontroller and other 3.3 V devices

Key Specifications
Power requirements: 5 VDC Communication: Single bit high/low output Operating temperature: 32 to 158 F (0 to +70 C) Dimensions: 0.6 x 1.5 in (1.5 x 3.8 cm)

Application Ideas
Noise Activated Alarm Systems Holiday Animated Props Robotic Control

Pin Definitions
Pin 1 2 3 Name GND 5V SIG Function Ground 5 VDC Signal Pin

Connection Diagrams
For use with the included sample programs on page 2.

Sensitivity
The Sound Impact Sensor has a maximum detection range of 3 meters. However, if you plan to use this sensor in an area where environmental factors can trigger false readings, the range can be shortened by adjusting the potentiometer on the front of the board.

Copyright Parallax Inc.

Sound Impact Sensor (#29132)

v1.0 10/27/2009 Page 1 of 2

Source Code
These programs are available from the Sound Impact Sensor product page. Browse to www.parallax.com and Search for 29132.

BASIC Stamp 2 Program


This program will display the current state of the output pin from the Sound Impact Sensor connected to P0 using the Debug Terminal included in the BASIC Stamp Editor software, available for download from www.parallax.com/basicstampsoftware.
' {$STAMP BS2} ' {$PBASIC 2.5} DO IF IN0 = 1 THEN DEBUG HOME, "Sound detected!", CLREOL PAUSE 1000 ELSE DEBUG HOME,"All is well", CLREOL ENDIF PAUSE 10 LOOP

' When noise detected, display ' a message ' If no sound is detected, ' display that all is well. ' Short delay ' Repeat

Propeller P8X32A Application


This program will display the current state of the output pin from the Sound Impact Sensor connected to P0 using the Parallax Serial Terminal. Note: This application uses the Parallax Serial Terminal.spin object for displaying the state of the sensor. This object as well as the Parallax Serial Terminal itself is installed with the Propeller Tool v1.2.6 which is available from the Downloads link at www.parallax.com/Propeller. {{ SoundImpactSensor_Simple.spin Displays the current state of the output pin from the Sound Impact Sensor connected to P0 using the Parallax Serial Terminal. For P8X32A. }} CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 OBJ pst : "Parallax Serial Terminal" PUB Main dira[0]~ pst.Start(115_200) repeat if ina[0] == 1 pst.Str(string("Sound detected!")) waitcnt(clkfreq + cnt) pst.Clear else pst.Str(string("All is well.")) waitcnt(clkfreq/10 + cnt) pst.Home ' Set pin 0 to input ' Set Parallax Serial Terminal to 115,200 baud ' System clock 80 MHz

' When noise is detected, display a message ' Wait 1 second ' Clear the Parallax Serial Terminal ' If no sound detected, display all is well ' Wait 1/10 of a second ' Move cursor to the top left corner of the PST

Copyright Parallax Inc.

Sound Impact Sensor (#29132)

v1.0 10/27/2009 Page 2 of 2

You might also like