80FFTs Per Second To Detect Whistles (and Switch On Lights) 156
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.
Put your lips together and blow... (Score:3)
Re: (Score:2)
Multiple rooms (Score:5, 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.
Re: (Score:2)
The real danger is watching Star Wars with these in the room. *R2 sad whistle*
Re: (Score:2)
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.
Comment removed (Score:5, Funny)
Re:Multiple rooms (Score:5, 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!
Re:Multiple rooms (Score:5, 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.
Re: (Score:2)
In a case where we already have a 100% perfect solution, then of course it's unacceptable.
Re: (Score:3)
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
Re: (Score:2)
Re: (Score:2)
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 [wikipedia.org]
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).
Re: (Score:2)
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.
Re: (Score:2)
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.
Prior art from the 1950s... (Score:3)
http://www.washingtonpost.com/wp-dyn/content/article/2007/02/16/AR2007021602102.html
Re: (Score:2)
Just... (Score:3)
Just whistle while you work!
WShreee.... Click!
*Dammit*
I remember seeing a whistle device... (Score:5, 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 [amazon.co.uk]
Re: (Score:2)
Re: (Score:2)
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.
Re: (Score:2)
Re: (Score:2)
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.
Re: (Score:2)
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 [amazon.co.uk]
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.
Re: (Score:2)
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.
Re: (Score:3)
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
Re: (Score:2)
This has been done, kind of. (Score:2)
The Clapper. [wikipedia.org]
Re: (Score:2)
Kids These Days... (Score:4, 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...)
Re: (Score:2)
Reminded me of the formulas and tables in ye olde CRC Handbook. Neat project, tho.
Re:Kids These Days... (Score:5, 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.
Re: (Score:2)
You can do auto- and crosscorrelation in linear time in frequency domain.
Re: (Score:2)
Re: (Score:2)
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.
Mod parent up please (Score:2)
Re: (Score:2)
Re: (Score:2)
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 :)
Re: (Score:2)
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!
Re: (Score:2)
Why do you need to go digital to detect a simple sinusoidal wave? And even if you do, FFTs are still overkill.
Re: (Score:2)
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 overk
Re: (Score:2)
Sure. But unless you have very particular requirements, DSP systems or C libraries would be overkill in a switch for most things.
Re: (Score:2)
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. T
Re: (Score:2)
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
New generation of pranksters (Score:2)
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.
Re: (Score:2)
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?
Re: (Score:2)
I hate when that happens!
Re: (Score:2)
Re: (Score:2)
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?
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Woz would like that!
Could be done a lot cheaper (Score:2)
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 l
Re: (Score:2)
And what will you do with a noise that randomly falls into the frequency window?
Re: (Score:2)
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.
Sir, I salute you! (Score:2)
We can tell you've got teh True Geek... ...a normal guy would have made it make the girls' knickers fall down.
Turning on lights? (Score:2)
I can whistle and get a sandwich, now that I'm married.
Sometimes I have to added "sudo" before it, though.
Re: (Score:2)
In the past, there have been much more interesting things [wikipedia.org] you could do by whistling ...
Re: (Score:2)
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.
You insensitive clod! (Score:2, Funny)
I can't whistle!
FFT's ? kids these days (Score:2)
Re: (Score:3)
Re: (Score:2)
"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?
Re: (Score:2)
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.
Re: (Score:2)
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.
Breaking Glass Detector (Score:2)
Why naive? (Score:2)
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?
Re: (Score:2)
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
Oblig (Score:2)
Already been done... (Score:2)
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 m
An interesting aside (Score:2)
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.
The Whistler? (Score:2)
So it's basically The Clapper, except with whistles? How soon will we start seeing infomercials for it?
LEGO did it (Score:2)
For their trains in 1968.
http://www.youtube.com/watch?v=QTF1Gq5V6Mo [youtube.com]
See also... (Score:2)
But does it have a whistle code for stun gas? (Score:2)
And another one for detonating the little explosives. (Obligatory "The Living Daylights" reference)
Birdbrained (Score:2)
I have a parrot, you insane bastard! Are you trying to blow up my house?
Be ready for... (Score:2)
"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!"
I want one with voice recognition (Score:2)
Re:fucken retards (Score:5, Funny)
See, that's why the bible is so hard to believe. There's just no way all those things happened one minute apart.
Re: (Score:2)
Fucken retards
If there's swearing in the bible, it might be worth a read.
Re: (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 ..."
Re: (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 ..."
Would the Adulterer's Bible do, instead? http://en.wikipedia.org/wiki/Wicked_Bible [wikipedia.org]
Re: (Score:3)
Re: (Score:3)
If there's swearing in the bible, it might be worth a read.
Go forth and multiply.
Re: (Score:2)
The fictional future is always so much cooler than the real future.
Re: (Score:3)
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.
Re: (Score:2)
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*?
Re: (Score:2)
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.)
Re:as popular as the clapper! (Score:4, 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.
Re: (Score:2)
Re: (Score:2)
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.
Re: (Score:2)
Re: (Score:2)
"Actually, while the mean voltage is 230V"
Its AC - the mean voltage should be zero
Re: (Score:3)
I'm pretty sure he's talking about the RMS [wikipedia.org] value. Or an approximation thereof if he uses a cheap multimeter.
Re: (Score:2)
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 somethin
Re: (Score:2)
The Whistle Switch. Had one myself
http://www.etsy.com/listing/91099093/vintage-whistle-switch?utm_source=google&utm_medium=product_listing_promoted&utm_campaign=vintage_mid&gclid=CMaxzOv9iLcCFYyF6wodxR0A1A [etsy.com]
Re: (Score:2)
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.
Re: (Score:2)
I like these gestures better [youtube.com].
Re: (Score:2)
I'm pretty sure I've seen that bit on the Simpson's but I can't find a reference for it.
Re: (Score:2)
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.
Re: (Score:2)
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.