Monostable Mode Alarm System Project by Pranav

by 652410 in Circuits > Arduino

524 Views, 2 Favorites, 0 Comments

Monostable Mode Alarm System Project by Pranav

Engineering Circuit.PNG

Purpose: This project is an alarm system using the 555 timers, in bistable mode. When the motion sensor detects motion, the buzzer will go on. This is like an alarm system in my house where when the door opens or when motion has been detected the alarm will go off, you will need to put a passcode or press a key to turn off the alarm. In this project, I will teach you how to make an Alarm system with hardware and coding components. I came up with this project because I definitely wanted to use a 555 timer to build this project, but I realized that in the monostable mode it needs one input to turn which lowers the voltage of the trigger pin and turns the output to high, So I realized instead of a button I can use a motion sensor as an input and buzzer as an output for this monostable mode circuit. I then wanted to add a keypad to make this like an alarm system and that's kind of the gest of how I thought about this project.

Get the Supplies

All the components.PNG

1. BreadBoard ($4.50)

2. Arduino UNO ($27.99)

3. 1x Motion Sensor ($9.90)

4. 1x 555 timers ($12.90)

5. 1x NOT gate (7404) ($21.24)

6. 1x Buzzer ($8.56)

7. 2x 10K ohm resistors($25.39)

8.1x Polarized Capacitor ($13.39)

9. 1x Keypad ($9.99)

10. 1x Capacitor ($17.99)

11. a bunch of jumper wires ($10.99)

The total cost for this project is $162.84 ( all of the prices are not for 1 of the components most of them come in packs).

Schematic of the Circuit.

Schemematic of the circuit.PNG

This is so you could a better look at the schematic, if you understand this you can use this to build your circuit, otherwise you can go to the next step and look at the steps for wiring.

Building and Connecting the Wires

Wiring the 555.PNG
Start wiring.PNG
Connecting keypad.PNG
555 timer.PNG

First, start with connecting 555 timers: let's start wiring the alarm with the 555 timers with the motion sensor. I made my circuit in Monostable where the motion sensor is the input, and when motion is detected the buzzer will go off. A monostable mode is when a 555 timer has one input that starts the circuit. So what you should do is make sure that the polarized capacitor is connected to the ground (negative pin) and connect the positive end of the polarized capacitor to the threshold. Connect terminal 1 of the blue capacitor to control voltage and terminal 2 to the ground. connect the 10k ohm resistor from power to the discharge pin of the 555 timers. Use a wire to connect the discharge to the threshold pin. Connect the trigger pin to the output pin of the NOT gate (7404), from here connect the input pin of the NOT gate to the signal of the motion sensor. The reason I have a NOT gate in this circuit is that without it, the circuit does the opposite of what I want it to do when the motion sensor detects motion, the buzzer will stop, and when there's no motion the buzzer will be on. I know using a NOT gate would switch what was happening because the NOT gate produces the opposite of the input. From here just add any pin from your Arduino to the out pin of the 555 timers and the positive pin of the buzzer.

Connecting the 555 timers in monostable is one of the most important steps for this project as this is this will actually help to turn the buzzer once motion is detected.

Second, connect pins to the keypad: One of the easiest steps to do is to connect the Arduino pins to the keypad, first, connect pins 2,3,4, and 5 to the 4-row pins. Then connect the digital pins 6,7,8 and 9 to the 4-column pins. (you can use any digital pin and any analog pin for this).

This will ensure that keypad can be clicked for the buzzer to turn off in this project, after you finished connecting the components start coding.




Code

You should download, the code once you finished making the circuit to check out if your project works.

if (digitalRead(timer) ==1)// when the motion is detected the out will equal a one starting the rest of this code to work out.

{ Serial.println("Buzzer ON"); // prints that the buzzer is on to the serial monitor

digitalWrite(buzzpin, HIGH);

if (key == '7')// when the 7th key is pressed then the buzzer will turn off this can change to any number or alphabet

{digitalWrite (buzzpin, LOW); //set the buzz pin to low so it turns off

Serial.println ("Buzzer OFF");// prints that the buzzer is off to the serial monitor delay(5000);

}

}

else

digitalWrite (buzzpin, LOW);

}

This line of code is one of the most important parts of the code as this allows for the keypad to actually stop the buzzer from making a noise. So to make the Arduino and the 555 timer interface I needed to connect the Arduino in the output and when the 555 timer reads a value of 1, the buzzer will turn on. The reason the else statement has a buzzpin too low is so that the buzzer can turn off much easier. For this project its is just one key that needs to be pressed to stop the buzzer, so you can change its value to anything.

Check My Project Out!