Security Alarm System using a Bipolar Junction Transistor Switch
Tags: security, hardware, design, electronics
Published: 2021-10-28 06:06:51

## Introduction

The security alarm system will use a bipolar junction transistor switch to detect security problems. Theft attempt and other security threats can be controlled by using this simple circuit.

For the purpose of this application, we will design a security system for one room in a house. The sensor used for each opening can be either a mechanical switch, a magnetically operated switch, or an optical sensor. Detection of an intrusion can be used to initiate an audible alarm signal. 

We will be using a mechanical switch as our sensor and use a transistor as a **NOT** gate, so that when there is an open switch in our room a transistor will show a signal that an intruder has entered.

## Equipment Used

- Resistor
- Transistor
- Buzzer
- Voltage source

## Circuit Design and Experimental Setup

### Block Diagram

![Block Diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/saol08k1f7bb6xzeyftl.png)

### Room Sensor

Room sensor is normally in a closed position and it is connected to a DC voltage source. When a door is open it creates an open circuit.

![Normal State](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ktv2mk8xygbzyyf6r12z.png)
At its normal state the room sensor looks like the above.
![On Intrusion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c630ksnqlv2dq2mqf5qn.png)
If intrusion occurs the switch will be open.

### Transistor Switch

#### BJT as a Switch

Transistor switches are used for high power devices such as
motors or lamps which often require more power than supplied by an ordinary logic gate 

The areas of operation for Transistor switch are known as the **Saturation Region** and the **Cut-Off Region**.

- **Cut-off Region**: here there is a large depletion layer
and no current flowing through the device. Therefore the transistor is switched “OFF”

- **Saturation Region**: here the depletion layer is as
small as possible and maximum current is flowing through the transistor. Therefore the transistor is switched “ON”.

### NOT Gate Transistor

A NOT gate simply inverts its input. If the input is high, the output is low, and if the input is low, the output is high

![NOT gate transistor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fygdbyq1tl1zbhhcpj6m.png)

The operation of this circuit is simple. The input is connected through resistor R2 to the transistor’s
base. When no voltage is present on the input, the transistor is turned off. Then, no current flows through the collector-emitter path. Thus, current from the supply voltage (Vcc) flows through resistor R1 to the output. This way, the circuit’s output is high when the input is low.

When voltage is present at the input, the transistor turns on, allowing current to flow through the collector-emitter circuit directly to ground. This ground path creates a shortcut that bypasses the output, which causes the output to go low.

## Simulation

We run our simulation with a voltmeter connected to the output, in place of the buzzer .

![Reading when switch is closed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ze5pvm31qmf98ihv4jos.png)

In the normal state, the switch will be closed.

![Reading when switch is open](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ffv38a0yk2x2xq7o9st.png)

When intrusion happens, the switch will open and the alarm (buzzer) will go off.