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.
What could possibly go wrong?
This sig is intentionally blank
Clap on. Clap off.
80 But why, your limiting your frequency range by your time domain range...derp derp
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.
http://www.washingtonpost.com/wp-dyn/content/article/2007/02/16/AR2007021602102.html
geek. lawyer.
Just whistle while you work!
WShreee.... Click!
*Dammit*
"There is more worth loving than we have strength to love." - Brian Jay Stanley
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.
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/
http://www.amazon.com/The-Clapper-Sound-Activated-Switch/dp/B0000CGKLR
The Clapper.
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."
Does it work like the voice-activated doors in Airplane 2?
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.
Fucken retards
If there's swearing in the bible, it might be worth a read.
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.
Nowadays one finds individuals whistiling on roads and that can be of gr8 problem.. Anyways it might be more expensive
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.
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
I can whistle and get a sandwich, now that I'm married.
Sometimes I have to added "sudo" before it, though.
I can't whistle!
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.
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....
... is spinning in his grave. Call me when the OP trips over this Wikipedia entry. http://en.wikipedia.org/wiki/Goertzel_algorithm
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.
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?
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.
What's a transistor? Can I write code for it in C++?
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?
Yay, an over engineered Clapper that has a million more ways for a false trigger...
/reads article, whistles appreciatively.
/power goes out
I'm joking. But everyone is concerned about accessibility these days. I had Bell's Palsy and now can't whistle.
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
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!?!"
Some people were quite wrong.
You should read the Bible.
To pique your interest, I'll recommend you start with Ezekiel 23:20.
No swears, but there are some kinky sex scenes.
Do you even lift?
These aren't the 'roids you're looking for.
Thanks, Inspector Clouseau!
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.
If there's swearing in the bible, it might be worth a read.
Go forth and multiply.
SJW n. One who posts facts.
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
I can't whistle, you insensitive clod!
So it's basically The Clapper, except with whistles? How soon will we start seeing infomercials for it?
Can we call it the Tourette Bible?
For their trains in 1968.
http://www.youtube.com/watch?v=QTF1Gq5V6Mo
...Robert Adler's Space Command television remote control which used struck aluminum rods to generate ultrasonic frequencies detected by the set.
And another one for detonating the little explosives. (Obligatory "The Living Daylights" reference)
I have a parrot, you insane bastard! Are you trying to blow up my house?
-- I have a private email server in my basement.
hook up a hotplate to the wistle switch and it turns off on the whistle.
"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 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.
9 * 9 = 81
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.
I can't whistle, but even if I could, I'd much rather say, "Computer, lights!"