ITKokka
Lesson 4 Β· Note 7

Home Alarm System

πŸ“Œ The Short Note

Download

πŸ“– Explanation

Home Alarm System

Introduction

A home alarm system is a security system designed to detect unwanted entry into a house. It can use sensors placed on doors and windows to determine whether they are open or closed.

The example in this note demonstrates how a simple OR gate can be used to build an automatic alarm system. The door sensor and window sensor provide binary inputs, while the alarm provides the output.

What Is a Home Alarm System?

A home alarm system monitors selected entry points of a house and produces an alarm output when an unwanted opening is detected.

In this example:

  • A door sensor checks whether the door is open or closed.
  • A window sensor checks whether the window is open or closed.
  • An OR gate processes the two sensor signals.
  • The alarm acts as the output.

The system represents the conditions using binary values:

  • 1 = Open β€” the sensor is activated.
  • 0 = Closed β€” the sensor is not activated.

The basic relationship is:

Door sensor + Window sensor β†’ OR gate β†’ Alarm

Key Idea: The alarm turns ON when at least one of the monitored entry points is open.

Components of the Alarm System

Door Sensor

The door sensor detects whether the door is open or closed.

In this example:

  • 1 represents an open door.
  • 0 represents a closed door.

The sensor sends this binary state to the logic circuit.

Window Sensor

The window sensor detects whether the window is open or closed.

Its binary states are:

  • 1 = window open.
  • 0 = window closed.

The sensor sends its state to the same logic circuit as the door sensor.

OR Gate

The two sensor outputs are connected to an OR gate.

An OR gate produces an output of 1 when at least one of its inputs is 1. It produces 0 only when both inputs are 0.

For the alarm system:

Q = A + B

Where:

  • A = door sensor input.
  • B = window sensor input.
  • Q = alarm output.
  • + represents the OR operation.

Alarm Output

The alarm is the output device in this example.

  • Q = 1 β†’ Alarm is ON.
  • Q = 0 β†’ Alarm is OFF.

Therefore, the alarm is activated whenever the door or window sensor indicates an open entry point.

How the Home Alarm System Works

The operation can be represented as:

Door sensor (A) + Window sensor (B)
↓
OR gate
↓
Alarm output (Q)

The OR gate checks the two sensor inputs and produces the corresponding alarm signal.

Step 1: Detect the door condition

The door sensor determines whether the door is open or closed.

Open β†’ A = 1

Closed β†’ A = 0

Step 2: Detect the window condition

The window sensor determines whether the window is open or closed.

Open β†’ B = 1

Closed β†’ B = 0

Step 3: Process the sensor signals

The two binary signals are supplied to the OR gate.

Q = A + B

The OR gate produces an output of 1 if at least one sensor has a value of 1.

Step 4: Control the alarm

The alarm responds to the output of the OR gate.

Q = 1 β†’ Alarm ON

Q = 0 β†’ Alarm OFF

Therefore:

Door/window open β†’ Sensor produces 1 β†’ OR gate produces 1 β†’ Alarm ON

Truth Table

The possible combinations of the two sensor inputs are:

Door Sensor (A)Window Sensor (B)Alarm Output (Q = A + B)
000
011
101
111

The table shows that the alarm output is 0 only when both sensors are 0.

In every other combination, at least one sensor is 1, so the alarm output becomes 1.

Key Idea: For an OR gate, the output is 1 when at least one input is 1 and 0 only when all inputs are 0.

Understanding the 0 and 1 States

The binary values in this example represent physical conditions.

Input state: 1

A sensor value of 1 means the sensor is activated.

For the home alarm:

1 = Open

This means the monitored door or window has been opened.

Input state: 0

A sensor value of 0 means the sensor is not activated.

For the home alarm:

0 = Closed

This means the monitored door or window is closed.

Output state: 1

An output of 1 means:

Alarm ON

At least one entry point is open.

Output state: 0

An output of 0 means:

Alarm OFF

Both monitored entry points are closed.

Examples of the Four Input Combinations

Example: Both Door and Window Closed

If:

A = 0
B = 0

Then:

Q = 0 + 0 = 0

The alarm remains OFF because neither the door nor the window is open.

Example: Window Open

If:

A = 0
B = 1

Then:

Q = 0 + 1 = 1

The alarm turns ON because the window is open.

Example: Door Open

If:

A = 1
B = 0

Then:

Q = 1 + 0 = 1

The alarm turns ON because the door is open.

Example: Both Door and Window Open

If:

A = 1
B = 1

Then:

Q = 1 + 1 = 1

The alarm remains ON because both sensors indicate an open entry point.

Why an OR Gate Is Used

The OR gate is suitable for this alarm example because the required condition is:

Alarm ON if the door OR the window is open.

The system does not need both entry points to be open. A single open entry point is enough to activate the alarm.

This matches the behaviour of the OR operation:

At least one input = 1 β†’ Output = 1

The example therefore demonstrates how a simple logic gate can be used to make an automatic decision based on sensor inputs.

Input–Processing–Output Model

The home alarm system can also be understood using the basic input, processing, and output model.

Input

The door sensor and window sensor provide the input signals.

Processing

The OR gate processes the two binary inputs according to the OR logical rule.

Output

The alarm responds to the resulting output signal.

The complete sequence is:

Door/window sensors
↓
Binary input values (0 or 1)
↓
OR gate processes the inputs
↓
Alarm output (0 or 1)

Exam-Focused Points

  • A home alarm system can use sensors and logic gates to detect unwanted entry.
  • In this example, the door and window sensors are the inputs and the alarm is the output.
  • The OR gate is used because the alarm must turn ON when at least one monitored entry point is open.
  • 1 = Open / sensor activated and 0 = Closed / sensor not activated.
  • The Boolean expression is Q = A + B.
  • The alarm output is 0 only when both A and B are 0.
  • The alarm output is 1 for the other three input combinations.

Key Idea: Always relate the truth table to the real-world condition. In this system, 0, 0 means both entry points are closed, so the alarm is OFF. Any input containing 1 means at least one entry point is open, so the alarm is ON.

Summary

The home alarm system example shows how a real-world security problem can be represented using binary values and a logic gate.

Door and window sensors convert physical conditions into binary inputs. The OR gate processes those inputs, and the alarm responds to the resulting output.

The complete logic is:

Door open OR Window open β†’ Alarm ON

or:

Q = A + B

This example demonstrates how logic gates can be used to make automatic decisions in practical electronic systems.

Share:
← Practical Applications of Logic GatesStreet Light Control System β†’