1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Digital Electronics Project - Sound detection

  1. Nov 7, 2007 #1
    Greetings all,

    I thought I'd post my idea and plan for my digital electronics project here to see if I can get any tips or meet people who may have some expertise on this subject...

    The basic idea is a 'lock' that is opened by the correct series of input notes.

    Using a PIC, what I'm hoping to do is with a microphone (not sure if the bandwidth of this can be handled by the PIC, I'd particularly love any comments on this), or a function generator and have the PIC take a few values at specific times of the incoming wave and compare it to values programmed into the PIC. When the values correspond (when high values add to some value X) then the correct note is being input.

    I thought taking numerous values per frequency would fix the problem of various frequencies having high values at the same time, although I'm sure there are issues here still.

    LEDs will be implemented to show the progress of codebreaking, and a master LED when, the third and final note is played after the first correct two.

    Let me know if I'm too vague anywhere, I'd love any comments at all.

  2. jcsd
  3. Nov 7, 2007 #2


    User Avatar

    Staff: Mentor

    You will need to use an A/D converter to digitize the incoming audio -- what speed ADC are you planning to use? What sample-and-hold circuit are you going to use, and where are you going to place the pole(s) of your input anti-alias filter?

    How long of a digitized sample are you going to use for your FFT conversion, and what window function are you going to use? These would translate into the requirements for how long the note is held by the person unlocking the mechanism.
  4. Nov 7, 2007 #3
    By 'sample and hold' I assume you mean the digitized wave?
    I was wondering if I might be able to avoid that whole process by taking values of the wave at specific times.....
    'what is the value... NOW... NOW... and then comparing numeric values'.

    ... and I don't know what an anti-alias filter is..........
  5. Nov 7, 2007 #4


    User Avatar

    Staff: Mentor

  6. Nov 7, 2007 #5
    do you think my idea for 'value obtaining' is a valid one?
  7. Nov 7, 2007 #6


    User Avatar

    Staff: Mentor

    That is the same as using a sample and hold to hold a sample value of voltage long enough to do the analog-to-digital conversion. You cannot let the input to an ADC vary as it is doing its conversion, or you will get some invalid numbers out of it.

    The wikipedia.org article is a reasonable intro to ADCs:


    An ADC structure is usually an input amp --> anti-alias filter --> S/H --> ADC --> uC. The anti-alias filter is necessary to limit the bandwidth of the input signal to less than the Nyquist limit of the sampling system. Without it, you will get input frequency components that don't really exist (aliasing).
  8. Nov 7, 2007 #7
    it seems, not many inputs would be able to remain perfectly steady....

    perhaps something like a schmidt trigger would allow intant digitization? (pretty sure im making up words lol)
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Digital Electronics Project - Sound detection
  1. Analog to Digital (Replies: 11)

  2. Screw Detection (Replies: 7)