Digital Electronics Project - Sound detection

AI Thread Summary
The discussion revolves around a digital electronics project involving a sound-detection lock that opens with a specific series of input notes using a PIC microcontroller. Key considerations include the need for an A/D converter to digitize audio signals, the importance of a sample-and-hold circuit, and the implementation of an anti-alias filter to prevent invalid readings. Participants emphasize the necessity of maintaining a stable input during ADC conversion to avoid inaccuracies. Suggestions include exploring application notes for interfacing ADCs with PICs and considering the use of a Schmidt trigger for instant digitization. The project aims to create a functional and reliable sound-activated locking mechanism.
Oblio
Messages
398
Reaction score
0
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.

-Adam
 
Engineering news on Phys.org
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.
 
berkeman said:
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.

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...
 
Ok.
do you think my idea for 'value obtaining' is a valid one?
 
Oblio said:
Ok.
do you think my idea for 'value obtaining' is a valid one?

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:

http://en.wikipedia.org/wiki/Analog-to-digital_converter

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).
 
berkeman said:
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:

http://en.wikipedia.org/wiki/Analog-to-digital_converter

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).

it seems, not many inputs would be able to remain perfectly steady...

perhaps something like a schmidt trigger would allow intant digitization? (pretty sure I am making up words lol)
 
Back
Top