Shop OBEX P1 Docs P2 Docs Learn Events
Microphone interface — Parallax Forums

Microphone interface

D FaustD Faust Posts: 608
edited 2007-10-12 01:52 in BASIC Stamp
Does anyone know how to interface a microphone as on the prop demo board to a basic stamp?· What kind of signal is output?· Thanks.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
END 

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-11 00:02
    The Stamp is not fast enough nor does it have enough memory to handle a microphone like the Propeller can.
  • D FaustD Faust Posts: 608
    edited 2007-10-11 00:05
    I just want detect if there is sound present or not, is this still impossible? Is there an external circuit that I could use?

    What kind of signal would I get out...current spikes and drops?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
    LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
    ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
    END 
    
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-10-11 01:48
    External circuit idea:· You could set up a mic amp that feeds into a comparator --·with any sound (input) greater than the threshold (reference) voltage, its output will·just go high/low (as you choose.)

    Update -- I'll bet it'd work without any pre-amp, assuming an electret mic; just run the de-coupled output into the comparator.

    Post Edited (PJ Allen) : 10/11/2007 1:54:18 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-11 01:53
    That's much easier. There are lots of circuits on the web for this sort of thing. Mostly it consists of an amplifier, a rectifier with a filter, and a DC amplifier. The first one amplifies the microphone's signal. The rectifier and filter provides a voltage proportional to the average sound level from the microphone, and the final comparator sets a threshold for detection.

    Here's one example: www.seattlerobotics.org/encoder/200003/larryb.html
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2007-10-11 03:40
    D Faust,

    You might want to take a look at this thread for some ideas...

    http://forums.parallax.com/showthread.php?p=562892

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • D FaustD Faust Posts: 608
    edited 2007-10-11 21:36
    I am going to have an ADC for other things, would it work if I plugged the mircophone into it?· Would I connect the microphone through ground or Vdd?· Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
    LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
    ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
    END 
    
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-11 22:46
    You still need the rectifier and filter and some amplification before and after.· The ADC is neither sensitive enough nor is the Stamp fast enough to sample the audio.· You would need to get a measurement at least several times during a cycle.· For the upper end of the speech range (around 3-4KHz), you would need a reading at least every 100us (a 10KHz sample rate).· If you use one of the amplifier / peak detector circuits mentioned in earlier postings, you could use an ADC channel to measure the average signal input level.
  • D FaustD Faust Posts: 608
    edited 2007-10-12 01:52
    I think that I'll try the schematic from SRS.· (Because I am trying to sense a buzzer as on the site)· I will get an Analog Voltage right?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
    LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
    ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
    END 
    
Sign In or Register to comment.