Home

Grove - Sound Sensor User Manual

image

Contents

1. seeed Grow the Difference 4 4 With Raspberry Pi You should connect to GrovePi with Grove Sound Sensor and Grove Green LED Such as the following picture When sound level greater than a certain value the LED will turn on GrovePi Grove Sound Sensor Grove LED import time import grovepi Connect the Grove Sound Sensor to analog port A0 SIG NC VCC GND sound sensor 0 Connect the Grove LED to digital port D5 SIG NC VCC GND led 5 grovepi pinMode sound sensor INPUT grovepi pinMode led OUTPUT The threshold to turn the led on 400 00 5 1024 1 95v threshold value 400 while True try Read the sound level sensor value grovepi analogRead sound sensor I NA S od y seeed Grow the Difference If loud illuminate LED otherwise dim if sensor value gt threshold value grovepi digitalWrite led 1 else grovepi digitalWrite led 0 print sensor value sensor value time sleep 5 except IOError print Error Run the program Find the path to the file According to your own path cd GrovePi Software Python Run Program sudo python grove sound sensor py 4 5 With Beaglebone Green To begin editing programs that live on BBG you can use the Cloud9 IDE As a simple exercise to become familiar with Cloud9 IDE creating a simple application to blink one of the 4 user programmable LEDs on
2. the BeagleBone is a good start If this is your first time to use Cloud9 IDE please follow this link Step1 Set the Grove UART socket as a Grove GPIO Socket just follow this link Step2 Click the in the top right to create a new file b Clouds IDE 10 y seeed Grow the Difference indow Help Preview Untitled 1 Step3 Copy and paste the following code into the new tab from Adafruit I2C import Adafruit I2C import time ADDR_ADC121 0x50 REG ADDR RESULT 0x00 REG ADDR ALERT 0x01 REG ADDR CONFIG 0x02 REG ADDR LIMITL 0x03 REG ADDR LIMITH 0x04 PES DDR T00 REG_ADDR_CONVL 0x06 REG ADDR CONVH 0x07 i2c Adafruit I2C ADDR ADC121 Class T2cAdc def init self i2c write8 REG ADDR CONFIG 0x20 def read adc self Read ADC data 0 4095 data list i2c readList REG ADDR RESULT 2 sone ioe Gabe st date let data data list 0 amp 0x0f lt lt 8 data list 1 amp Oxfff return data 11 y seeed Grow the Difference iL nane ea Connect the Grove I2C ADC to I2C Grove port of Beaglebone Green ade I2cAdc while True print sensor value adc read adc time sleep 2 Step4 Save the file by clicking the disk icon with a name grove i2c adc py Step5 Create a new file Copy the following code into the new tab and save it with the py extension import time from logo import print seeedstudio import grove i2c adc import Adaf
3. The design of this product including software and its accessories is under tutelage of laws Any action to violate relevant right of our product will be penalized through law Please consciously observe relevant local laws in the use of this product y seeed Grow the Difference 1 Introduction Grove Sound Sensor can detect the sound strength of the environment The main component of the module is a simple microphone which is based on the LM358 amplifier and an electret microphone This module s output is analog and can be easily sampled and tested by a Seeeduino y seeed Grow the Difference 2 Features Easy to use sound sensor module Provides analog output signal Easily integrates with Logic modules on the input side of Grove circuits Uses Standard 4 pin Grove Cables to connect to other Grove modules such as Grove Power Modules Logic Gatesand Grove Base Shield y seeed Grow the Difference 3 Specifications Operating voltage range 4 12V Operating current Vcc 5V 4 8mA Voltage Gain VS 6V f 1 kHz 26dB Microphone sensitivity 1 Khz 52 48dB Microphone Impedance 2 2K Q Microphone Frequency 16 20Khz Microphone S N ratio 54dB y seeed Grow the Difference 4 Usage 4 1 Standalone Follow these steps to build a sample Grove circuit using this module but without using any microcontroller board Connect the sound sensor module to the input s
4. ep7 Run the code You ll find that the terminal outputs Sound value every 2 seconds 13 y seeed Grow the Difference 5 Availability This Grove module is available as part of the following Grove Kit Series Grove Mixer Pack V2 Grove Mixer Pack Grove Toy Kit Alternatively it can be bought stand alone here at the Seeed Studio Bazaar 14 y seeed Grow the Difference 6 Resources Grove Sound Sensor Schematic pdf Grove Sound Sensor Source Files v1 3 Grove Sound Sensor Eagle files v0 9b LM386pdf how to upload code
5. ide of your circuit to the left of the power module On the output side of the circuit you may use a range of User Interface modules Grove Red LED Grove LED String Light Grove Mini Fan Grove Buzzer Grove Recorder etc Power up the circuit when complete The sound sensor module can now be used to trigger an output For example When used in conjunction with a Grove Red LED output module observe that the LED turns ON when the sound sensor detects audio and turns off in silence The same behavior can be seen when the sound sensor is used with the Grove LED String Light module when there is sound the lights will turn ON and when there is silence the lights will turn OFF Add a Grove NOT module between the sound sensor and the power module to reverse the logic that triggers the LEDs on the Grove Red LED or Grove LED String Light modules With the addition of the Logical NOT gate on the input side you should see that the LEDs remain OFF when sound or music is detected and turn ON when there is silence You can use either the Grove USB Power module or the Grove DC Jack Power module for building this Grove circuit 4 2 With Arduino Follow these simple steps to build a Grove circuit using the light sensor When using the module in conjunction with an Arduino or a Seeeduino use the Grove Base Shield and connect the Grove Sound Sensor module to the shield using a designated Grove Interface Also a
6. ruit BBIO GPIO as GPIO Reference voltage of ADC is 3 0v ADC REF 3 0 Vec of the grove interface is normally 3 3v GRUND MEG S 33 adc grove i2c adc I2cAdc 0 def read sound sensor values 0 Read voltage values from Grove Sound Sensor total value 0 for index in range 5 sensor value adc read adc H print sensor value sensor value total value sensor value time sleep 0 01 H print total value total value average value float total value 5 voltage value average value 4095 ADC REF 2 return voltage value Function If the sound sensor senses a sound that is up to the threshold you set in the code the LED is on for ls Hardware Grove I2C ADC Grove Sound Sensor Grove LED You can also replace Grove LED with Grove Buzzer 12 y seeed Grow the Difference Note Use P9 22 UART2 RXD as GPIO Connect the Grove LED to UART Grove port of Beaglebone Green Connect the Grove 2C ADC to 12C Grove port of Beaglebone Green and then connect the Grove Sound Sensor to Grove I2C ADC il name main print seeedstudio while True tv Read voltage values from Grove Sound Sensor sensor voltage value read sound sensor values 0 print sensor voltage value sensor voltage value H time sleep 2 except IOError print Error Step6 Connect Grove Sound Sensor to Grove I2C ADC which is connected to Grove 12C socket on BBG St
7. seeed Grow the Difference OY Grove Sound Sensor User Manual Release date 2015 9 23 Version 1 0 Wiki htto Awww seeedstudio com wiki index php title Twig_ Sound Sensor Bazaar http www seeedstudio com depot Grove Sound Sensor p 52 html y seeed Grow the Difference Document Revision History y seeed Grow the Difference Contents Document Revision History 2 i Tror Co ee re E Pa 2 ES GE SE EE er endeee wi ane 3 3 Specifications 4 4 Usage OOOO SOOOOSOSOSOSOSOSOOOOOOCOCOOOOOSOSOSOSOSOSOOCOSOSOSESS 5 4 1 GN 5 4 2 er UG EE EEE EE SEE EE EE EEE EEE TEN 5 4 3 VSIT 7 4 4 With Raspberry Pi sororvonernanaraananarennanersanersanersanersavanensavenensanersanene 9 4 5 With Beaglebone Green x enerarnananenavensananenensanenensanenenensavenenersnsene 10 5 Availability s000000ererarararrnnaannanananenenenensasananenevevenenenensnsasananenennnr 14 ET 15 y seeed Grow the Difference Disclaimer For physical injuries and possessions loss caused by those reasons which are not related to product quality such as operating without following manual guide natural disasters or force majeure we take no responsibility for that Under the supervision of Seeed Technology Inc this manual has been compiled and published which covered the latest product description and specification The content of this manual is subject to change without notice Copyright
8. the sound sensor microphone When the incoming sound amplitude exceeds a threshold we will turn an LED on for 1 second Ves Sound Sensor ke os A simple program demonstrate sound sensor senses a sound that is up to the threshold you set in the code the LED is on for ls The circuit sig pin of the sound sensor to the analog pin 24 J6 plug on Grove Base BoosterPack one side pin either one to ground the other side pin to VCC y seeed Grow the Difference LED anode long leg attached to RED LED LED cathode short leg attached to ground Note This example code is in the public domain http www seeedstudio com depot Grove Sound Sensor p 752 html cPath 25 128 define SOUND SENSOR 24 sound sensor pin tdefine LED RED LED LED pin H define THRESHOLD VALUE 3000 Depending on your LaunchPad s ADC resolution you may have vo ad juste the tir es holder H define ON HIGH led on define OFF LOW led off tdefine handle led x digitalWrite LED x handle led Global Variables int sound value 0 void setup Initialize led pin pinMode LED OUTPUT digitalWrite LED LOW void loop read the sound value sound value analogRead SOUND SENSOR if the value is larger than threshold turn on led if sound value gt THRESHOLD VALUE handle led ON delay 1000 handle led OFF y
9. ttach an output module such as a Grove LED or Grove Red LED which will get triggered based on input received from the sound sensor shown below y seeed Grow the Difference Upload the following sample sketch to make the LED turn ON and OFF based on input from the sound sensor 7 7 Function If the sound sensor senses a sound that is up to the threshold you set in the code the LED is on for 200ms 2 Hardware Grove Sound Sensor Grove LED macro definitions of the sound sensor and the LED define SOUND SENSOR AO define LED 3 the number of the LED pin define THRESHOLD VALUE 400 The threshold to turn the led on 400 00 5 1024 1 95v void setup Serial begin 9600 pine init void loop int sensorValue analogRead SOUND SENSOR use AO to read the electrical signal Soriak print Sensor alte Sora e prine la sensor Slet if sensorValue gt THRESHOLD VALUE turnOnLED if the value read from AO is larger than 400 then light the LED delay 200 eee LADO void pins init pinMode LED OUTPUT y seeed Grow the Difference pinMode SOUND SENSOR INPUT void turnOnLED digitalWrite LED HIGH void turnOffLED digitalWrite LED LOW If the sound of the environment is greater than the threshold then the LED will light up 4 3 With Tl LaunchPad Turning on a LED by Sound Sound Sensor This example program shows how to use

Download Pdf Manuals

image

Related Search

Related Contents

Manitowoc Ice 7623833 User's Manual  König HC-BLDPRESS11 blood pressure unit  Télécharger la note de synthèse (pdf, 324ko)  Samsung LA22B352F4 manual de utilizador    AP デジタルマルチメーター 使用説明書  ECL Comfort Manuel d`installation et de maintenance ECL Comfort  メンズイージーオーダーシステム  PRIMERGY 6570/6770取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file