What Is an Embedded System? Parts, Types and Real-World Examples
An embedded system is a computer built into a larger product to do one specific job. You do not install apps on it or treat it as a computer; you press a button on a microwave, and a small processor inside reads the keypad, runs the magnetron for the set time and beeps when it is done. That processor, its memory, its program and the circuits around it form the embedded system.
Most processors made every year end up in embedded products rather than in laptops or servers. A modern car contains dozens of electronic control units. Learning embedded systems means learning how to make a small computer reliably control real hardware.
What Makes a System Embedded
There is no single legal definition, but engineers agree on a set of characteristics. A device does not need all of them, yet most embedded products show most of them.
- Dedicated function: the system runs one program, written for one product. A washing machine controller will only ever run the washing machine firmware.
- Tight interaction with hardware: it reads sensors (temperature, current, switches) and drives actuators (motors, relays, LEDs, valves) directly.
- Resource constraints: memory is measured in kilobytes or a few megabytes, clock speeds are modest, and cost per unit matters because the product is made in large quantities.
- Real-time requirements: many outputs must happen within a deadline. An airbag controller that fires late is as bad as one that does not fire.
- Long unattended operation: a water meter or a traffic signal controller may run for years without anyone rebooting it, so it must recover from faults on its own.
- Power limits: battery products must sleep most of the time and wake only when there is work to do.
A laptop, by contrast, runs whatever programs the user installs. The embedded designer knows exactly what the code must do and sizes the hardware to that job.
Building Blocks of an Embedded System
Almost every embedded product can be drawn as the same block diagram. Inputs feed a processing unit, the processing unit runs firmware stored in non-volatile memory, and outputs act on the world.
Sensors / switches +------------------------+ Actuators / display
----------------------> | Processor (MCU / MPU) | ---------------------->
ADC, GPIO, comms in | Flash (firmware) | GPIO, PWM, DAC, comms
| RAM (variables, stack) |
| Timers, peripherals |
+-----------+------------+
|
Power supply, clock,
reset and protection| Block | Job | Typical examples |
|---|---|---|
| Processor | Executes the firmware | 8-bit AVR, ARM Cortex-M, RISC-V core |
| Program memory | Holds firmware after power-off | On-chip flash, external SPI flash |
| Data memory | Variables, stack, buffers | On-chip SRAM |
| Input interfaces | Bring signals in | GPIO, ADC, capture timers, UART, I2C, SPI |
| Output interfaces | Drive loads and displays | GPIO, PWM, DAC, relay drivers |
| Clock and reset | Timing and safe start-up | Crystal, internal RC oscillator, brown-out reset |
| Power | Clean, regulated supply | LDO or switching regulator, battery |
| Firmware | The program and its data | Bare-metal C loop or an RTOS application |
The word firmware is used for the software because it is stored permanently in the device and is rarely changed by the user. It is usually written in C, sometimes with parts in C++ or assembly, and it runs either directly on the hardware (bare-metal) or on top of a small real-time operating system.
Types of Embedded Systems
Textbooks classify embedded systems in two common ways: by performance and complexity, and by timing requirements.
By complexity
- Small-scale: a single 8-bit or 16-bit microcontroller, a few kilobytes of memory, a simple loop. Example: a TV remote or a digital thermometer.
- Medium-scale: a 32-bit microcontroller, communication stacks such as USB or Ethernet, often an RTOS. Example: a smart energy meter or a printer controller.
- Sophisticated: application processors running embedded Linux or a similar OS, with graphics and networking. Example: a car infotainment unit or a network router.
By timing
- Hard real-time: missing a deadline is a failure. Airbag deployment, anti-lock braking, motor commutation.
- Soft real-time: occasional late results reduce quality but are not dangerous. Audio streaming, a display refresh.
- Non real-time: timing is not critical beyond user comfort. A digital photo frame.
Real-World Examples Broken Down
The fastest way to understand the idea is to take familiar products and map them onto the block diagram.
| Product | Inputs | Processing | Outputs |
|---|---|---|---|
| Front-load washing machine | Keypad, door lock switch, water level sensor, temperature sensor | Runs the selected wash program as a sequence of states | Motor drive, inlet valve, drain pump, heater, display |
| Car ABS controller | Wheel speed sensors | Detects a wheel about to lock and calculates brake pressure changes | Hydraulic valve solenoids, pump motor, warning lamp |
| Digital electricity meter | Voltage and current sensing | Calculates energy, stores readings, handles tamper events | LCD, pulse LED, optical or wireless communication port |
| Wi-Fi router | Ethernet ports, radio | Routes packets, runs DHCP and a web configuration page | Radio, Ethernet, status LEDs |
| Pulse oximeter | Photodiode signal from red and infrared LEDs | Filters the signal and computes oxygen saturation and pulse rate | Display, alarm buzzer |
Notice how the router sits at the sophisticated end: it typically runs embedded Linux on an application processor. The pulse oximeter and the meter sit in the middle, usually on a 32-bit microcontroller. The washing machine can be built on a modest microcontroller because its timing requirements are measured in milliseconds, not microseconds.
What Embedded Firmware Looks Like
Most bare-metal firmware follows the same structure: initialise the hardware once, then loop forever reading inputs, deciding and updating outputs. The program below models a simple thermostat. The two hardware functions are stubs so that the file compiles and runs on a PC with any C compiler; on a real board they would read an ADC and drive a relay pin.
#include <stdio.h>
#include <stdbool.h>
/* ---- Hardware layer (stubs for a PC build) ---- */
static int fake_temps[] = {24, 26, 28, 30, 29, 27, 25, 24};
static int sample_index = 0;
static int read_temperature_c(void)
{
/* On a microcontroller: start an ADC conversion and scale the result */
int t = fake_temps[sample_index];
sample_index = (sample_index + 1) % 8;
return t;
}
static void set_cooler(bool on)
{
/* On a microcontroller: write a GPIO pin that drives a relay */
printf("cooler %s\n", on ? "ON" : "OFF");
}
/* ---- Application ---- */
#define SET_POINT_C 27
#define HYSTERESIS_C 1
int main(void)
{
bool cooler_on = false;
int step;
/* A real product would use for (;;) and never return */
for (step = 0; step < 8; step++) {
int t = read_temperature_c();
printf("temp = %d C, ", t);
if (!cooler_on && t >= SET_POINT_C + HYSTERESIS_C) {
cooler_on = true;
} else if (cooler_on && t <= SET_POINT_C - HYSTERESIS_C) {
cooler_on = false;
}
set_cooler(cooler_on);
}
return 0;
}
Two embedded habits are already visible. The hardware access is kept in small functions, so the decision logic can be tested on a PC. The control uses hysteresis: the cooler switches on at 28 C and off at 26 C, so it does not chatter on and off when the temperature sits right at the set point.
Common Misconceptions
- Embedded means small. Not always. A car infotainment unit or a medical imaging controller can have more computing power than an old desktop. The defining point is a dedicated function, not size.
- Embedded means no operating system. Many products run an RTOS or embedded Linux. Bare-metal code is common only in the smaller devices.
- Real-time means fast. Real-time means predictable. A system that always answers within 10 ms is real-time; one that usually answers in 1 ms but sometimes takes 2 s is not.
Summary
An embedded system is a dedicated computer inside a product, combining a processor, memory, input and output interfaces, power and firmware. It is defined by its fixed purpose, direct hardware control, limited resources and often real-time deadlines. Map any product you use onto the inputs, processing and outputs diagram and you will see the same design pattern. The next articles in this series build on this foundation: the choice between a microcontroller and a microprocessor, the C features that matter on hardware, and how memory, interrupts and timers work underneath.