How Can Computers Control Things?
A computer control system, like any system, is made up of three parts...
The best way to understand how a computer can control things is to think about how a person controls something...
For example, how does a human control a car when he/she is driving?
The person looks ahead at the road to see what is approaching, thinks about what he/she has seen, then acts upon it (turns the steering wheel and/or presses the pedals).
In other words the person reacts to what is happening in the world around them.
Computer-controlled systems work in a similar way – the system detects what is happening in the world around it, processes this information, and then acts upon what it has detected.
For example, how does a human control a car when he/she is driving?
The person looks ahead at the road to see what is approaching, thinks about what he/she has seen, then acts upon it (turns the steering wheel and/or presses the pedals).
In other words the person reacts to what is happening in the world around them.
Computer-controlled systems work in a similar way – the system detects what is happening in the world around it, processes this information, and then acts upon what it has detected.
Sensors
A normal PC has no way of knowing what is happening in the real world around it. It doesn’t know if it is light or dark, hot or cold, quiet or noisy. How do we know what is happening around us? We use our eyes, our ears, our mouth, our nose and our skin - our senses.
A normal PC has no senses, but we can give it some: We can connect sensors to it...
A sensor is a device that converts a real-world property (e.g. temperature) into data that a computer can process.
Examples of sensors and the properties they detect are...
A normal PC has no senses, but we can give it some: We can connect sensors to it...
A sensor is a device that converts a real-world property (e.g. temperature) into data that a computer can process.
Examples of sensors and the properties they detect are...
Sensor | What it Detects |
---|---|
Temperature | Temperature |
Light | Light / dark |
Pressure | Pressure (e.g. someone standing on it) |
Moisture | Dampness / dryness |
Water-level | How full / empty a container is |
Movement | Movement nearby |
Proximity | How close / far something is |
Switch or button | If something is touching / pressing it |
Note: many sensors are analogue devices and so need to be connected to the computer using an analogue-to-digital convertor.
Actuators
A normal PC has no way of affecting what is happening around it. It can’t turn on the lights, or make the room hotter. How do we change what is happening around us? We use our muscles to move things, press things, lift things, etc. (and we can also make sound using our voice).
A normal PC has no muscles, but we can give it some. In fact we can give it the ability to do lots of things by connecting a range of actuators to it…
An actuator is a device, controlled by a computer, that can affect the real-world.
Examples of actuators, and what they can do are...
A normal PC has no muscles, but we can give it some. In fact we can give it the ability to do lots of things by connecting a range of actuators to it…
An actuator is a device, controlled by a computer, that can affect the real-world.
Examples of actuators, and what they can do are...
Actuator | What it Can Do |
---|---|
Light bulb or LED | Creates light |
Heater | Increases temperature |
Cooling Unit | Decreases temperature |
Motor | Spins things around |
Pump | Pushes water / air through pipes |
Buzzer / Bell / Siren | Creates noise |
Note: some of these devices require an analogue signal to operate them. This means that they need to be connected to the computer using a digital-to-analogue convertor.
Making Decisions (The Process)
The steps followed by the computer in a control system are just about the same for all systems...
- Check the data from the sensors
- If necessary, turn on/off one or more of the actuators
- Go back to step 1
Where is Computer Control Used?
Many of the devices that we use in our everyday lives are controlled by small computers...
However using computers to manage these systems has brought many benefits...
- Washing machines
- Air-conditioning systems
- Programmable microwave ovens
- Modern cars have engines, brakes, etc. that are managed and controlled by a computer
- Most factory production lines are computer-controlled, manufacturing products with little or no human input
- Traffic lights are switched on and off according to programs running on computers which manage traffic flow through cities
However using computers to manage these systems has brought many benefits...
Why Use Computers to Control Thing?
It is often far better to have a system that is managed and controlled by a computer rather a human because...
- Computers never need breaks - they can control a system without stopping, all day, every day
- Computers don’t need to be paid. To buy and install a computerised control system can be very expensive, but, in the long-term, money is saved by not having to employee staff to do the work
- Computers can operate in conditions that would be very hazardous to human health, e.g. nuclear power stations, chemical factories, paint-spraying areas
- Computers can control systems far more accurately, and respond to changes far more quickly than a human could
An Example Control System - An Automated Greenhouse
A computer-controlled greenhouse might have a number of sensors and actuators:
- A light sensor to detect how much light the plants are getting
- A temperature sensor to see how cold/hot the greenhouse is
- A moisture sensor to se how wet/dry the soil is
- Lights to illuminate the plants if it gets too dark
- A heater to warm up the greenhouse if it gets too cold
- A water pump for the watering system
- A motor to open the window if it gets too warm inside
The process for this system would be...
- Check light sensor
- If it is dark, turn on the lights
- If it is not dark, turn off the lights
- Check temperature sensor
- If it is too cold, turn on heater and use motor to close window
- If it is too warm, turn off heater and use motor to open window
- Check the moisture sensor
- If soil is too dry, turn on the water pump
- If soil is too wet, turn off the water pump
- Go back to step 1 and repeat
Note that if you have to describe a control process, never say that anything like:
“the temperature sensor switches on the heater”
This is totally wrong!
Sensors cannot control anything - all they can do is pass data to the computer.
The computer takes the actions and turns on/off the actuators.
“the temperature sensor switches on the heater”
This is totally wrong!
Sensors cannot control anything - all they can do is pass data to the computer.
The computer takes the actions and turns on/off the actuators.