3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Personal Applause Sign

Step 16Build the circuit

Build the circuit
«
  • 16A.jpg
  • 16B.jpg
  • 16C.jpg
  • 16D.jpg
  • 16E.jpg
  • 16F.jpg
  • 16G.jpg
  • sch1.jpg
  • sch2.jpg
  • sch3.jpg
  • sch4.jpg
  • last photo ←
»
Build a Hackduino board as explained here.

Cut the speaker off of your wireless doorbell receiver. Leave as much wire connected to the receiver as you can.

Wire that as analog in to the Arduino. See the schematic for what parts are necessary for this and what wires go where.

Program the Arduino with the following code (source file attached below):

*
*
* Based on:
* http://www.arduino.cc/en/Tutorial/Knock
*/

int relayPin = 13; // led connected to control pin 13
int ringDetect = 0; // the knock sensor will be plugged at analog pin 0
byte val = 0; // variable to store the value read from the sensor pin
int statePin = LOW; // variable used to store the last LED status, to toggle the light
int THRESHOLD = 50; // threshold value to decide when the detected sound is a knock or not

void setup() {
pinMode(relayPin, OUTPUT); // declare the ledPin as as OUTPUT
Serial.begin(9600); // use the serial port
}



void loop() {
val = analogRead(ringDetect); // read the sensor and store it in the variable "val"
if (val >= THRESHOLD) {
digitalWrite(relayPin, HIGH); // turn the led on or off
delay(8000);
digitalWrite(relayPin, LOW); // turn the led on or off
}
delay(100); // we have to make a delay to avoid overloading the serial port
}


« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2360
Followers
200
Author:randofo(Randy Sarafan loves you!)
I am the Technology Editor here at Instructables. I am also the author of the books 'Simple Bots,' and '62 Projects to Make with a Dead Computer'. Subscribing to me = fun and excitement!