Devices that use embedded systems

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Devices that use embedded systems

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which device contains an embedded system?
A A washing machine
B A printed textbook
2. What job does an embedded system do in a microwave oven?
A Lets the user install new games and apps
B Controls the cooking time and power level
3. Which is a use of an embedded system in a car?
A Editing documents for the driver
B Engine management that controls fuel and ignition
4. Which statement about an alarm system is correct?
A It uses an embedded system to read sensors and sound the alarm
B It has no processor and works by magic
5. How does an automatic lighting system use an embedded system?
A It switches lights on or off based on light or movement sensor data
B It lets the user browse the internet on the light switch

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Washing machine or microwave AAn embedded system in a car that controls fuel injection and engine timing using sensor data
2Car engine management BIF money >= price THEN release_item
3An embedded system in a security system uses sensors and sounds a siren when it detects movement CA domestic appliance that uses an embedded system to control its timer, temperature and programs
4An embedded system in a vending machine checks the money inserted and releases the chosen item DAutomatic lighting uses an embedded system with a fixed program. Users do not install or run different programs on it.
5A vending machine is a general-purpose computer because it has a processor EIF motion_sensor = TRUE THEN sound_alarm
6Automatic lighting is controlled by the user running different programs on it FA processor does not make a device general-purpose. A vending machine has an embedded system that does one set job: selling items.

Definitions

embedded system

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
IF doorClosed = TRUE ____ OUTPUT "Start wash" ENDIF
2.
IF fuelLevel _ 10 THEN OUTPUT "Low fuel" ENDIF
3.
IF movement = TRUE THEN ______ "ALARM" ENDIF
4.
IF lightLevel < 30 THEN OUTPUT "Lamp on" _____
5.
_____ moneyIn < price INPUT coin ENDWHILE

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A INPUT door FROM sensor
B IF door = 'closed' THEN
C START motor
D ENDWHILE
Question 2
A INPUT seconds FROM keypad
B WHILE seconds < 0 DO
C seconds <- seconds - 1
D ENDWHILE
E TURN OFF magnetron
Question 3
A INPUT temp FROM engine_sensor
B IF temp > 100 THEN
C TURN OFF cooling_fan
D ENDIF
Question 4
A INPUT motion FROM sensor
B IF motion = TRUE
C SOUND siren
D ENDIF
Question 5
A INPUT light FROM sensor
B IF light < 20 THEN
C lamp <- ON
D ELSE:
E lamp <- OFF
F ENDIF

Answer Key

Devices that use embedded systems
Section A: Quick Questions
Q1
A — A washing machine
Q2
B — Controls the cooking time and power level
Q3
B — Engine management that controls fuel and ignition
Q4
A — It uses an embedded system to read sensors and sound the alarm
Q5
A — It switches lights on or off based on light or movement sensor data
Section B: Match the Pairs
Q1
Washing machine or microwave → A domestic appliance that uses an embedded system to control its timer, temperature and programs
Q2
Car engine management → An embedded system in a car that controls fuel injection and engine timing using sensor data
Q3
An embedded system in a security system uses sensors and sounds a siren when it detects movement → IF motion_sensor = TRUE THEN sound_alarm
Q4
An embedded system in a vending machine checks the money inserted and releases the chosen item → IF money >= price THEN release_item
Q5
A vending machine is a general-purpose computer because it has a processor → A processor does not make a device general-purpose. A vending machine has an embedded system that does one set job: selling items.
Q6
Automatic lighting is controlled by the user running different programs on it → Automatic lighting uses an embedded system with a fixed program. Users do not install or run different programs on it.
Section C: Definitions
Q1
embedded system — A computer built into a device to do one set job, such as in a washing machine, car engine control, alarm, automatic lighting or vending machine.
Section D: Fill in the Blanks
Q1
IF doorClosed = TRUE THEN OUTPUT "Start wash" ENDIF
Q2
IF fuelLevel < 10 THEN OUTPUT "Low fuel" ENDIF
Q3
IF movement = TRUE THEN OUTPUT "ALARM" ENDIF
Q4
IF lightLevel < 30 THEN OUTPUT "Lamp on" ENDIF
Q5
WHILE moneyIn < price INPUT coin ENDWHILE
Section E: Spot the Error
Q1
D — The washing machine program uses an IF, so it must end with ENDIF, not ENDWHILE.
Q2
B — The microwave should keep counting down while seconds is greater than 0. With < 0 the loop never runs. It should be WHILE seconds > 0 DO.
Q3
C — The engine management system should switch the fan ON when the engine is too hot, not OFF. It should be TURN ON cooling_fan.
Q4
B — The IF statement is missing THEN. It should be IF motion = TRUE THEN.
Q5
D — Pseudocode ELSE has no colon after it. The automatic lighting program should use just ELSE.