Course 6.1Lesson 1 of 3
An automated system does a job by itself. A sensor measures, a microprocessor compares the data with stored values and decides, and an actuator makes the change happen. This lesson shows what each part does and how the three work together in a greenhouse.
Try the code and the simulations beside the lesson.
Think of a street light. As the sky gets dark, it comes on. Nobody walks along the road to press a switch. Something measured the light, something decided that it was dark enough, and something switched the lamp on.
An automated system is a system that carries out a task on its own, with no person controlling each step. It is built from three kinds of part that work together:
A sensor is an input device that measures a physical quantity and sends the data to the microprocessor. A temperature sensor measures how hot the air is. A light sensor measures how bright it is. A moisture sensor measures how much water there is in soil. A proximity sensor measures how near an object is.
Many sensors give an analogue signal, which can take any value in a range. A microprocessor works only with digital data. So an analogue-to-digital converter (ADC) changes the signal into binary numbers before the microprocessor uses it.
A sensor only measures. It never decides, and it never switches anything on. This is the most common slip in examination answers. You meet the full list of sensors, and the data each one captures, in the chapter on computer hardware.
The microprocessor is a small processor that runs one program for one job. It is usually part of an embedded system. Its program holds stored values, such as the highest temperature allowed in a greenhouse. Some books call a stored value a preset value or a set point.
Again and again, the microprocessor does four things:
An actuator is an output device that turns a signal from the microprocessor into a physical movement. Electric motors, pumps, valves and solenoids are actuators. A motor can open a window. A valve can let water into a pipe. A solenoid can push a bolt to lock a door.
The picture shows a greenhouse that keeps its air from getting too hot.
Notice what each part does. The sensor measures. The microprocessor compares and decides. The actuator acts. In an examination, describe all three, in that order, and say what they measure, compare and move in the scenario you are given.
The box marked pseudocode is Cambridge pseudocode, the form used in the examination. It is shown, not run. The Python box below it does the same job, and you can run it.
CONSTANT MaxTemp ← 26
WHILE TRUE DO
INPUT Temperature
IF Temperature > MaxTemp
THEN
OUTPUT "Open the window"
ELSE
OUTPUT "Close the window"
ENDIF
ENDWHILEHere INPUT Temperature stands for taking a reading from the sensor. OUTPUT stands for the signal sent to the actuator. The loop WHILE TRUE DO never stops, because a real controller runs for as long as it is switched on.
The program uses a list of six readings in place of a real sensor. For each reading it compares, decides and prints the signal for the window motor.
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Every lesson is open to read. Enrolling also lets you:
Log in to join the discussion.
Loading…
This lesson is free to read. Enroll free to keep your place and take the tests.