Digital Electronics Project - Sound detection

Click For Summary
SUMMARY

The forum discussion centers on a digital electronics project involving a sound detection lock system utilizing a PIC microcontroller. The project aims to recognize specific musical notes through an analog-to-digital converter (ADC) and Fast Fourier Transform (FFT) analysis. Key components discussed include the need for a sample-and-hold circuit, anti-aliasing filters, and the importance of maintaining a stable input signal during ADC conversion. Participants emphasize the necessity of understanding ADC structures and filtering techniques to ensure accurate sound detection.

PREREQUISITES
  • Understanding of PIC microcontroller programming
  • Knowledge of analog-to-digital converters (ADCs)
  • Familiarity with Fast Fourier Transform (FFT) techniques
  • Basic principles of anti-aliasing filters
NEXT STEPS
  • Research the specifications and implementation of sample-and-hold circuits for ADCs
  • Learn about anti-aliasing filter design and its impact on signal processing
  • Explore FFT algorithms and their applications in sound analysis
  • Investigate the integration of microphones with PIC microcontrollers for audio input
USEFUL FOR

Electronics enthusiasts, digital signal processing engineers, and developers working on audio recognition systems will benefit from this discussion.

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)
 

Similar threads

Replies
7
Views
4K
Replies
7
Views
2K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K