80 FFTs Per Second To Detect Whistles and Switch On Lights
limpkin.fr
limpkin.fr
Probably very doable with smart birds like (but not limited to so, don't hate me) parrots.
On the other hand, some of those bird species can be quite mischievous, be very careful before giving it control over your house.
On a related note, I wonder — the OP used a Freescale Kinetis microcontroller, those begin at around $2.50 at Farnell. Meanwhile, Texas Instruments still hasn't began distributing their Tiva (formerly Stellaris) chips, with the M4F core. I wonder when they'll finally get around to it, and whether the pricing will be competitive with Kinetis.
On one hand, I feel like it's wasteful to do stuff like this digitally, with FFTs, rather than with analog filters. That's a whole lot of transistors to do something that could be done with vastly fewer with an analog approach. On the other hand, the digital approach is more flexible, almost certainly lower power, and not much more expensive. The rise of tiny chips that are great at DSP, partially driven by mobile tech, is really exciting. It'll be great to see what it's going to lead to in future.
As a hardware design engineer, I can't say I miss it too much though.
Run the signal right into a DSP and call it a day.
Doesn't work right? Must be a firmware problem.
[1] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?co...
Actually the thermodynamic requirements of that sort of computation are much much less than the practical requirements; at room temperature the minimum power to handle that bandwidth is only 3 × 10^-15 watts; the FFT doesn't need to add to that because the FFT is a reversible computation. We're a long way away from perfection in this sense.
(Running 80 FFT's every second isn't going to be great on batteries.)
The Kinetis K10 he used WOULD BE an excellent processor choice for an ultra-low power design, though.
You could have a low-power comparator monitor for noises and only wake the processor up when it heard something interesting.
With some simple tricks like that, you could probably run for months on a couple AA batteries.
Assume for the moment that floating-point were used instead of fixed-point: A 2048-element real-to-real FFT requires a bit less than 40Kflop, or 3.2Mflop/sec to get 80FFT/sec. Modern hardware is capable of > 1Gflop/joule, so the raw compute of 3.2Mflop/sec actually takes something on the order of 3.2mw.
Of course, the computation is being done in q15 instead of float, which (in theory) should require something on the order of 1/2 the energy. On the other hand, the processor can’t just do FFTs. It’s spending energy going in and out of lower-power states, running other code, etc, etc, and I don’t have any data for the energy usage of the M4 specifically, to say nothing of the other components on the board.
In principle though, the energy actually consumed by performing the FFTs should be pretty minimal; most of it will be going to everything else unless the hardware and software are both very carefully designed for efficiency.
If you mean design and fabricate the chips then that is a bit more.
Start with a simple schematic, maybe a 555 timer flashing an LED[1]? Grab a PCB layout program, such as gEDA/PCB [2], Eagle [3] or an old version of Protel. You can even use an everyday drawing package, such as Inkscape for really simple boards, if you think a CAD package is too complex. Alternatively, use a resist pen [7] to draw the circuit directly on your blank PCB.
Buy a PCB making kit, which includes a blank piece of PCB, chemicals and instructions [4]. Follow the instructions [5]. Solder the components on [6]. Turn on the power!
[1] http://www.instructables.com/id/Flashing-LED-using-555-Timer...
[2] http://pcb.geda-project.org/
[3] http://www.cadsoftusa.com/eagle-pcb-design-software/
[4] http://www.jaycar.com.au/productView.asp?ID=HG9990
[5] http://www.jaycar.com.au/images_uploaded/pcboards.pdf
[6] http://www.staff.vu.edu.au/sokolov/library/datasheets/solder...
[7] http://www.jaycar.com.au/productView.asp?ID=TM3000
---
Edit: add resist pen suggestion