

80 FFTs Per Second To Detect Whistles and Switch On Lights - Lightning
http://www.limpkin.fr/index.php?post/2013/04/26/The-whistled%3A-how-to-remake-a-dozen-years-old-project-the-right-way

======
femto
It'd be fun to put this beside a bird cage, and see if the bird could learn to
control its environment. If so, I imagine quite a number of doting bird owners
would be prepared to pay money to give their pet "the gift of independence".

~~~
rurounijones
That is a frankly brilliant idea which I never would have thought of.

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.

------
jwr
The ARM Cortex M4 is quite an amazing core, actually. The DSP instruction set
is beautiful in its simplicity, and the best part is the table with clock
cycles per instruction ("1" in all rows).

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.

------
mjb
That's a really cool project.

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.

~~~
droz
Sadly, analog design seems to be becoming a lost art.

~~~
swamp40
Agree.

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.

------
MichaelApproved
This feels like The Clapper of the 21st century. That product is still bought
and in the pop culture. Good luck to the developer.
<http://www.youtube.com/watch?v=cfgN5tUgjb8>

------
dan1234
Does anyone know how much power this would use while waiting for commands,
considering it really needs to be running 24/7?

~~~
swamp40
It has a plug for a wallbrick, and I don't think the author optimized his
hardware or code for ultra-low power - ie small batteries.

(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.

~~~
stephencanon
> Running 80 FFT's every second isn't going to be great on 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.

------
Shivetya
Eight paragraph of this article, [http://www.washingtonpost.com/wp-
dyn/content/article/2007/02...](http://www.washingtonpost.com/wp-
dyn/content/article/2007/02/16/AR2007021602102.html) sounds like a forerunner

------
RBerenguel
Reminds me of an IBM DeveloperWorks (IIRC) script to control your computer by
whistling (I wrote about it in my blog many years ago and used it for a while,
it was fun :)

------
bbq
Great execution on every level. Incredible work.

------
joelcollinsdc
What courses/topics does one need to learn to be able to create this kind of
hardware themselves?

~~~
stonemetal
Depends on if you mean off the shelf chips or not. If not then I would expect
a second or third year EE student to be able to pull it off. It is way to
simple for an EE undergrad senior project.

If you mean design and fabricate the chips then that is a bit more.

~~~
alexchamberlain
The main thing I struggle with is the confidence to actually manufacture
something; I can sketch a schematic, but I've never produced a PCB.

~~~
cdawzrd
With companies like OSH Park[1], the cost barrier to getting a bare board
professionally manufactured is so low that you ought to just try it sometime.
If you already sketch schematics, go through a basic Eagle tutorial or two,
then try laying out a simple board based on your schematic. If you keep it
small, you'll only be out $15 or so!

[1] <http://oshpark.com>

~~~
alexchamberlain
Do they deliver internationally?

------
snake_plissken
i can't whistle! :'[

------
annon2003
You can also whistle to your android i.e. to wake up a Siri like assistant:
[https://play.google.com/store/apps/details?id=com.pannous.vo...](https://play.google.com/store/apps/details?id=com.pannous.voice.actions.free)

