HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Automated Systems: Sensors, Microprocessors and Actuators
  1. 1Sensors, microprocessors and actuators
  2. 2Control loops and feedback
  3. 3Automated systems in use: advantages and disadvantages
  1. Computer Science
  2. /Automated Systems: Sensors, Microprocessors and Actuators
  3. /Sensors, microprocessors and actuators

Course 6.1·Lesson 1 of 3

Sensors, microprocessors and actuators

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.

about 25 min1 simulation1 practice question
Lesson 1 of 3Show all lessonsHide
Automated Systems: Sensors, Microprocessors and Actuators
  1. 1Sensors, microprocessors and actuators
  2. 2Control loops and feedback
  3. 3Automated systems in use: advantages and disadvantages

Try the code and the simulations beside the lesson.

A job with nobody at the switch

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:

  • sensors, which measure;
  • a microprocessor, which decides;
  • actuators, which make a physical change.

Sensors: the inputs

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: where the decision is made

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:

  1. it reads the data from the sensor;
  2. it compares the data with the stored value;
  3. it decides what must happen;
  4. it sends a signal to an actuator, if a change is needed.

Actuators: the outputs that move

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 three working together

A block diagram of a greenhouse system. A temperature sensor sends an analogue signal to an ADC, which sends digital data to a microprocessor holding the stored value 26 degrees Celsius. The microprocessor sends a signal to an actuator, a motor that opens or closes the window. A dashed feedback arrow runs from the window back to the sensor, labelled: the air temperature changes, so the next reading changes.

The picture shows a greenhouse that keeps its air from getting too hot.

  1. A temperature sensor measures the air. An ADC turns the reading into digital data.
  2. The microprocessor compares the reading with the stored value, 26 ∘C26\ ^\circ\text{C}26 ∘C.
  3. If the reading is higher, it sends a signal to the actuator. A motor opens the window.
  4. If the reading is not higher, it sends a signal to close the window.
  5. The process repeats, so the next reading is taken a short time later.

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 same idea in pseudocode and in Python

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.

pseudocode
CONSTANT MaxTemp ← 26
WHILE TRUE DO
    INPUT Temperature
    IF Temperature > MaxTemp
      THEN
        OUTPUT "Open the window"
      ELSE
        OUTPUT "Close the window"
    ENDIF
ENDWHILE

Here 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.

Practise with new numbers

Try it in Python

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.

Read it first. Then run it. At which minutes is the window open?

1. Change max_temperature = 26 to max_temperature = 24. Predict how many minutes the window is open now, then run it.

2. Add a reading of 30 to the end of the list. What does the program print for it?

Common mistakes

  • The sensor decides. It does not. The sensor only measures and sends data. The microprocessor decides.
  • The sensor switches the heater on. The microprocessor sends the signal, and an actuator or switch makes the change.
  • Leaving out the comparison. Always say that the reading is compared with a stored value.
  • Forgetting the repeat. The system keeps reading the sensor. It does not check once and stop.
  • A vague actuator. Name it and what it moves, such as "a motor opens the window".

Remember these

  • An automated system uses sensors, a microprocessor and actuators together, with no person controlling each step.
  • A sensor measures a physical quantity. An ADC turns an analogue signal into digital data.
  • The microprocessor compares the data with stored values, decides, and sends signals to the actuators.
  • An actuator turns a signal into a physical movement.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. A car park has a barrier that lifts when a car drives up to it. Name a suitable sensor and a suitable actuator.
  1. Which part of an automated system compares the data with a stored value?
  1. Why does a greenhouse system need an analogue-to-digital converter between the temperature sensor and the microprocessor?
  1. A student writes: "The light sensor turns on the street light when it gets dark." Correct the sentence.
  1. A temperature sensor is read every 6 seconds. How many readings are taken in 5 minutes?

Enroll free in Automated Systems: Sensors, Microprocessors and Actuators

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (3)

A grower wants a greenhouse that looks after itself…Medium · High School (9–10) · by StemPy Lab
The microprocessor of a cold store reads one temperature sensor every 15 seconds…Easy · High School (9–10) · by StemPy Lab
A school car park has a barrier at its entrance and a sign that shows the number of free spaces…Medium · High School (9–10) · by StemPy Lab
Next: lesson 2Control loops and feedback
← Automated Systems: Sensors, Microprocessors and Actuators
← PreviousControl loops and feedback →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

Python Labs (1)

A greenhouse controllerPython Lab · by StemPy Lab