Shop OBEX P1 Docs P2 Docs Learn Events
Robot Sound Detection / Activation — Parallax Forums

Robot Sound Detection / Activation

Rusty78Rusty78 Posts: 33
edited 2005-10-31 13:20 in Robotics
Hey Guys,

············ I need to make my Robot self activate after detecting a sound signal between 3.0KHz and 4.0 Khz. Does Parallax sell a sensor that can help me do this?
Any help would be greatly appreciated. Thank you kindly for your time.

Cheers!

R.K.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-13 19:13
    We don't. That said, you have a couple choices in PBASIC (with proper signal conditioning): COUNT and PULSIN.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Rusty78Rusty78 Posts: 33
    edited 2005-09-13 21:33
    Sorry Jon, I'm not quite sure I follow you. Could you please elaborate..

    Thank you kindly.

    R.K.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-14 01:58
    Well, what you could do is take a basic mic preamp and square-up the output by running it through a Schmitt trigger -- now you have nice square pulses instead of sine waves. Now you can use COUNT to count the number of pulses in a given period. Or, you can measure the high side and low side measures of the pulses (with PULSIN) to determine the overal period from which you can calculate frequency (Freq = 1 / Period).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-09-14 15:13
    Rusty, will this 3-4kHz sound be in a quiet or noisy environment?

    Jon's method works great in a quiet environment, but in a noisy one both COUNT and PULSIN will produce unreliable results for different reasons.

    To detect the tone in a noisy environment you need a fairly complex analog front end of: amp->BPfilter->integrator->comparator which measures the audio energy in a frequency range and compares it to a threshold, this will require a little knowledge of analog design.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • davorsdavors Posts: 1
    edited 2005-10-31 02:30
    hmmm...
    to make a basic mic to listen to a range of frequency at a noisy environment would be an interesting stuff to deal with...
    ==>amp->BPfilter->integrator->comparator ... hmmm... seems tedious work...
    any reference recommended?
    thanks Paul Baker and Jon Williams...
    [noparse]:)[/noparse]
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-10-31 13:20
    Each of the stages would be implemented via op amps, a good general overview of opamps configured for amplification, integration and comparing can be found here: http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/opampvar.html

    and the bandpass stage is overviewed here http://hyperphysics.phy-astr.gsu.edu/hbase/electric/serres.html·a LC circuit in series resonance will only pass frequencies near 1/SQRT(LC) (measured in radians/second), the inductor inhibits high frequencies and the capacitor inhibits low frequencies.

    The nice thing about using multiple stage op-amps is that you can individually tune each stage to the required parameters in an isolated circuit before assembling the entire circuit. This is best done with the aid of an oscilloscope.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
Sign In or Register to comment.