You remember when you wanted to be the cool kid on the block and thought it would be awesome to turn lights on/off with a simple clap? Well, that's what the Clapper is for. Yes, you could buy it in Wallmart, but 20$ for something this simple is just too much. So we made our own. We're not limited to 2 plugs. As a matter of fact, we can support up to 6 different power sources from a single board.
Hi, I'm Jeroen Goossens, and together with Cristopher Bello, we created a new and modified version of the original clapper. We had no idea how to approach it and faced numerous obstacles along the way as neither of us had ever done a hardware hack. We started out with too much hardware, but we soon figured out that one of the goals we intended to achieve is simply impossible due to API limitations. We developed on a Tessel board with an Ambient Noise module, and the only tessel relay available in the MLH Hardware Lab. Due to its simplicity, enabling more than 1 relay module, we can just plug in two more modules and have them up and running in a matter of seconds. Each module has 2 switches seperately controlled by the main board. We can thus support up to 6 switches at once.
I'd just like to interject for a moment, the code was written in Node.js, the only real dev language. (Yes, this is a joke.) By pushing the code onto the chip, we're able to run the entire thing from a simple usb powerbank, or a usb phone charger, so in terms of size, this thing is amazing. On a developer board, the size is 3 by 4 inches, and 1/4th of an inch tall. If manufactured, this could all be put on a single board smaller than your creditcard.
Walmart offers a clapper for $20 (usd). Were this to be produced in bulk, it would cost us about 5$ per unit. Not only is this cheaper, it's more compact, it's got more computational power than an arduino (not really necessary), and handles everything in an event-based manner. Events such as clapping trigger activities, which in turn will cause the board to wake from idling.
One of the additions we wished to incorporate was the inclusion of a Myo bracelet. The idea would be for someone wearing it to be able to come home, spread their fingers, a motion that Myo can detect, and all lights would turn on. Later at night, he could make a fist and the Myo would then send a signal across to the board to shut off all the lights. However, after getting the Myo to finally transmit data to my computer, we faced the horrible discovery that the Myo API isn't supported in a node environment. It was fun while it lasted, but until an API plugin comes along, there's no way for me to use it in this project.
As you can see on the video posted on youtube, the board listens to claps and snaps alike. Any significant noise above a threshold is recorded
Here is the code.