Skip to content

Activity 2.2.5 — Fireplace Control Design Challenge


Learning Objectives

By the end of this lesson, students will be able to:

  1. Apply the systematic design process to a real-world combinational logic problem
  2. Define inputs and outputs based on a system specification
  3. Create a truth table from word problem requirements
  4. Simplify Boolean expressions using K-maps
  5. Design and implement a working circuit

Vocabulary

Vocabulary (click to expand)
Term Definition
Design Process Systematic approach: define inputs/outputs → truth table → Boolean expression → simplification → circuit
Safety Interlock A mechanism that prevents equipment operation when unsafe conditions exist
Truth Table to Circuit The complete design process from requirements to working hardware
Breadboarding Building a circuit on a temporary prototyping board

Part 1: The Design Challenge — Fireplace Control

Scenario

You are an engineer at a company that manufactures gas fireplace control systems. Your team needs to design a safety control system that ensures the gas valve only opens when ALL safety conditions are met.

System Requirements

A gas fireplace has the following safety inputs:

Input Description Logic Level for "Safe/OK"
T Thermocouple (detects flame) 1 = Thermocouple generating voltage (flame present)
P Pilot light sensor 1 = Pilot light is lit
O Overheat switch 1 = Normal temperature; 0 = Overheat detected
M Manual ON/OFF switch 1 = ON; 0 = OFF
Output Description Logic Level
G Gas valve control 1 = Open gas valve; 0 = Keep closed

Safety Logic Rules

The gas valve should open (G = 1) ONLY when: 1. Thermocouple is OK (T = 1) AND 2. Pilot light is lit (P = 1) AND 3. Overheat is NOT detected (O = 1) AND 4. Manual switch is ON (M = 1)

In other words: G = T · P · O · M

Key insight: Safety systems use AND logic — ALL conditions must be met (safe) for operation. This is called "fail-safe" design — if any input fails or goes unsafe, the system turns off.


Part 2: Design Process Step-by-Step

Step 1: Define Inputs and Outputs

We've already done this:

Inputs: - T = Thermocouple (1 = OK/flame) - P = Pilot sensor (1 = lit) - O = Overheat switch (1 = normal) - M = Manual switch (1 = ON)

Output: - G = Gas valve (1 = open)

Step 2: Create Truth Table

With 4 inputs, we have 16 possible combinations (2^4 = 16 rows).

T P O M G (Output)
0 0 0 0 0 (all off)
0 0 0 1 0 (no flame)
0 0 1 0 0 (no flame)
0 0 1 1 0 (no flame)
0 1 0 0 0 (no flame)
0 1 0 1 0 (no flame)
0 1 1 0 0 (manual off)
0 1 1 1 0 (no main flame)
1 0 0 0 0 (no pilot)
1 0 0 1 0 (no pilot)
1 0 1 0 0 (manual off)
1 0 1 1 0 (no pilot)
1 1 0 0 0 (overheat)
1 1 0 1 0 (overheat)
1 1 1 0 0 (manual off)
1 1 1 1 1 (ALL conditions met!)

Step 3: Write Boolean Expression

Only one row has G = 1: T=1, P=1, O=1, M=1

Minterm: G = T · P · O · M

This is already in simplest form! No K-map needed.

Key insight: In this case, the "all 1s" minterm is the only case where output = 1, so no simplification is possible. But we'll still verify with K-map.

4-variable K-map with only m15 = 1:

CD=00 CD=01 CD=11 CD=10
AB=00 0 0 0 0
AB=01 0 0 0 0
AB=11 0 0 0 0
AB=10 0 0 0 1

Only one 1 at position 15 (1111). Can't group with anything else. Expression from K-map: T·P·O·M

Same result! ✓

Step 5: Draw Circuit

Circuit: Four inputs (T, P, O, M) all go to a 4-input AND gate → output G

Step 6: Build/Implement

Use: - 4 switches for inputs - 4-input AND gate (or cascaded 2-input ANDs) - LED for output


Part 3: Adding a Warning LED

Let's extend the design: add a warning LED that turns ON when the fireplace is in a dangerous condition (gas is on but shouldn't be for any reason).

Actually, better: Warning LED (W) = ON when conditions are NOT safe but could become safe, vs OFF when clearly unsafe.

Revised Requirements

Output Condition
G (Gas Valve) ON only when T=1, P=1, O=1, M=1
W (Warning LED) ON when M=1 but (T=0 OR P=0 OR O=0)

This means: W = M · (T' + P' + O')

Simplify: W = M · (T' + P' + O') = M · (T·P·O')' [using De Morgan's]

Truth table for W:

T P O M W
0 0 0 0 0
0 0 0 1 1 (no flame, but manual on)
0 0 1 0 0
0 0 1 1 1
0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
0 1 1 1 1
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 1 (overheat!)
1 1 1 0 0
1 1 1 1 0 (all safe, no warning)

Using K-map simplification, W = M·T' + M·P' + M·O' = M(T' + P' + O')

This can also be written as: W = M · (T·P·O')'


Part 4: Hardware Implementation

Components Needed

  1. Logic Circuit:
  2. 4-input AND gate (e.g., 74HC21 or cascade 3-input ANDs)
  3. OR gate for warning logic
  4. NOT gates for inversions

  5. Input Devices:

  6. 4 SPST switches for T, P, O, M
  7. Pull-down resistors (10kΩ) on each input

  8. Output Devices:

  9. Green LED for gas valve (G)
  10. Red LED for warning (W)
  11. Current-limiting resistors (330Ω)

Circuit Diagram (Conceptual)

Vcc
 |
R(10k)
 |---[T switch]---|→ [4-AND]---|→ [G LED]
 |                |
 |---[P switch]---|→ [GND]
 |                |
 |---[O switch]---|→ [GND]   
 |                |
 |---[M switch]---|→ [GND]

Warning circuit:
[M]---+---[OR]---+---[W LED]
[T']--|          |
[P']--|          |
[O']--|-----------|

Build Steps

  1. Insert AND gate IC into breadboard
  2. Connect Vcc and GND to IC
  3. Connect switches to inputs with pull-downs
  4. Connect LEDs with current-limiting resistors
  5. Test: All switches must be ON for green LED; with manual ON but others off, red LED should light

Key insight: Always include pull-down (or pull-up) resistors on switch inputs to ensure defined logic levels when switches are open.


Practice Problem — Fireplace Design

Problem: Add a "pilot override" feature that allows the pilot light to stay lit (P = 1) even when the main manual switch is off. This is useful for lighting the pilot without full operation.

What additional input is needed, and how would you modify the truth table and circuit?

Show Solution

New Input: Let's call it S (Special/Pilot mode)

When S = 1: Pilot can stay lit even without M (manual ON) When S = 0: Normal operation (same as original)

New truth table with S (5 inputs = 32 rows):

With S=1 and M=0: - If T=1, P=1, O=1, S=1: This is pilot mode, gas valve OFF (M=0) - Need separate output for pilot valve vs main gas?

Actually, let's keep it simpler: - Pilot light can be on (P) when S=1, even if M=0 - But main gas (G) still requires M=1

The logic becomes: G = T · P · O · M (unchanged) But we need P to be controllable by S when M=0

This changes from a pure combinational logic problem to one that might need additional latching/memory, which is covered in sequential logic.

For combinational only: We could add a condition where if S=1 and T=1, gas can flow with reduced output. But that's beyond simple combinational logic.

For this exercise: The current design with G = T·P·O·M already works. The pilot valve typically has its own control in real systems. This is an extension into sequential design.


Summary

  • The systematic design process: Define inputs/outputs → Truth table → Boolean expression → Simplify → Draw circuit → Build
  • For safety systems, use AND logic — all conditions must be met for operation
  • Always verify truth table against requirements carefully
  • K-maps help simplify expressions but aren't always needed (already simple expressions)
  • Build and test your circuit to verify it works as specified

Key Reminders

  • Start by clearly defining what each input and output represents
  • Write complete truth table — don't skip any combinations
  • Double-check: Does your expression produce the correct output for ALL inputs?
  • Use pull-down or pull-up resistors on switch inputs
  • Test incrementally: verify each input affects the output correctly

Assessment Rubric — Fireplace Control

Criterion 4 — Exemplary 3 — Proficient 2 — Developing 1 — Beginning
Truth Table Complete, accurate, all 16 rows correct Complete, minor errors Incomplete (missing rows) Missing or incorrect
Boolean Expression Correct from truth table Correct expression Minor errors in expression Incorrect
Simplification K-map used correctly (if applicable) No simplification needed Attempted but errors No attempt
Circuit Clear diagram, all connections shown Circuit shown, minor omissions Circuit incomplete No circuit
Documentation Clear explanation of each step Explanation present Limited explanation No documentation

Custom activity — adapted from PLTW Digital Electronics