Three-Sensor OR Gate Alarm Logic
Two cascaded OR gates assert one alarm indicator when any of three maintained sensor inputs is HIGH. The circuit omits sensor physics, latching, acknowledgment, diagnostics, and fail-safe output hardware.
What You'll Learn
- Trace Motion, Smoke, and Window through the two-stage OR cascade.
- Verify that seven of the eight input combinations assert Alarm.
- Distinguish any-of aggregation from all-of and majority policies.
- Apply OR associativity without overlooking unequal path depth.
- Identify functions a deployable alarm controller needs beyond combinational logic.
How It Works
Three maintained switches represent Motion, Smoke, and Window sensor signals. Motion and Smoke feed the first 2-input OR gate. Its output and Window feed a second OR gate, which drives the only alarm light.
The implemented equation is Alarm = Motion + Smoke + Window. When all three inputs are 0, both OR stages output 0 and the indicator is off. Every other input vector contains at least one 1, so Alarm is 1.
Because OR is associative, the two-gate cascade has the same steady-state truth table as an ideal 3-input OR. The physical paths are not identical, however: Motion and Smoke traverse two gates, while Window traverses only the final gate. A timed implementation may therefore exhibit unequal propagation delays or brief transients during simultaneous input changes.
This template isolates the combinational aggregation rule. It does not model sensor physics, alarm latching, acknowledgment, diagnostics, or fail-safe wiring, all of which matter in deployed safety and security systems.
Truth Table
Three sensor signals feed a cascaded OR. Only Motion = Smoke = Window = 0 keeps Alarm low.
| Inputs | Output | |||
|---|---|---|---|---|
| Motion | Smoke | Window | Alarm | |
| 0 | 0 | 0 | 0 | All sensors low — alarm off. |
| 0 | 0 | 1 | 1 | Window alone asserts the alarm. |
| 0 | 1 | 0 | 1 | Smoke alone asserts the alarm. |
| 0 | 1 | 1 | 1 | Smoke and Window high — alarm remains 1. |
| 1 | 0 | 0 | 1 | Motion alone asserts the alarm. |
| 1 | 0 | 1 | 1 | Motion and Window high — alarm on. |
| 1 | 1 | 0 | 1 | Motion and Smoke high — alarm on. |
| 1 | 1 | 1 | 1 | All sensors high — alarm on. |
Boolean Expression
The alarm is high when Motion, Smoke, or Window is high.
This grouping follows the production graph: Motion and Smoke enter the first OR, whose result is ORed with Window.
De Morgan's law gives the equivalent NAND-of-complements expression.
Try It Step-by-Step
Set the listed controls in the embedded circuit, then compare the observed modeled state with the expected result.
- 1Motion=0Smoke=0Window=0Expected:
Alarm = 0What you'll see:All three inputs are low, so neither OR gate asserts and the alarm light is off. - 2Motion=1Smoke=0Window=0Expected:
Alarm = 1What you'll see:Motion alone passes through both OR stages and asserts Alarm. - 3Motion=0Smoke=1Window=0Expected:
Alarm = 1What you'll see:Smoke alone also asserts Alarm, demonstrating the symmetry of the first OR gate. - 4Motion=0Smoke=0Window=1Expected:
Alarm = 1What you'll see:Window enters the final OR directly and asserts Alarm even though the first gate remains low.
Components Used
Applications and Design Context
Alarm-zone summaries. Several conditioned sensor channels can be combined into one aggregate request while retaining separate diagnostics elsewhere.
Fault aggregation. Overvoltage, overcurrent, and overtemperature flags can assert a common fault response.
Interrupt requests. Multiple peripheral request lines can feed one interrupt input, with a status register identifying the active source.
Building automation. Independent occupancy or hazard conditions can request a common notification or control action.
Test-result summaries. Several pass/fail monitors can OR their fail bits into one overall-failure indicator.
Frequently Asked Questions
Why use OR rather than AND?
The intended policy is “assert if any sensor is active.” AND would assert only when Motion, Smoke, and Window were all high simultaneously, which is a different and much narrower condition.
How can I require two sensors before asserting the alarm?
For three sensors, a two-of-three vote is Motion·Smoke + Motion·Window + Smoke·Window. That network requires AND gates for the pairs and an OR stage to combine them; it is not the circuit currently shown.
How can I add a fourth sensor?
Cascade another 2-input OR after the current final gate, or restructure the network as a balanced OR tree. Associativity preserves the steady-state Boolean result.
How can a sensor be disabled for maintenance?
Qualify each sensor with its own enable before aggregation: (Motion·E_M) + (Smoke·E_S) + (Window·E_W). Disabling one channel then masks only that sensor.
Is this a complete real-world alarm controller?
No. It demonstrates only ideal Boolean aggregation. A real alarm input normally includes line supervision, fault discrimination, filtering or debounce, latching, reset policy, power-loss behavior, and a rated output stage.