Hardware
An embedded system is a computer system that forms part of a larger device or system. It is built for a dedicated purpose: it carries out one specific task, or a limited set of tasks, inside the device it belongs to. It normally has that one purpose, and the user cannot install new software on it.
A security light is an everyday example: a small computer inside it reads a light sensor and switches the lamp on when it gets dark. That is all it will ever do — you could not install a game on it.
Because the job never changes, the designer can keep the parts modest. Slower processors, less storage and limited processing resources are usually enough, which keeps the cost per unit low and the device small. The program is usually stored in ROM rather than on a hard drive, so it is fixed in place and cannot be altered by the user. Modest parts also mean low power consumption, which matters in a battery-powered device. A limited user interface — a couple of buttons, a small display, or none at all — and a simple, robust operating system leave little to go wrong, so embedded systems are very reliable and should not develop a fault that changes what they do.
A general-purpose computer is the opposite: it runs many different programs and you can install new software whenever you like. That flexibility has a cost, because with lots of software running there is more to go wrong, so it may be less reliable and may need restarting.
| Feature | Embedded system | General-purpose computer |
|---|---|---|
| Purpose | One dedicated task | Many different programs |
| New software | Cannot be installed by the user | Can be installed at any time |
| Processor and storage | Slower, with less storage | Faster, with more storage |
| Where the program is stored | Usually ROM | Usually a hard drive or SSD |
| Size and cost | Small, low cost per unit | Larger, higher cost |
| Operating system | Simple and robust | Large and feature-rich |
| User interface | Limited | Full keyboard and screen |
| Reliability | Very reliable | May be less reliable and need restarting |
An embedded system is a computer that is built into another device and exists to help that device carry out its job. Everything it needs — a processor, its memory (RAM and ROM) and the connections for input and output devices — is built into one unit sealed inside the product it is part of.
Inside that unit, each part has a clear job:
Think of the timer inside an automatic pet feeder. A button on the lid is the input, and RAM holds how many minutes are left until the next meal. The ROM program counts the time down and, when it reaches zero, sends a signal to the motor that opens the food flap. The whole computer sits inside the feeder's plastic case, and you never see it.
Many embedded systems are built around a microcontroller. This is a single chip that already contains RAM, ROM and a simple processor, so the designer does not have to wire three separate chips together. A keypad safe might use one: the chip's ROM holds the program that compares each code typed on the keypad with the stored code, and if they match it sends a signal to the output that releases the lock.
A microcontroller is not the whole embedded system. It is the chip at the centre; the embedded system also includes the inputs and outputs it is connected to, all inside the same product.
An embedded system is a small computer system built into a larger product to monitor and control how that product works. It is part of the device itself, not something separate you sit down and use on its own.
Embedded systems are used in a huge range of products and machines, from a security floodlight beside a house to the chiller in a vending machine. Each one is there to monitor and control the operation of the device it lives in.
An embedded system takes input from sensors so it can tell what is happening, then produces output to control other components so that something happens as a result.
| Device | Input from a sensor | Output controlling a component |
|---|---|---|
| Security floodlight | Motion sensor spots something moving | Lamp is switched on |
| Bread maker | Temperature sensor reads the baking chamber | Heating element is switched on or off |
| Vending machine chiller | Temperature sensor reads how cold the drinks are | Cooling unit is switched on when it gets too warm |
The bread maker shows the idea well: the system compares the chamber temperature with the one the recipe needs and switches the heating element on or off to keep it right, so the device holds its own temperature without anyone turning a dial.
A larger device may contain several embedded systems, each controlling a different function. A 3D printer might have one system holding the nozzle at the right temperature, another driving the motors that move the print head, and a third watching a filament sensor that pauses the print when the reel runs out.
Embedded systems are what let a device perform its specific functions; without them the device could not carry out those functions. Take the system out of a security floodlight and the lamp has no way of knowing when someone walks past, so it becomes an ordinary lamp. The system is the part inside doing the controlling, not the whole product.