CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Voice detection interrupt

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
gabirelms



Joined: 28 Jun 2014
Posts: 38

View user's profile Send private message

Voice detection interrupt
PostPosted: Tue Jul 01, 2014 8:19 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jul 01, 2014 10:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jul 01, 2014 11:29 am     Reply with quote

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: 19535

View user's profile Send private message

PostPosted: Tue Jul 01, 2014 11:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jul 01, 2014 12:01 pm     Reply with quote

My idea is the simplest: to wake up on any noise above a certain threshold.
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Tue Jul 01, 2014 12:12 pm     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Tue Jul 01, 2014 1:21 pm     Reply with quote

Have you tried whispering in it's ear ?

That's my favorite.... Very Happy Very Happy Very Happy
SuperDave



Joined: 22 May 2008
Posts: 63
Location: Madison, TN

View user's profile Send private message Visit poster's website

PostPosted: Wed Jul 02, 2014 3:18 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group