View previous topic :: View next topic |
Author |
Message |
gabirelms
Joined: 28 Jun 2014 Posts: 38
|
Voice detection interrupt |
Posted: Tue Jul 01, 2014 8:19 am |
|
|
Hi all,
Any idea how to wake-up PIC16LF1459 with voice ?
I'm thinking about a microphone with a MOSFET or an OMP AMP, but I'm not sure how to design the small circuit, and which I/O from PIC to use. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jul 01, 2014 10:37 am |
|
|
This is not a general electronics forum. You should Google for answers
to questions like this. Google for this:
Quote: | sound detection circuit |
|
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Tue Jul 01, 2014 11:29 am |
|
|
It is not nearly as simple as it sounds if you want it to only wake up for voice and not other noises. Simplest is to wake up on any noise above a certain threshold. Much tougher would probably involve a dsp of some sort to analyze the "noise" and determine if it fit the pattern of voice or was simply random noise. It is going to take a bunch of Google searching to actually determine what your requirements are then thinking about how to implement them.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19522
|
|
Posted: Tue Jul 01, 2014 11:37 am |
|
|
There is a voice detection/recognition shield for the Android, that should be adaptable to the PIC, but this is a fairly complex _electronic_ problem, not a CCS coding problem initially |
|
|
gabirelms
Joined: 28 Jun 2014 Posts: 38
|
|
Posted: Tue Jul 01, 2014 12:01 pm |
|
|
My idea is the simplest: to wake up on any noise above a certain threshold. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19522
|
|
Posted: Tue Jul 01, 2014 12:12 pm |
|
|
Still an electronic problem.
One suggestion though you could use a PIC with a comparator. Then program the interrupt from this to be the wake-up.
Amplify the signal from a microphone. Filter it to only accept 'speech' tones (so roll off all noises above perhaps 2.4KHz, and below 400Hz). Such a narrow filter band will cover the primary speech components, but rule out a lot of other noises. Rectify the result, and feed this to the comparator. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Tue Jul 01, 2014 1:21 pm |
|
|
Have you tried whispering in it's ear ?
That's my favorite.... |
|
|
SuperDave
Joined: 22 May 2008 Posts: 63 Location: Madison, TN
|
|
Posted: Wed Jul 02, 2014 3:18 pm |
|
|
Without doing a lot of work my educated guess is that you'll need at least a preamp but not much more depending on how sensitive you want it to be. You can use the existing comparators in the PIC chips and the existing reference voltage generator on the other comparator input.
Most mics put out about 1mV rms at ordinary levels (a very gross assumption!) but you'll need at least 100mV for the comparators I've looked at. The output of the comparator can easily be an interrupt. One thing working in your favor with speech as opposed to noise is that the positive peaks of human speech are twice as big as the negative peaks (yes even if you AC couple it). So equivalent levels (as measured on a sound level meter) of speech and noise are quite different when presented to a comparator for your purposes. Thus keep the preamp non-inverting overall to take advantage of the speech peak difference.
You can 'steal' the op amp if your pic has two comparators by using one of them as an op amp. See http://ww1.microchip.com/downloads/en/DeviceDoc/41215C.pdf Tip #12 Optimize the performance in the octave between 500 and 1000 Hertz, that's where the peak energy is, you're not looking for hifi. |
|
|
|