Hacker News new | past | comments | ask | show | jobs | submit login
80 FFTs Per Second To Detect Whistles and Switch On Lights (limpkin.fr)
156 points by Lightning on May 9, 2013 | hide | past | favorite | 25 comments



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


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.


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.


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.


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


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.


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


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


Assuming that the FFTs handle independent slices of data (as I can't see why you'd go back to the time domain), the data throughput they're handling is 2048 * 15 bits * 80 Hz = 2.5 Mbps. That may sound like a lot, but it's not unprecedented and it does not require huge power consumption; think of a USB connection hub or perhaps an ethernet hub.

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.


Not much I'd think. It is based on a microcontroller [1] that runs on 50MHz frequency. If my calculations are right then maximum consumption for it is 0.0486 Watt.

[1] http://www.freescale.com/webapp/sps/site/prod_summary.jsp?co...


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.


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


Looking at the hardware he's got there, 10-15 mW max.


Not much, I have seen similar projects powered by leaching energy from radio waves.


Eight paragraph of this article, http://www.washingtonpost.com/wp-dyn/content/article/2007/02... sounds like a forerunner


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


Great execution on every level. Incredible work.


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


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.


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.


It's educational and confidence building to DIY for a simple circuit. Try a board with all "though hole" components first.

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


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


Do they deliver internationally?


i can't whistle! :'[


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: