Teachers' Portal  /  A-Level Computer Science 9618  /  Hardware  /  Embedded systems, monitoring and control
Lesson pack · A-Level Computer Science 9618 · 3.1 · AS Level

Embedded systems, monitoring and control

Computers you never see. Most processors are not in PCs at all: they are hidden inside cars, ovens, thermostats and traffic lights.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
Hardware
Syllabus reference
Cambridge International AS and A Level Computer Science 9618, 3.1
Level
AS Level
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 3 of 5 in Hardware; follows RAM and ROM: SRAM, DRAM, PROM, EPROM and EEPROM; leads into Logic gates
Central model
Fig. 1: a closed feedback loop in a heating control system
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • What makes a system embedded: Click the devices in the lab to see the embedded system inside each.
  • Monitoring against control: Both kinds of system read sensors continuously.
  • Feedback: closing the loop: In a control system, what the actuators do changes the next sensor reading.
Key points to leave on the board
  • Embedded: built into a larger device, one dedicated function, firmware in ROM or flash.
  • Monitoring measures and warns; control also changes the conditions with actuators.
  • The chain: sensor, ADC, processor compares with a stored pre-set value, signal to actuator, repeat.
  • Feedback: output affects the next input, keeping conditions within limits automatically.
The core visual model

One picture every idea returns to

An embedded system is a computer system, with its own microprocessor or microcontroller, memory and input/output, built into a larger device to perform one dedicated function. A monitoring system uses sensors to measure physical quantities and records, displays or warns, but does not change the conditions. A control system also uses actuators to change the conditions. Analogue sensor readings pass through an ADC; the processor compares each reading with a pre-set value. In a control system the output affects the next input: this feedback lets the system keep conditions within limits automatically.

