Car Protection / Warning System
Introduction
A car protection or warning system is a security system that uses sensors to detect abnormal conditions around a vehicle and produces a warning when a problem is detected.
The system can monitor conditions such as:
- An engine being started without the authorized key.
- A door, boot, or window being opened or damaged.
- Movement detected around the vehicle.
This example demonstrates how an OR gate can be used to combine several sensor inputs so that the alarm turns ON when any one of the sensors is activated.
What Is a Car Protection / Warning System?
A car protection system uses sensors to monitor different conditions related to the vehicle.
Each sensor produces a binary signal:
- 0 โ The abnormal condition is not detected.
- 1 โ The abnormal condition is detected.
The sensor outputs are connected to a logic circuit. The circuit processes the inputs and controls the alarm signal.
Key Idea: The alarm turns ON when at least one sensor detects a problem.
Components of the System
Engine Sensor
The engine sensor detects whether the engine has been started without the authorized key.
Its input is represented by A.
- A = 0 โ No abnormal engine condition detected.
- A = 1 โ Engine started without the key.
Shutter-Damage Sensor
The shutter-damage sensor monitors doors, windows, or the boot.
Its input is represented by B.
- B = 0 โ No abnormal opening or damage detected.
- B = 1 โ A door, window, or boot is opened or damaged.
Movement Sensor
The movement sensor detects movement around the vehicle.
Its input is represented by C.
- C = 0 โ No movement detected.
- C = 1 โ Movement detected.
Alarm Signal
The alarm is the output device of the system.
Its output is represented by Q.
- Q = 0 โ Alarm OFF.
- Q = 1 โ Alarm ON.
Logic-Gate Operation
The system needs to turn the alarm ON if any one of the sensors detects a problem.
An OR gate is suitable for this purpose because an OR gate produces an output of 1 when at least one input is 1.
The three sensor inputs are:
- A โ Engine sensor
- B โ Shutter-damage sensor
- C โ Movement sensor
They are connected to a three-input OR gate.
Engine Sensor (A) โโโ
โ
Shutter Sensor (B) โโผโโโ OR Gate โโโ Alarm (Q)
โ
Movement Sensor (C) โThe Boolean expression is:
Q = A + B + C
Here, the + symbol represents the OR operation.
How the System Works
The operation can be understood as a sequence:
Sensors detect conditions
โ
Sensor inputs become 0 or 1
โ
OR gate processes A, B and C
โ
Alarm output Q is producedWhen No Problem Is Detected
If all three sensors produce 0:
A = 0, B = 0, C = 0
Then:
Q = 0 + 0 + 0 = 0
The alarm remains OFF.
When One Sensor Is Activated
Suppose the movement sensor detects movement:
A = 0, B = 0, C = 1
Then:
Q = 0 + 0 + 1 = 1
The alarm turns ON.
When Several Sensors Are Activated
If more than one sensor detects a problem, the OR gate still produces 1.
For example:
A = 1, B = 1, C = 0
Therefore:
Q = 1 + 1 + 0 = 1
The alarm remains ON.
Truth Table
Since there are three binary inputs, there are:
2ยณ = 8 possible input combinations
| A | B | C | Q = A + B + C |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |
The only combination that produces an output of 0 is:
A = 0, B = 0, C = 0
For every other combination, the output is 1.
Key Idea: An OR gate produces 0 only when all its inputs are 0. If at least one input is 1, the output is 1.
Example Situations
Example: Engine Started Without the KeyIf the engine sensor detects an unauthorized start:
A = 1
Even if the other sensors are inactive:
B = 0, C = 0
The output is:
Q = 1 + 0 + 0 = 1
Therefore, the alarm turns ON.
Example: Door or Window OpenedIf the shutter-damage sensor detects that a door or window has been opened:
A = 0, B = 1, C = 0
Then:
Q = 0 + 1 + 0 = 1
The alarm turns ON.
Example: Movement Near the CarIf the movement sensor detects movement:
A = 0, B = 0, C = 1
Then:
Q = 0 + 0 + 1 = 1
The alarm turns ON.
Why Is an OR Gate Used?
The required condition is:
Alarm ON if any sensor detects a problem.
This is exactly the behaviour of an OR gate.
| Requirement | Suitable logic |
|---|---|
| Alarm ON if at least one sensor is activated | OR gate |
| Alarm OFF only when all sensors are inactive | OR gate |
This makes the OR gate suitable for combining multiple warning sensors.
Exam-Focused Points
Key Idea: The Boolean expression for this system is Q = A + B + C.
Key Idea: The alarm output Q = 1 when at least one sensor input is 1.
Key Idea: With 3 binary inputs, the number of possible combinations is 2ยณ = 8.
Important terms to remember
- A โ Engine sensor
- B โ Shutter-damage sensor
- C โ Movement sensor
- Q โ Alarm output
- OR gate โ Produces 1 when at least one input is 1
Summary
A car protection/warning system can use several sensors to detect abnormal conditions. The engine sensor, shutter-damage sensor, and movement sensor provide binary inputs to an OR gate.
The OR gate combines these inputs and produces the alarm output:
Q = A + B + C
If all sensors are inactive, the output is 0 and the alarm remains OFF. If any one or more sensors are activated, the output becomes 1 and the alarm turns ON.
This example shows how a simple logic gate can be used to build an automatic warning system for a real-world application.