[OpenTRV-dev] Audio/FFT thoughts

Damon Hart-Davis EMAIL ADDRESS HIDDEN
Tue Jun 11 10:07:09 BST 2013


Hi,

OK, *that's* a good idea, thanks!

I would like to screen out radiator gurglings, etc, which was why I thought that I might need more precision.

But maybe I can do some simple DC removal and band-pass filtering.

Is there anything as simple as the exponential filtering to do the high-pass element in software?

Rgds

Damon



On 11 Jun 2013, at 09:51, Mike Stirling wrote:

> What are you planning on doing in the frequency domain? If you have already filtered to 4 kHz as part of your decimation step then why not just integrate the square of your 64 samples to give you an indication of voice band power?
> 
> Mike
> 
> ----------------original message-----------------
> From: "Damon Hart-Davis" EMAIL ADDRESS HIDDEN 
> To: "Closed list for developer discussions" EMAIL ADDRESS HIDDEN 
> Date: Tue, 11 Jun 2013 08:40:30 +0100
> -------------------------------------------------
> 
> 
>> 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
> 



More information about the OpenTRV-dev mailing list