Shop OBEX P1 Docs P2 Docs Learn Events
electret condenser microphone — Parallax Forums

electret condenser microphone

Bob MoraneBob Morane Posts: 2
edited 2009-05-01 03:37 in BASIC Stamp
Hi,
I want to use an electret microphone with my basic stamp. I read many things in this forum, but I don't find anything to help me (or maybe I don't understand). I want to use it for reading a sound and determine if it's loud enought to start my application. In my code (under), I want to know if I can replace my photocell with the microphone·by also·using rctime.

' {$STAMP BS2}
' {$PBASIC 2.5}
OUTPUT 0 'Moteur
OUTPUT 4 'Moteur
INPUT 1· 'Photocell
OUTPUT 2 'Lumiere DELL Rouge
OUTPUT 3 'Lumiere DELL Verte
Photocell VAR Word
'
'
Principal:
HIGH 1
PAUSE 10
RCTIME 1,1,Photocell
DEBUG ? Photocell
PAUSE 1000
IF Photocell > 300 THEN
· DEBUG ? Photocell
· PAUSE 1000
· GOTO Moteur
·ELSE
· HIGH 2
· LOW 3
· GOTO Principal
ENDIF

I send a picture of my connection so if I make mistake tell me, you will see that I am newbie smilewinkgrin.gif .
Thanks.
320 x 199 - 20K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-30 23:29
    An electet microphone doesn't put out enough of a signal for use directly with a Stamp. You need some amplification. A Stamp is also not fast enough to process raw audio and it has only digital inputs, so it can't process amplitude information. To do what you want, you need an amplifier, rectifier, and filter. Do a web search for DIY (do it yourself) sound detector. That will give you some ideas.
  • Bob MoraneBob Morane Posts: 2
    edited 2009-05-01 02:04
    Thank tou, I will do it.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-01 03:37
Sign In or Register to comment.