[OpenTRV-dev] Audio/FFT thoughts

Mike Stirling EMAIL ADDRESS HIDDEN
Tue Jun 11 13:47:54 BST 2013


Microchip (and probably others) have some exceptionally low-current rail-to-rail CMOS op-amps. The GBW is very small, but probably sufficient for the amount of gain required, especially since you are only interested in signals up to about 4 kHz. You may get a reasonable overall current consumption with one of these as a preamp for a peizo, followed by a simple envelope detector with a long-ish time constant. Then read that with an ADC at intervals.
 
----------------original message-----------------
From: "Kevin Wood" EMAIL ADDRESS HIDDEN 
To: "Closed list for developer discussions" EMAIL ADDRESS HIDDEN 
Date: Tue, 11 Jun 2013 13:36:38 +0100
-------------------------------------------------
 
 
> Yes, I guess you could combine it with a detector to "wake" the more
> sophisticated listening function.
> 
> Kevin
> 
>> I can do all sorts of duty cycles, etc; I really need to get an idea of
>> what would actually work.
>>
>> My instinct is that when the device is getting close to timing out it "is
>> occupied" measure it could increase the duty cycle to be especially
>> attentive for noises.
>>
>> Another possibility is to add a crappy but very sensitive high impedance
>> low/zero-power mike (eg piezo) on a separate / interrupt input that would
>> wake the main system up to listen if anything interesting was happening.
>> Dunno.
>>
>> Rgds
>>
>> Damon
>>
>>
>>
>> On 11 Jun 2013, at 11:47, Kevin Wood wrote:
>>
>>> Sorry for not being around much lately...
>>>
>>> I would wonder if 8ms per second is going to be enough duty cycle, TBH.
>>> Speech itself is going to be fairly sporadic with long silences in an
>>> occupied room and gaps between syllables when the speech is constant.
>>>
>>> I appreciate that moving everything into software is going to keep the
>>> hardware cheap and simple, but I wonder if a minimal preamp, filter and
>>> level detector with reasonable current consumption could not be built 
>>> in
>>> hardware. It could be fired up for tens of seconds at a time and might
>>> be
>>> a more reliable indicator of room occupancy than sampling in very short
>>> bursts?
>>>
>>> Trying it is the only way to find out, though, I suspect...
>>>
>>>
>>> Kevin
>>>
>>>
>>>> Hi,
>>>>
>>>> Some initial thoughts on audio occupancy detection with the ATmega,
>>>> listening out for voice (of a human or their radio/TV being on). I
>>>> have
>>>> done no feasibility testing yet.
>>>>
>>>> My current plan is to (~8-bit) sample with the ADC at 16kHz, in bursts
>>>> of
>>>> about 8ms (between RTC ticks), using a simple exponential filter to
>>>> reduce
>>>> to 8kHz samples. Take 64 samples which should allow me to examine
>>>> frequencies in the 4kHz to 500Hz band which probably covers most of
>>>> "voice".
>>>>
>>>> 1) I think that I can probably achieve this sampling rate even at 1MHz
>>>> CPU
>>>> clock (default Arduino ADC sample rate at 16MHz CPU clock seems to be
>>>> 9600Hz and I have a prescaler to play with).
>>>>
>>>> 2) I only intend to listen when I'm otherwise in danger of thinking the
>>>> room unoccupied, and in any case on a low duty cycle to save juice (eg
>>>> one
>>>> 8ms sample block per minute or less for example).
>>>>
>>>> 3) I have headroom to boost the CPU speed dynamically to 4MHz if I need
>>>> to
>>>> (I already dynamically lower it when I need to).
>>>>
>>>> What is hideously silly about this plan already?
>>>>
>>>> Rgds
>>>>
>>>> Damon
>>>>
>>>>
>>>> _______________________________________________
>>>> OpenTRV-dev mailing list
>>>> EMAIL ADDRESS HIDDEN 
>>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> OpenTRV-dev mailing list
>>> EMAIL ADDRESS HIDDEN 
>>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>>
>>
>> _______________________________________________
>> OpenTRV-dev mailing list
>> EMAIL ADDRESS HIDDEN 
>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>
> 
> 
> _______________________________________________
> OpenTRV-dev mailing list
> EMAIL ADDRESS HIDDEN 
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
> 
-- 

 



More information about the OpenTRV-dev mailing list