Sensors, microprocessor and actuator in a control system

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

Sensors, microprocessor and actuator in a control system

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. In a greenhouse control system, which device compares the sensor reading with the stored value?
A The actuator
B The microprocessor
2. Which statement about an actuator in a control system is correct?
A It acts when the microprocessor signals it, for example by turning on a heater
B It measures the temperature and sends the readings to the microprocessor
3. A temperature sensor produces an analogue signal. What must happen before the microprocessor can use it?
A A DAC converts it to digital data
B An ADC converts it to digital data
4. In a central heating system, the room is 15°C and the stored value is 20°C. What does the microprocessor do?
A Signals the heater to switch on
B Signals the heater to switch off
5. How often does the sensor, microprocessor and actuator process repeat in a feedback loop?
A Continuously
B Only once, when the system is switched on

Match the Pairs

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

Left columnRight column
1WHILE TRUE AThe program runs once and stops. There is no loop, so the system never checks the sensor again and the feedback loop is broken.
2IF temp < 20 THEN heater ← ON BIF temp >= 25 THEN heater ← OFF
3The sensor reading is analogue, so an ADC converts it to digital before the microprocessor can use it CKeeps the control loop running continuously so the sensor is read again and again
4The microprocessor compares the reading with a stored value and signals the actuator to turn off when the target is reached DThe order is wrong. The sensor sends readings to the microprocessor, not straight to the actuator. The microprocessor then signals the actuator.
5Sensor → Actuator → Microprocessor EThe microprocessor compares the sensor reading with the stored value and switches the actuator on
6temp ← ADC(sensor) IF temp < 20 THEN heater ← ON END Ftemp ← ADC(sensor)

Definitions

feedback loop

Fill in the Blanks

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

1.
WHILE ____ DO temp ← READ_SENSOR() ENDWHILE
2.
IF temp _ 20 THEN heater ← ON ENDIF
3.
IF temp > setValue THEN heater ← ___ ENDIF
4.
digital ← ___(analogue) IF digital < setValue THEN heater ← ON
5.
IF temp < ________ THEN heater ← ON ENDIF

Spot the Error

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

Question 1
A WHILE FALSE DO
B t ← READ_SENSOR()
C IF t < 20 THEN heater ← ON
D ENDWHILE
Question 2
A WHILE TRUE DO
B t ← READ_SENSOR()
C IF t > 18 THEN
D heater ← ON
E ENDIF
F ENDWHILE
Question 3
A raw ← READ_SENSOR()
B temp ← DAC(raw)
C IF temp < 18 THEN
D heater ← ON
E ENDIF
Question 4
A setPoint ← 22
B t ← setPoint
C IF t < setPoint THEN
D heater ← ON
E ENDIF
Question 5
A WHILE TRUE DO
B t ← READ_SENSOR()
C IF t > 30 THEN
D sensor ← ON
E ENDIF
F ENDWHILE

Answer Key

Sensors, microprocessor and actuator in a control system
Section A: Quick Questions
Q1
B — The microprocessor
Q2
A — It acts when the microprocessor signals it, for example by turning on a heater
Q3
B — An ADC converts it to digital data
Q4
A — Signals the heater to switch on
Q5
A — Continuously
Section B: Match the Pairs
Q1
WHILE TRUE → Keeps the control loop running continuously so the sensor is read again and again
Q2
IF temp < 20 THEN heater ← ON → The microprocessor compares the sensor reading with the stored value and switches the actuator on
Q3
The sensor reading is analogue, so an ADC converts it to digital before the microprocessor can use it → temp ← ADC(sensor)
Q4
The microprocessor compares the reading with a stored value and signals the actuator to turn off when the target is reached → IF temp >= 25 THEN heater ← OFF
Q5
Sensor → Actuator → Microprocessor → The order is wrong. The sensor sends readings to the microprocessor, not straight to the actuator. The microprocessor then signals the actuator.
Q6
temp ← ADC(sensor) IF temp < 20 THEN heater ← ON END → The program runs once and stops. There is no loop, so the system never checks the sensor again and the feedback loop is broken.
Section C: Definitions
Q1
feedback loop — A sensor sends readings to a microprocessor, which compares them with a stored value and signals an actuator, such as a heater, to act. This repeats continuously.
Section D: Fill in the Blanks
Q1
WHILE TRUE DO temp ← READ_SENSOR() ENDWHILE
Q2
IF temp < 20 THEN heater ← ON ENDIF
Q3
IF temp > setValue THEN heater ← OFF ENDIF
Q4
digital ← ADC(analogue) IF digital < setValue THEN heater ← ON
Q5
IF temp < setValue THEN heater ← ON ENDIF
Section E: Spot the Error
Q1
A — A control system repeats continuously in a feedback loop. WHILE FALSE means the loop never runs, so the sensor is never read. It should be WHILE TRUE DO.
Q2
C — The heater should switch on when the temperature is below the stored value. t > 18 would switch it on when the greenhouse is already warm. It should be IF t < 18 THEN.
Q3
B — Sensor readings are analogue, so the microprocessor needs an ADC (analogue-to-digital converter). A DAC converts the other way. It should be temp ← ADC(raw).
Q4
B — The reading must come from the sensor. Copying the stored value means the comparison never reflects the real temperature. It should be t ← READ_SENSOR().
Q5
D — The microprocessor signals an actuator, such as a fan, to act. A sensor only inputs data and cannot cool the greenhouse. It should be fan ← ON.