a control system: the output changes the next input (feedback) sensor ADC microprocessor actuator the environment temperature converts signal compares reading withstored pre-set value heater or motor room gets warmer or cooler feedback loop: measure, compare, act, measure again
Fig. 1: a closed feedback loop in a heating control system
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Computers you never see.. Most processors are not in PCs at all: they are hidden inside cars, ovens, thermostats and traffic lights. Put the figure on the board: it is the one picture every idea in the lesson returns to.Whole class, then pairs
5 to 13 minTeach and check: What makes a system embeddedClick the devices in the lab to see the embedded system inside each. Project tab 4 of the lab (Instruction sets and embedded systems) and let a student drive it while the class predicts.Whole class, then pairs
13 to 21 minTeach and check: Monitoring against controlBoth kinds of system read sensors continuously. Your turn: A hospital system reads a patient's heart rate and temperature every second and sounds an alarm if either goes outside a range. Is it monitoring or control? Explain.Pairs
21 to 30 minTeach and check: Feedback: closing the loopIn a control system, what the actuators do changes the next sensor reading. Model the worked example Describe a control system on the board, one line at a time.Mix-Pair-Share
30 to 36 minCheckThe four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong.Individual, then whole class
36 to 43 minPlenaryThe exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording.Individual, random call
43 to 45 minExit and homeworkSet the worksheet below (6 questions, 18 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

Protect the parts that carry the learning

The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.

Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.

Cut first if the build overruns: the last check in Feedback: closing the loop, never the check or the plenary.

In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.

Running the cooperative task

Mix-Pair-Share

Students mix around the room until you call pair; they pair with the nearest classmate, discuss the prompt, then mix again. Three prompts of rising difficulty, three different partners.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
A laptop is not an embedded system: it is general purpose.The test is whether the computer is part of a larger device and does one dedicated job.
A sensor does not decide anything.Sensors only send readings; it is the processor that compares the reading with the stored value and decides whether an actuator is switched.
"The sensor turns the heater on" earns nothing.Name the chain: sensor sends reading, ADC, processor compares with pre-set value, processor signals actuator.
Worksheet

Embedded systems, monitoring and control: worksheet

6 questions, 18 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · recall[2 marks]

Explain what is meant by an embedded system.

Q2 · explain[4 marks]

A manufacturer is putting an embedded system into a new smart fridge that connects to the internet. Give two benefits and two drawbacks of using an embedded system.

Q3 · explain[2 marks]

Describe the difference between a monitoring system and a control system.

Q4 · apply[5 marks]

A museum keeps the air in a display case at a constant temperature. Describe how a control system using a microprocessor does this.

Q5 · explain[2 marks]

Explain why feedback is important in a control system.

Q6 · analysis[3 marks]

A student describes a street-light system as: "The light sensor switches the lamp on when it gets dark." Rewrite the description so that it would earn full marks.

Answer key and marking notes
Q1 · 2 marks
  • A computer system (microprocessor or microcontroller with memory and I/O) built into a larger device.
  • It performs one dedicated function (and usually runs firmware stored in ROM or flash).
Q2 · 4 marks
  • Benefit: small, so it fits inside the fridge (or: cheap to mass-produce).
  • Benefit: low power consumption (or: reliable and fast at its dedicated task; can be controlled remotely).
  • Drawback: difficult to upgrade or repair; may need replacing.
  • Drawback: because it is connected to the internet it could be hacked (or: cannot be used for other tasks).
Q3 · 2 marks
  • A monitoring system uses sensors to measure and record or display data (and may warn), but does not change the conditions.
  • A control system uses the sensor data to change the conditions, by sending signals to actuators.
Q4 · 5 marks
  • A temperature sensor continuously measures the temperature in the case.
  • The analogue reading is converted to digital by an ADC.
  • The microprocessor compares the reading with pre-set values stored in memory.
  • If it is too low, a signal is sent to an actuator to switch a heater on (if too high, the heater is switched off or a fan/cooler on).
  • The process repeats continuously (feedback).
Q5 · 2 marks
  • The output (for example the heater being on) affects the next sensor reading, so the processor can see the effect of its actions.
  • This lets the system adjust automatically and keep conditions within the required limits, without human intervention.
Q6 · 3 marks
  • The light sensor sends readings (via an ADC) to the microprocessor.
  • The microprocessor compares each reading with a stored pre-set value.
  • If the reading is below the value, the microprocessor sends a signal to the actuator (relay) to switch the lamp on; the process repeats continuously.
Quiz

6 multiple-choice questions on this lesson

From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.

Q11 mark

Which statement best describes an embedded system?

  • AA microprocessor with its memory and input/output, built into a larger device to carry out one dedicated task
  • BA general-purpose computer that can run any program the user installs
  • CA network of computers that share files and printers within one building
  • DA program stored on secondary storage that starts the operating system
Q21 mark

Which of these is a control system rather than a monitoring system?

  • AA greenhouse system that opens a window when the temperature rises above a pre-set value
  • BA weather station that records rainfall every hour and displays the readings
  • CA hospital monitor that sounds an alarm if a patient's pulse falls too low
  • DA river sensor that sends a text warning when the water level is high
Q31 mark

Why is an analogue-to-digital converter (ADC) needed between a temperature sensor and a microprocessor?

  • AThe sensor produces a continuously varying analogue signal, but the processor can only process digital data
  • BThe sensor's readings must be converted to analogue before the processor can compare them
  • CThe ADC switches the heater on and off when the processor tells it to
  • DThe ADC stores the pre-set value so the processor can compare readings with it
Q41 mark

Which of these is an actuator?

  • AA motor that opens a greenhouse vent
  • BA thermistor that measures air temperature
  • CAn ADC that converts sensor readings
  • DA light sensor that detects daylight
Q51 mark

Why is feedback essential in a system that keeps a room at a set temperature?

  • AThe heater's effect changes the next sensor reading, so the processor can see when to switch the heater off again
  • BFeedback lets a person enter a new pre-set value whenever the room feels cold
  • CFeedback converts the analogue sensor readings into digital values for the processor
  • DFeedback stores every reading so the temperatures can be displayed as a graph later
Q61 mark

A heating controller starts with the heater off (Heater = FALSE). Each time it takes a reading Temp, it runs this code:

IF Temp < 21 THEN
    Heater ← TRUE
ENDIF
IF Temp > 23 THEN
    Heater ← FALSE
ENDIF
The readings, in order, are 20, 22, 24, 22, 20. What is the state of the heater after each reading?

  • Aon, on, off, off, on
  • Bon, off, off, off, on
  • Con, on, off, on, on
  • Doff, on, off, on, on
Quiz key
Q1: A

An embedded system is a computer system inside a larger device, such as a washing machine or anti-lock brakes, dedicated to one function, with its program usually held as firmware. A general-purpose computer is the opposite: it runs whatever software is installed. A network sharing files is a LAN. A program that starts the operating system is the bootstrap program, and it is held in ROM rather than on secondary storage.

Q2: A

Opening a window with an actuator changes the conditions being measured, so it is a control system. The weather station only records and displays. The hospital monitor and the river sensor both warn people, but neither changes the conditions itself, so all three are monitoring systems.

Q3: A

Sensors measure physical quantities that vary continuously, giving an analogue signal; the processor works only with binary, so an ADC converts the readings to digital. Converting to analogue is the wrong direction (that is a DAC, used on the way out). Switching a heater is the job of an actuator. The pre-set value is stored in the processor's memory, not in the ADC.

Q4: A

An actuator converts an electrical signal from the processor into physical action, such as a motor, pump, valve or relay; the vent motor is one. A thermistor and a light sensor are sensors: they measure conditions as inputs. An ADC converts signals; it neither measures nor acts on the surroundings.

Q5: A

In feedback the system's output affects its next input: heating raises the next reading, so the processor can switch the heater off when the set value is reached, keeping the room within limits without a person. Entering a new pre-set value is user input, not feedback. Converting analogue to digital is the ADC's job. Logging and graphing readings is monitoring, and does not control anything.

Q6: A

20 < 21 switches the heater on. 22 makes neither condition true, so it stays on. 24 > 23 switches it off. 22 again changes nothing, so it stays off. 20 switches it on. Switching off at the first 22 treats 22 as above the upper limit; switching on at the second 22 treats it as below 21; leaving the heater off after the first reading ignores that 20 is below 21.

Lab and demo

What to project

The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.

Slides

Slides for this lesson

A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.
Previous lessonRAM and ROM: SRAM, DRAM, PROM, EPROM and EEPROM