Slashdot Mirror


80FFTs Per Second To Detect Whistles (and Switch On Lights)

New submitter Mathieu Stephan writes "Hello everyone! Some people told me that my latest project might interest you. I'm not sure you publish this kind of projects, but here it goes. Basically, it is a small platform that recognizes whistles in order to switch on/off appliances. It will be obviously more useful for lighting applications: just walk in a room, whistle, and everything comes on. The project is open hardware, and all the details are published on my website." The linked video is worth watching for the hidden-camera footage alone: it would be hard to not keep playing with this sensor.

156 comments

  1. Put your lips together and blow... by Vombatus · · Score: 2

    What could possibly go wrong?

    --
    This sig is intentionally blank
    1. Re:Put your lips together and blow... by noh8rz10 · · Score: 2

      where is apk these days? this sounds like a $10,000 challenge...

    2. Re:Put your lips together and blow... by Anonymous Coward · · Score: 0

      That's what she said!

  2. as popular as the clapper! by Undead+Waffle · · Score: 0

    Clap on. Clap off.

    1. Re:as popular as the clapper! by Anonymous Coward · · Score: 0

      Clap on. Clap off.

      Yes, but with gestures. Here's one for you: ,,|,,

    2. Re:as popular as the clapper! by Nutria · · Score: 3, Interesting

      Back in the 70s (when The Clapper first came out), we had a similar contraption that was basically a plastic whistle stuck to a hollow rubber ball. Squeeze the ball, the whistle whistles and the lamp turns on.

      As a teenager I enjoyed it, but I'm sure the adults thought it got old really quickly.

      --
      "I don't know, therefore Aliens" Wafflebox1
    3. Re:as popular as the clapper! by Anonymous Coward · · Score: 0

      And once you got it, it's really hard to get rid of the clap too.

    4. Re:as popular as the clapper! by GerryHattrick · · Score: 1

      We still have ours, but use it only for the Christmas tree lights. It will switch 13A at 240V, but that doesn't seem very safe.

    5. Re:as popular as the clapper! by SuricouRaven · · Score: 1

      British, then?

      Most of Europe runs at 230V, but only the UK has 13A sockets - and it was 240V back in the seventies, before the EU agreed on a common voltage.

    6. Re:as popular as the clapper! by Zontar+The+Mindless · · Score: 1
      --
      Il n'y a pas de Planet B.
    7. Re:as popular as the clapper! by Anonymous Coward · · Score: 0

      Making a loud enough "SSSssss" noise did the same thing as the plastic sqeeze-ball whistle doodad, but was much less attention getting than clapping. A sort of fun way of messing with lights when you know people had them plugged into that thing.

    8. Re:as popular as the clapper! by GerryHattrick · · Score: 1

      On this chilly Spring morning in England it is 234.9V. That's either a British compromise, or yet more evidence that we never did really want to join 'Europe'.

    9. Re:as popular as the clapper! by maxwell+demon · · Score: 1

      Actually, while the mean voltage is 230V, there's a tolerance interval of 10%, so the actual voltage at any time may be anywhere between 207V and 253V (actually, in the UK the lower tolerance level is at 216V, to avoid problems with old devices). In other words, you might measure 234.9V elsewhere in Europe (actually, it also was already inside the tolerance interval in Germany even when the German voltage was just 220V).

      --
      The Tao of math: The numbers you can count are not the real numbers.
    10. Re:as popular as the clapper! by rossdee · · Score: 1

      "Actually, while the mean voltage is 230V"

      Its AC - the mean voltage should be zero

    11. Re:as popular as the clapper! by Anonymous Coward · · Score: 0

      We had one of these when I was a child, in the '70s. It was called (obviously) the "Whistle Switch". We lost the squeeze bulb whistle, but discovered that almost any loud noise would turn the light on, or off. As children, my siblings and I thought that it got old quickly!

    12. Re:as popular as the clapper! by lxs · · Score: 2

      I'm pretty sure he's talking about the RMS value. Or an approximation thereof if he uses a cheap multimeter.

    13. Re:as popular as the clapper! by Anonymous Coward · · Score: 1

      ssssssssssh
       
      That's the sound of a Lockheed 1011 going over your head

    14. Re:as popular as the clapper! by nabsltd · · Score: 1

      Making a loud enough "SSSssss" noise did the same thing as the plastic sqeeze-ball whistle doodad, but was much less attention getting than clapping.

      My roommate in college had one of these, and had lost the squeeze part, so whenever we just hissed at the light to turn it on or off.

      An advantage to doing it this way was that the sensor couldn't pick up the noise as easily, so you had to aim your head at it, which would have allowed multiple independent units in the same room.

    15. Re:as popular as the clapper! by Man+Eating+Duck · · Score: 1

      Actually, while the mean voltage is 230V, there's a tolerance interval of 10%, so the actual voltage at any time may be anywhere between 207V and 253V (actually, in the UK the lower tolerance level is at 216V, to avoid problems with old devices). In other words, you might measure 234.9V elsewhere in Europe (actually, it also was already inside the tolerance interval in Germany even when the German voltage was just 220V).

      This is probably to compensate for voltage drops on long stretches of power lines. My family used to live in a house in the countryside, on the start of a several km long circuit. The voltage was boosted so that the folks at the end of the circuit should get around 220V, and we had about 248V from the wall (I believe 242V was the upper limit, which is 10% as you mention). This was enough that light bulbs burned out very quickly. We reported it to the utility company, and they installed resistors or something (I was very young at the time, I'm not sure exactly how this worked) in the few first houses on the circuit, this mitigated the problem.

      --
      Are you a grammar Nazi? I'm trying to improve my English; please correct my errors! :)
    16. Re:as popular as the clapper! by Anonymous Coward · · Score: 0

      People around here have strong opinions on RMS values.

  3. FFT by Anonymous Coward · · Score: 0

    80 But why, your limiting your frequency range by your time domain range...derp derp

    1. Re:FFT by Anonymous Coward · · Score: 0

      The upper frequency limit is set by Nyquist.
      Perhaps he is only limiting his frequency resolution.

  4. Multiple rooms by Dan+East · · Score: 4, Funny

    Interesting idea, but I think there would be serious scalability problems. Imagine if this was in each room in your home, and the doors to the rooms were open. Whistling in one room would almost certainly trigger the lights in the adjacent rooms as well. You would run into similar issues trying to control multiple lights in the same room independently, unless you started getting into more complex whistle patterns then those shown in the video. In that case you would start to sound like a songbird, or maybe R2D2.

    And finally two side notes...
    Not for use in emergency situations while eating saltine crackers.
    This method of controlling the lights would be extremely popular in the von Trapp house.

    --
    Better known as 318230.
    1. Re:Multiple rooms by Anonymous Coward · · Score: 0

      Not necessarily. You could connect all your receivers together somehow, weight their inputs and get the one that has the strongest signal.

    2. Re:Multiple rooms by Anonymous Coward · · Score: 0

      "It has a 15 feet listening range..."

    3. Re:Multiple rooms by xstonedogx · · Score: 1

      The real danger is watching Star Wars with these in the room. *R2 sad whistle*

    4. Re:Multiple rooms by Molochi · · Score: 1

      Funny. But the last time I tried using any kind of auditory control I found that I would have to give up music and movies to get it to work.

      --
      "The Adobe Updater must update itself before it can check for updates. Would you like to update the Adobe Updater now?"
    5. Re:Multiple rooms by dgatwood · · Score: 1

      A better solution would be to pick the microphone where the sound arrived first and reject that frequency on all other mics until about a second after the first microphone loses the signal. That way you're guaranteed to get the one that is closest in distance even if there are gain differences caused by variations in room acoustics.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    6. Re:Multiple rooms by houghi · · Score: 5, Funny

      You would run into similar issues trying to control multiple lights in the same room independently,

      That can easily be solved. All you need is a switch to decide what light you want to trigger. You could place that switch near the door, so you can do it the moment you come in.

      --
      Don't fight for your country, if your country does not fight for you.
    7. Re:Multiple rooms by gnasher719 · · Score: 4, Insightful

      Interesting idea, but I think there would be serious scalability problems. Imagine if this was in each room in your home, and the doors to the rooms were open. Whistling in one room would almost certainly trigger the lights in the adjacent rooms as well.

      Typical slashdot combination of the Nirvana fallacy (a solution that isn't 100% perfect is not acceptable), and a totally defeatist attitutude to technical problems.

    8. Re:Multiple rooms by maxwell+demon · · Score: 1

      A solution which fails in typical situations is not just not 100% perfect, it's seriously limited.

      However, in this case I doubt that this specific problem actually exists: It should be trivial to have the lights in different rooms react to different frequencies.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    9. Re:Multiple rooms by mathieu.stephan · · Score: 2

      Hi! Actually if you put one whistled in one "inside" room corner this won't happen :) The microphone is omnidirectional, but not that much :)

    10. Re:Multiple rooms by Custard+Horse · · Score: 4, Funny

      All you need is a switch to decide what light you want to trigger. You could place that switch near the door, so you can do it the moment you come in.

      A ridiculous idea - it'll never catch on!

    11. Re:Multiple rooms by StripedCow · · Score: 1

      Imagine if this was in each room in your home, and the doors to the rooms were open.

      If you want to separate a signal based on multiple sources, then there are algorithms for that.
      Have a look here: http://en.wikipedia.org/wiki/Kalman_filter

      This type of filter has been used, for example, to separate the heartbeat signals from a mother and her fetus, using multiple sensor elements (one close to the mother's heart).

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    12. Re:Multiple rooms by Anonymous Coward · · Score: 0

      The image that came to my mind, for some messed up reason, was someone whistling in their house, then suddenly it exploded.

      I just woke up, sue me. I can't help it that I have psychotic dreams and dreams of being the overbrain that controls the sentinels from the Matrix devouring cities in my way.

      I mean what?

    13. Re:Multiple rooms by St.Creed · · Score: 1

      Unfortunately, it's pretty hard to determine which frequency arrives first, since frequency is the number of wavetops arriving over time. If you have a very small sampling interval in which to determine frequency, your sampled frequency starts to deviate from the real frequency really fast.

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
    14. Re:Multiple rooms by Hentes · · Score: 1

      In a case where we already have a 100% perfect solution, then of course it's unacceptable.

    15. Re:Multiple rooms by Anonymous Coward · · Score: 0

      Move to New York City and you'll never again have the problem of a "house with multiple rooms"

    16. Re:Multiple rooms by gstoddart · · Score: 2

      Typical slashdot combination of the Nirvana fallacy (a solution that isn't 100% perfect is not acceptable), and a totally defeatist attitutude to technical problems.

      It's not a defeatist attitude towards technical problems. It's a jaded belief that, sometimes, just throwing technology at a problem doesn't get you a better solution, just more technology.

      Like Microsoft's "house of the future" or whatever it's called -- sometimes it seems like technology for the sake of having more technology, not because it's anything anybody needs.

      I think this sounds kind of cool, but for the most part, it's pretty gimmicky and overkill in a Rube Goldberg kinda way. I applaud the work done for this, but I still shake my head and wonder who else wants it?

      I wouldn't be interested in whistling on my lights, but I've certainly known a couple of quadriplegics who would have thought this was pretty awesome though.

      Technology is cool, but it doesn't need to be fetishized as something we need to deploy in all cases -- like the idea of an internet connected fridge. Sure, we could do it, but do we really need an internet connected fridge?

      --
      Lost at C:>. Found at C.
    17. Re:Multiple rooms by Anonymous Coward · · Score: 0

      I had a keychain in the 80s that beeped when you whistled... Walk like an Egyptian, Patience and a bunch of other songs would set it off all the time.

    18. Re:Multiple rooms by Anonymous Coward · · Score: 0

      a better solution would be voice then you could name the lights... EasyVR Shield for Arduino... you could control multiple devices.

    19. Re: Multiple rooms by Anonymous Coward · · Score: 0

      Excuse me? Honeywell kitchen computer 1950....Stubborn housewives wouldn't bother to learn the binary code for asparagus...its people who ruin elegant gt technological solutions they are given in good faith by visionaries like bill gates and Ron popeil. Though not sure Microsoft was the original 'house of the future'.

    20. Re: Multiple rooms by Anonymous Coward · · Score: 0

      Simple....you whistle and the house robot comes to you with a surface tablet, and you select the appropriate charm... ....and log in, select desktop, launch a virtual raspberry pi in a 110v sandboxed virtual 240v British home tendered in max, and navigate using voice to the appropriate room, then using kinect gestures to select a virtual light switch, or, if you have sp1, the digital version of an analog dimmer.

      Smooth.

  5. Prior art from the 1950s... by crankyspice · · Score: 2

    http://www.washingtonpost.com/wp-dyn/content/article/2007/02/16/AR2007021602102.html

    --
    geek. lawyer.
    1. Re:Prior art from the 1950s... by cultiv8 · · Score: 1
      --
      sysadmins and parents of newborns get the same amount of sleep.
    2. Re:Prior art from the 1950s... by Anonymous Coward · · Score: 0

      There's a reason this technology was abandoned in favor of IR remotes - sonic controls can be accidentally triggered by music on the radio or TV, by the jingling of your keys, and any other random ambient sounds like a boiling teakettle.

      Although it would be a fun novelty to have around, and a neat prank to program the lights to turn off every time your spouse's favorite tv theme song plays.

  6. Just... by SuperKendall · · Score: 2

    Just whistle while you work!

    WShreee.... Click!

    *Dammit*

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  7. I remember seeing a whistle device... by ls671 · · Score: 4, Interesting

    I remember seeing a whistle device that you attach to your key ring. When you lose your keys, you whistle and your key ring beeps.

    https://www.amazon.co.uk/Tobar-Keyfinder-Keyring-Whistle-Activated/dp/B000246JIQ

    --
    Everything I write is lies, read between the lines.
    1. Re:I remember seeing a whistle device... by mvar · · Score: 1

      Now that's a blast from the past..in the 80s these were quite popular

    2. Re:I remember seeing a whistle device... by TheInternetGuy · · Score: 1

      I remember seeing a whistle device that you attach to your key ring. When you lose your keys, you whistle and your key ring beeps.

      https://www.amazon.co.uk/Tobar-Keyfinder-Keyring-Whistle-Activated/dp/B000246JIQ

      Yes it is a problem that can be solved with very simple analog electronics. That was my first thought when I read the summary, but I guess that wouldn't be cool today.

      --
      If my comment didn't sound as good in your head as it did in mine, then I guess we all know who's to blame
    3. Re:I remember seeing a whistle device... by dgatwood · · Score: 1

      Even funnier is putting a bunch of those things in the same room, whistling, and laughing as they set each other off. Bonus points if you do this on the shelf at Wal-Mart.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    4. Re:I remember seeing a whistle device... by 93+Escort+Wagon · · Score: 1

      Now that's a blast from the past..in the 80s these were quite popular

      I don't think they were popular back then. While I saw them on late night television commercials all the time, I never met anyone who actually owned one.

      --
      #DeleteChrome
    5. Re:I remember seeing a whistle device... by newcastlejon · · Score: 1

      A blast from the past indeed.

      --
      If God forks the Universe every time you roll a die, he'd better have a damned good memory.
    6. Re:I remember seeing a whistle device... by Anonymous Coward · · Score: 0

      In the netherlands there were very popular.
      I think almost half the households had one.

    7. Re:I remember seeing a whistle device... by Inda · · Score: 2

      I bought a friend one because he's always losing his keys; losing them at my house *facepalm*

      It goes off when he's got the radio on, when a door creaks, when dogs bark, when his phone goes off... Well worth the couple of quid I spent on it. muhahaha

      --
      This post contains benzene, nitrosamines, formaldehyde and hydrogen cyanide.
    8. Re:I remember seeing a whistle device... by Anonymous Coward · · Score: 0

      Living daylights?

    9. Re:I remember seeing a whistle device... by Marillion · · Score: 1

      Except that for the one that I had you had to whistle something very close to a B-flat.

      --
      This is a boring sig
    10. Re:I remember seeing a whistle device... by Man+Eating+Duck · · Score: 1

      Now that's a blast from the past..in the 80s these were quite popular

      I don't think they were popular back then. While I saw them on late night television commercials all the time, I never met anyone who actually owned one.

      I did :)

      My dad bought a bunch of these for next to nothing in the late eighties, and I gave a few to friends. After the novelty factor wore off, however, no-one used them. People don't really mislay their keys a lot, and they were somewhat bulky on the keychain.

      --
      Are you a grammar Nazi? I'm trying to improve my English; please correct my errors! :)
  8. Re:fucken retards by Concerned+Onlooker · · Score: 4, Funny

    See, that's why the bible is so hard to believe. There's just no way all those things happened one minute apart.

    --
    http://www.rootstrikers.org/
  9. Clap on Clap off by Anonymous Coward · · Score: 0

    http://www.amazon.com/The-Clapper-Sound-Activated-Switch/dp/B0000CGKLR

  10. This has been done, kind of. by Animats · · Score: 1
    1. Re:This has been done, kind of. by DigiShaman · · Score: 1

      Clap on *clap clap*! Clap off *clap clap*! Clap on clap off; the Clapper.

      http://www.youtube.com/watch?v=cfgN5tUgjb8

      The ultimate in 80s cheese.

      --
      Life is not for the lazy.
  11. Kids These Days... by lobiusmoop · · Score: 3, Interesting

    They've got so much cheap compact compute horsepower to play with, it's almost obscene. 2048-wide FFT? In my day you would be overjoyed with a simple time-domain autocorrelation pitch detector.

    (Lawn, etc...)

    --
    "I bless every day that I continue to live, for every day is pure profit."
    1. Re:Kids These Days... by Anonymous Coward · · Score: 0

      Thank you. I'm glad someone suggested a more sane approach to the detection problem :) FFT's seem like total overkill for the problem at hand.

    2. Re:Kids These Days... by kermidge · · Score: 1

      Reminded me of the formulas and tables in ye olde CRC Handbook. Neat project, tho.

    3. Re:Kids These Days... by jmv · · Score: 4, Interesting

      Actually, an FFT is often cheaper than autocorrelation because it's N*log(N) whereas auto-correlation is N^2. In any case, it's insanely cheap on today's machines.

    4. Re:Kids These Days... by Casandro · · Score: 1

      You can do auto- and crosscorrelation in linear time in frequency domain.

    5. Re:Kids These Days... by Anonymous Coward · · Score: 0

      So you need an FFT to get into the frequency domain, and then back. So your complexity is still N*log(N)

    6. Re:Kids These Days... by Anonymous Coward · · Score: 1

      Not N^2, N*P, where P are the number of frequencies you want to check. This makes it good for pitch detection, where you care about a limited number of pitches, and would need pretty high resolution on the FFT since the bins don't align with your desired frequencies.
      It can also do streaming updates, while FFT is typically used on overlapped windows.

    7. Re:Kids These Days... by Sarten-X · · Score: 1

      I'd just go with a small handful of analog tuning circuitry. From the article (can't watch the video currently), it sounds like the device detects a two-tone whistle and toggles a relay. That's not terribly hard to do with two adjustable tuners, some voltage comparators, and a few other bits for cleaning.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    8. Re:Kids These Days... by tibit · · Score: 1

      And how do you propose to do autocorrelation? The way it's done today is by doing convolution using - wait for it - FFTs. Same goes for multiplying long polynomials or long numbers together, or even running FIR or IIR filters. An FFT is necessary for efficient digital processing of almost any kind, no matter whether you are actually interested in the frequency domain version of the inputs!

      --
      A successful API design takes a mixture of software design and pedagogy.
    9. Re:Kids These Days... by tibit · · Score: 1

      Not only that, but really FFTs and similar transforms are everywhere. Long FIRs? You need FFT. Correlators? Too. Polynomial multiplication? Yep. Long integer multiplication? Yep. The list goes on and on.

      --
      A successful API design takes a mixture of software design and pedagogy.
    10. Re:Kids These Days... by tibit · · Score: 1

      Yep, but the tones are arbitrary and I just can't help how people miss this key property. The tones can by at any of a range of frequencies.

      BTW, you can do FFT in analog domain quite simply, it just requires a lot of buffers. Multiplication by a constant is done by resistor dividers, addition requires a buffer stage. Easy-peasy. A bare bone time-discrete but voltage-continuous, lower accuracy FFT could probably be done with emitter followers for buffers :)

      --
      A successful API design takes a mixture of software design and pedagogy.
    11. Re:Kids These Days... by Anonymous Coward · · Score: 0

      Don't you need an FFT to convert from time domain to frequency domain?

    12. Re:Kids These Days... by tlhIngan · · Score: 1

      You can do auto- and crosscorrelation in linear time in frequency domain.

      ... and given a time domain signal, how are you going to switch it to the frequency domain without using an FFT or DCT? The goal is to avoid using a transform...

    13. Re:Kids These Days... by Richy_T · · Score: 1

      Why do you need to go digital to detect a simple sinusoidal wave? And even if you do, FFTs are still overkill.

    14. Re:Kids These Days... by tibit · · Score: 1

      The problem is: doing it reliably in analog domain is not as simple as you might think. The various "solutions" presented in books or in various forums share the common feature: they generally don't work. They work in very controlled circumstances only. It's not merely about detecting a sine wave. It's about detecting a fundamental frequency in a possible wave of harmonics, and detecting its frequency, and then detecting the frequency of another sine wave, and comparing the two. FFT is nowhere near an overkill. It's a standard building block of modern DSP systems, just like strcpy would be expected in a C library.

      --
      A successful API design takes a mixture of software design and pedagogy.
    15. Re:Kids These Days... by Richy_T · · Score: 1

      Sure. But unless you have very particular requirements, DSP systems or C libraries would be overkill in a switch for most things.

    16. Re:Kids These Days... by tibit · · Score: 1

      They are less of an overkill than you think. Many "simple" devices like light dimmers and power supplies, do in fact have a built-in microprocessor, even if it's just an 8-pin part. They do far more DSP than you might imagine. A power supply controller does DSP filtering so that you don't depend on analog components for the frequency response of the control loop. I'd take an 8-pin microcontroller over an 8-pin switcher controller that needs a dozen external components just to set the operating conditions. The MCU-based solution, if properly engineered, can be more reliable in presence of faults. Many analog power supply controller chips happily run a power supply into failure - working around their limitations requires adding external active components, quickly making the whole thing cost too much in parts, assembly, testing, returns, etc.

      --
      A successful API design takes a mixture of software design and pedagogy.
    17. Re:Kids These Days... by tibit · · Score: 1

      You of course miss the point that it's not a mechanical switch. It's a switch that detects whistles. The major reason why previous "simple" solutions similar to that (clap-activated keyfobs and switches) never gained marketshare is simple: they never worked correctly. You need a CPU/MSU and DSP techniques. I have no idea what makes you think DSP is somehow overcomplex. Manufacturing semiconductor ICs is a horribly complicated process. Running some FFTs got nothing to what it takes to make the chips. Are you going to argue now that we should not use semiconductors either?! Once you've got semiconductor ICs in your project, it's not a big deal to have an MCU with some DSP code running on it.

      --
      A successful API design takes a mixture of software design and pedagogy.
  12. Voice-activated doors by Anonymous Coward · · Score: 1

    Does it work like the voice-activated doors in Airplane 2?

    1. Re:Voice-activated doors by xstonedogx · · Score: 1

      The fictional future is always so much cooler than the real future.

    2. Re:Voice-activated doors by Zontar+The+Mindless · · Score: 2

      We got Star Trek's communicators without their Eugenics Wars of the 1990s.

      I'd say the real future is working out pretty well so far. I'm happy.

      --
      Il n'y a pas de Planet B.
    3. Re:Voice-activated doors by isorox · · Score: 1

      Really, we have hand held devices that can talk to another on the other side of a planet *without any infrastructure, not even an orbiting ship*?

    4. Re:Voice-activated doors by Anonymous Coward · · Score: 0

      Really, we have hand held devices that can talk to another on the other side of a planet *without any infrastructure, not even an orbiting ship*?

      Yes, their called HF radios. People routinely do exactly this with fancy algorithms and just a few watts of transmit power.

    5. Re:Voice-activated doors by Anonymous Coward · · Score: 0

      "They're", it's "they're" (short for they are), for fuck's sake.

    6. Re:Voice-activated doors by Zontar+The+Mindless · · Score: 1

      We have ubiquitous hand-held audio/video/computing devices with no wires.

      No, they don't have little StarFleet insignia plastered all over them.

      No, if you say "Beam me up, Scotty!" into one of them, you won't be instantly transported elsewhere.

      (P.S. Thanks for utterly missing the point.)

      --
      Il n'y a pas de Planet B.
  13. Wasn't this a joke? by Anonymous Coward · · Score: 0

    I could have sworn some TV show made a joke about such a device, with the inventor seemingly unaware that clapping is easier than whistling. I guess life does imitate art.

    1. Re:Wasn't this a joke? by Cenan · · Score: 1

      I'm pretty sure I've seen that bit on the Simpson's but I can't find a reference for it.

      --
      ... whatever ...
  14. Re:fucken retards by OhANameWhatName · · Score: 1

    Fucken retards

    If there's swearing in the bible, it might be worth a read.

  15. New generation of pranksters by macraig · · Score: 1

    If this device becomes a commodity found in every home, it will spawn a whole new generation of pranksters who will sneak up to houses and "hack" the lighting and appliances with a whistle. We'll wind up needing two-factor authentication for our whistle-houses.

    1. Re:New generation of pranksters by Anonymous Coward · · Score: 0

      Maybe we can call them "house-phreakers".

    2. Re:New generation of pranksters by macraig · · Score: 1

      Woz would like that!

    3. Re:New generation of pranksters by isorox · · Score: 1

      If this device becomes a commodity found in every home, it will spawn a whole new generation of pranksters who will sneak up to houses and "hack" the lighting and appliances with a whistle. We'll wind up needing two-factor authentication for our whistle-houses.

      Just like the problem of people waking around firing infrared through the window at your tv and changing the channel?

    4. Re:New generation of pranksters by macraig · · Score: 1

      I hate when that happens!

    5. Re:New generation of pranksters by Farmer+Pete · · Score: 1

      I know you are kidding, but this actually happens to me all the time. Damn kids.

    6. Re:New generation of pranksters by Agent0013 · · Score: 1

      I love driving down a neighborhood and using my TV-B-Gone to turn off people's TV sets. It's really good at a bar during a big game. Once I even used it at a Vegas casino on the giant TV's for the betting on horse races and other sports. Good times!

      --

      -- ssoorrrryy,, dduupplleexx sswwiittcchh oonn.. -Quote found on actual fortune cookie.
    7. Re:New generation of pranksters by isorox · · Score: 1

      I know you are kidding, but this actually happens to me all the time. Damn kids.

      Did you tell them to get off your lawn?

    8. Re:New generation of pranksters by Farmer+Pete · · Score: 1

      They weren't on my lawn. I think they have line of sight from their house through my window and to the TV.

  16. Pranks can cost u.. by maniya · · Score: 1

    Nowadays one finds individuals whistiling on roads and that can be of gr8 problem.. Anyways it might be more expensive

  17. Could be done a lot cheaper by Casandro · · Score: 1

    Just hook up your microphone to a schmidt-trigger. Your output will have your dominant frequency in it. Often the inputs of your microcontroller will already have schmidt-triggers, look at the data sheet, if not get a controller with a built-in op-amp.
    Then just count the zero-crossings, by having one timer count them, and having another timer regularly looking at the output of the first counter.

    The great advantage is that you can use much cheaper microcontrollers, which need much less power and have much less stringend power requirements, also saving you the switchmode power supply. That is, of course, at a slightly lowered sensitivity.

    1. Re:Could be done a lot cheaper by Thor+Ablestar · · Score: 1

      And what will you do with a noise that randomly falls into the frequency window?

    2. Re:Could be done a lot cheaper by Casandro · · Score: 1

      Well low noise would not trigger the Schmidt-Trigger. Noise that will trigger it will trigger it randomly. so you'll end up with a frequency of zero crossing that randomly changes.

  18. Sir, I salute you! by Black+Parrot · · Score: 1

    We can tell you've got teh True Geek... ...a normal guy would have made it make the girls' knickers fall down.

    --
    Sheesh, evil *and* a jerk. -- Jade
  19. Turning on lights? by SeaFox · · Score: 1

    I can whistle and get a sandwich, now that I'm married.
    Sometimes I have to added "sudo" before it, though.

    1. Re:Turning on lights? by maxwell+demon · · Score: 2

      In the past, there have been much more interesting things you could do by whistling ...

      --
      The Tao of math: The numbers you can count are not the real numbers.
    2. Re:Turning on lights? by isorox · · Score: 1

      I can whistle and get a sandwich, now that I'm married.
      Sometimes I have to added "sudo" before it, though.

      I whistle and get a bowl of bolognaise.

      Tipped over my head.

  20. You insensitive clod! by Anonymous Coward · · Score: 2, Funny

    I can't whistle!

  21. Old electrical engineer here by Anonymous Coward · · Score: 0

    I applaud the enterprising spirit, but am a bit surprised at the complexity of the device (had a look at the schematic) and the fact that it uses a powerful microcontroller, for something that could be achieved with two transistors, a tiristor and a few passive components. It would be a lot sturdier, too. Also, it would last much longer than the solution presented here, since it doesn't need any programmable memory (which is estiated to survive about one decade). Yes, ten years seems like a long time, but typically, electrical switches last much longer, and implementing this whistle-switch with the three active components I mentioned, would guarantee that it lasts practically indefinitely.

    1. Re:Old electrical engineer here by Casandro · · Score: 1

      Well if you have a hammer everything looks like a nail. Those kids don't know anything else than FFT. It's a shame really.

    2. Re:Old electrical engineer here by Anonymous Coward · · Score: 0

      I always thought it would be interesting to build a fully mechanical sound actuated device. All you need is something that resonates, and the ability for that resonator to trigger something like an escapement that would let a weight fall. If mere sound can scratch grooves on a wax cylinder, I don't see why it can't be done. You could make a remote control with little bells in it. You might have to have a cone on the front and point it at the device; but I bet it could work. Just hanging around my musician friend in music stores, we hear snare drums rattle when you play other instruments. A drum membrane might be a good detector.

  22. FFT's ? kids these days by darkHanzz · · Score: 1

    In my day we would use a couple of IIR filters, instead of FFT's. Much faster, better control over bandwidth. But, hey, then you'd actually have to do some math to design them....

    1. Re:FFT's ? kids these days by ikaruga · · Score: 2

      FFTs will allow the analysis of all frequencies up to half the sampling frequency using a single algorithm per execution. A processing method using IIR filters can only be used for a single band/filter. If whistles were the sole application I would agree with you(heck, I'm just a 27 old recently graduated from my PhD course and I think I could do that using only analog components). But the developer himself talks about other applications that could use other sounds. Instead of implementing and executing different IIRs for every single application, using a single FFT is far more productive. Plus, we're in the second decade of the 21st century. Unless there is explicit need to do so or you're a passionate about optimization, our hardware can handle "bloat".

    2. Re:FFT's ? kids these days by Viol8 · · Score: 1

      "our hardware can handle "bloat"."

      Your average modern car could probably handle carrying half a ton of lead in the back and still out accelerate the equivalent from the 60s. Does that make it sensible to carry the lead around when you could quite easily take it out - ie make the car much more efficient and even faster?

    3. Re:FFT's ? kids these days by serviscope_minor · · Score: 1

      Your analogy is bad.

      The lead neither improves development time nor adds to the flexibility.

      The FFT does both, so yet it is worth it.

      --
      SJW n. One who posts facts.
    4. Re:FFT's ? kids these days by Viol8 · · Score: 1

      Yeah , right.

      That attitude is why american "sports" cars like the corvette , camaro or mustang use huge gas guzzling V8 engines because its cheaper to just chuck in something off the shelf than spend time optimising it and ending up with something more efficient and powefull.

    5. Re:FFT's ? kids these days by Sorny · · Score: 1

      "Yeah , right.

      That attitude is why american "sports" cars like the corvette , camaro or mustang use huge gas guzzling V8 engines because its cheaper to just chuck in something off the shelf than spend time optimising it and ending up with something more efficient and powefull."

      Uh, first off, the Corvette is the only car you listed there that is actually a sports car. Second, the Corvette gets better mileage than almost any other sports car on the market; certainly better than anything that has performance anywhere near the Vette. Thirdly, GMs entire small block development program starts with making more power for less weight and in smaller external dimensions for use in the Corvette. The engines are beat upon in Vettes, and then given wimpy cams, anemic intakes & exhausts, and have their displacement lowered to be rolled out to the masses (to be fair the Camaro usually gets the un-gimped motor); the pickups & SUVs tend to get the gimped motors...

      FWIW, the 5.7L LS6 small block engine in my '02 Z06 makes >405HP, gets me ~28MPG highway (~24MPG mixed driving), and weighs about 400lb complete in a car that weighs about 3000lbs and corners at >1G. The motor in my Vette has smaller external dimensions, less weight, less complexity, more power, vastly more torque at usable RPM, and costs less than most much smaller displacement, heavier, less efficient, larger external dimensioned, lower torque producing engines with turbos, multiple cams, and other high-tech trickery. Sometimes K.I.S.S. is the right way to go...

      --
      OSX pwns.
  23. FFT's for a whistle detector? Goertzel ... by Jimbookis · · Score: 0

    ... is spinning in his grave. Call me when the OP trips over this Wikipedia entry. http://en.wikipedia.org/wiki/Goertzel_algorithm

  24. Re:fucken retards by maxwell+demon · · Score: 2

    Maybe someone should write the "Fucking Bible":

    "In the beginning god created the fucking heaven and the damn earth. And the earth was bloody formless and goddamn empty ..."

    --
    The Tao of math: The numbers you can count are not the real numbers.
  25. Breaking Glass Detector by GrahamCox · · Score: 1

    Puts me in mind of a breaking-glass detector my rather naive (in electronics terms) boss came up with in the early 1980s as a security device. Technology wasn't really up to FFTs or anything in those days, so it had two filters, one to detect the low frequency 'thump' of whatever hit the glass, followed by the high frequency 'tinkle' of when the pieces hit the ground, after a short delay which was also considered. It did work given ideal conditions, but in practice was extremely unreliable. I wonder why?

    1. Re:Breaking Glass Detector by stoploss · · Score: 1

      Okay, I'll bite: what was wrong with the design?

      Poor filter design (though surely it wasn't mistakenly set up with a high/low-pass filter in a bandpass arrangement)? Flawed assumptions about the "thump" followed by a high frequency "tinkle" when glass breaks? Difficulty constructing a state machine for these conditions? Poor/nonlinear mic response over the frequency range required?

      Was it subject solely to false negatives or were false positives a factor as well?

    2. Re:Breaking Glass Detector by GrahamCox · · Score: 1

      False positives and negatives. Given that these were connected to alarm systems that a) rang those annoying bells/sirens and much worse b) called up some agency to come and deal with the "break-in", they gained a notorious reputation in a very short space of time after they went on the market.

      It's surprising how many noises in the environment fit this profile, e.g. sometimes even a car driving past would trigger it, thunderclaps and wind, etc.

      You could probably make something today that would work much more reliably based on the same principle (i.e. acoustic profile) but a two-point 2-pole filter, comparator and a one-shot multivibrator and an AND gate does not a unique acoustic profile make. I think that was clear to everyone involved in the project except its designer. That was frequently the way with that particular guy, for whom the Peter Principle was well evident.

  26. Re:FFT's for a whistle detector? Goertzel ... by Thor+Ablestar · · Score: 1

    To use Goertzel, you basically should need to know the frequency of whistle beforehand. It's nice when you have a fixed-frequency whistle but bad if you whistle by mouth. The autocorrelation algo or any other pitch determination algo would behave better.

  27. New Electrical Engineer here by Anonymous Coward · · Score: 0

    What's a transistor? Can I write code for it in C++?

    1. Re:New Electrical Engineer here by Anonymous Coward · · Score: 0

      LOL. What is this 'analogue' of which you speak?

    2. Re:New Electrical Engineer here by EmagGeek · · Score: 1

      Hahaha ROFL^2!

      I just spit my coffee all over my oscilloscope!

  28. Why naive? by Viol8 · · Score: 1

    Seems like a clever idea to me even if there was too much enviromental variability for it to succeed. Pressure mats and other affordable 80s style security devices weren't exactly reliable or hard to foil either.

    Presumably you had a far better solution so why not fill us in about it?

  29. Clapper Overkill by Anonymous Coward · · Score: 0

    Yay, an over engineered Clapper that has a million more ways for a false trigger...

  30. Oblig by ThatsNotPudding · · Score: 1

    /reads article, whistles appreciatively.

    /power goes out

  31. did you think about disabled that can't whistle? by Anonymous Coward · · Score: 0

    I'm joking. But everyone is concerned about accessibility these days. I had Bell's Palsy and now can't whistle.

  32. Already been done... by GregC63 · · Score: 1

    You might want to check this out at the patent office first, there was a device I remember from the late 70's, early 80's very similar to the "Clapper" called "The Whistle Switch" that did exactly the same thing.

    You plugged it in the outlet then plugged whatever appliance (typically a lamp) you wanted to turn on or off. It came with a little whistle that had a squeeze bulb on it that you would produce a high pitched whistle and toggle the device on and off.

    You could also reproduce tone whistling with your mouth. Here is a vintage site that has one.

    http://www.etsy.com/listing/91099093/vintage-whistle-switch?utm_source=google&utm_medium=product_listing_promoted&utm_campaign=vintage_mid&gclid=CMaxzOv9iLcCFYyF6wodxR0A1A

  33. Re:fucken retards by Anonymous Coward · · Score: 0

    On the seventh damn day he rested and said it was damn good. Then he rested damn it.

    And he said "Where can I get some Damn bait!?!"

  34. Some people told me that my latest project might i by Anonymous Coward · · Score: 0

    Some people were quite wrong.

  35. Re:fucken retards by Anonymous Coward · · Score: 0

    You should read the Bible.

    To pique your interest, I'll recommend you start with Ezekiel 23:20.

  36. Re:fucken retards by larry+bagina · · Score: 1

    No swears, but there are some kinky sex scenes.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  37. Thanks! by Thrill+Science · · Score: 0

    Thanks, Inspector Clouseau!

  38. An interesting aside by jandersen · · Score: 1

    In China it is quite common to have something similar: the lights in communal areas, like on staircases in apartment buildings, switch on when you make a noise, like clapping your hands or stomping your feet. Or, as I can attest, if you fart loudly enough.

  39. Re:fucken retards by serviscope_minor · · Score: 2

    If there's swearing in the bible, it might be worth a read.

    Go forth and multiply.

    --
    SJW n. One who posts facts.
  40. Re:fucken retards by RabidReindeer · · Score: 1

    Maybe someone should write the "Fucking Bible":

    "In the beginning god created the fucking heaven and the damn earth. And the earth was bloody formless and goddamn empty ..."

    Would the Adulterer's Bible do, instead? http://en.wikipedia.org/wiki/Wicked_Bible

  41. No Go by Anonymous Coward · · Score: 0

    I can't whistle, you insensitive clod!

  42. The Whistler? by WillyWanker · · Score: 1

    So it's basically The Clapper, except with whistles? How soon will we start seeing infomercials for it?

  43. Re:fucken retards by Farmer+Pete · · Score: 2

    Can we call it the Tourette Bible?

  44. LEGO did it by cnaumann · · Score: 1
  45. See also... by Beorytis · · Score: 1

    ...Robert Adler's Space Command television remote control which used struck aluminum rods to generate ultrasonic frequencies detected by the set.

  46. But does it have a whistle code for stun gas? by RogueWarrior65 · · Score: 1

    And another one for detonating the little explosives. (Obligatory "The Living Daylights" reference)

  47. Birdbrained by Nethead · · Score: 1

    I have a parrot, you insane bastard! Are you trying to blow up my house?

    --
    -- I have a private email server in my basement.
  48. hmm, self regulating tea pot by Anonymous Coward · · Score: 0

    hook up a hotplate to the wistle switch and it turns off on the whistle.

  49. Be ready for... by 3vi1 · · Score: 1

    "As a representative of the RIAA, we'd like to buy your whistle-recognition technology. We think we could make tens of millions of dollars each year by suing people who whistle our songs as providing unlicensed public performances. We'll give you as much as $200.00 for complete ownership of your patents!"

  50. Re:fucken retards by Anonymous Coward · · Score: 0

    I do this with hymns and Christian children's songs. It really livens them up a little. Warning: pick your audience more carefully than I have. ;-)

    "Jesus loves me, this I fucking know,
    For the fucking bible tells me fucking so,
    Little shits to him belong,
    They're fucking weak but he's damn strong..."

    Etc.

  51. Re:fucken retards by Anonymous Coward · · Score: 0

    9 * 9 = 81

  52. Mod parent up please by archer,+the · · Score: 1

    I've seen music analysis tools that use an FFT to try to determine pitches performed during a particular window. The bins do not line up. I've been using correlation with the appropriate sinusoids (2 per pitch) and had better results.

  53. I want one with voice recognition by Vrtigo1 · · Score: 1

    I can't whistle, but even if I could, I'd much rather say, "Computer, lights!"