LECTURE 01

Introduction to Embedded Systems

Duration: 118 min of teaching Level: undergraduate, year III - no prior knowledge required Course: Embedded Systems PDF: download the notes RO versiunea română

This first lecture starts from a simple question - what is an embedded system - and builds, step by step, the vocabulary that carries the whole rest of the semester: dedicated functionality, limited resources, real time, reliability and the design trade-offs that tie them all together. By the end you will be able to recognize an embedded system wherever you meet one, and you will understand why it is designed in a fundamentally different way from the computer on your desk.

1The subject and structure of the course6 min

Reach into your pocket. The telephone contains at least five or six distinct embedded systems - the battery controller, the modem, the motion sensors, the audio chip - each running its own firmware, independently of the operating system you see on the screen. The car you came to the faculty in contains at least fifty more. The refrigerator at home, at least one. The thermostat, likewise.

All of these are computers - they have a processor, memory, a program that runs - but none of them resembles, in the way it is designed, the laptop on which you write an essay. This course explains why, and what that difference means in practice.

Prior notions

An embedded system is a computer hidden inside another product, designed to do a single job (or a few, well defined ones) - not any job at all, like a PC. The word "embedded" does not refer to size, but to the fact that the computing system is an integral part of the product, not a product in itself. The user of a washing machine does not know, and does not need to know, that the buttons they press command a microcontroller.

Learning outcomes

  • To define an embedded system and distinguish it from a general-purpose computer
  • To list and explain the four fundamental characteristics of embedded systems
  • To recognize the main fields of application and the requirements specific to each
  • To classify an embedded system by complexity, by its real-time constraints and by its power source
  • To explain the design trade-offs (performance, cost, power, reliability) and why there is no universally optimal solution
  • To describe, at the conceptual level, how embedded systems relate to the Internet of Things, Edge Computing and OTA updates

2What an embedded system is10 min

Embedded system
A computing system integrated into an electronic device and designed to carry out a well-defined function. Unlike a general-purpose computer, the hardware and the software of an embedded system are developed together, specifically for the target application, pursuing an optimal compromise between performance, cost, energy consumption and reliability.

The essential observation is the one about visibility: in the case of a personal computer, the computing system is the product. In the case of an embedded system, the computer becomes an invisible component, hidden behind the final product. The driver of a modern car interacts with pedals, a steering wheel and a screen - they do not "see" the hundred-odd electronic control units (ECUs) that run the car.

Analogy Think of the difference between a generalist and a specialist. The laptop is like a generalist graduate: it can learn and do almost anything asked of it, but at none of those tasks is it necessarily the most efficient. The controller of a washing machine is like a technician specialized in one single machine: it does not know and does not need to know anything else, but at its own task it is optimized to the millimetre - in cost, in power, in reliability.

Structurally, almost any embedded system is described by the same four blocks, whatever the application:

Sensors temperature, light, pressure, motion (measurement) Actuators motors, relays, displays, solenoid valves (command) Microcontroller / SoC CPU RAM / Flash ADC / PWM Timers GPIO / UART / SPI / I2C Communication CAN, Ethernet, BLE, Wi-Fi .
Fig. 1 - The general architecture of an embedded system. The sensors supply information about the physical environment, the computing unit processes it, and the results command the actuators and/or start an exchange of data with other systems.
BlockRoleTypical examples
Processing unitruns the program, takes decisionsmicrocontroller, microprocessor, SoC
Memorystores the program and the dataFlash (program), RAM (working data)
I/O peripheralsread sensors, command actuatorsGPIO, ADC, PWM, timers
Communicationexchanges data with other systemsUART, SPI, I2C, CAN, BLE, Wi-Fi

Depending on the complexity of the application, hardware accelerators, external memories, a real-time operating system (RTOS) or dedicated security modules may be added to these four blocks - subjects you will meet, one by one, in the lectures that follow.

3The characteristics of embedded systems13 min

Although embedded systems cover an enormous range of applications - from a thermostat costing a few euros to the on-board computer of an aircraft - almost all of them share four fundamental characteristics. They are not absolute rules (complex exceptions do exist), but they explain why an embedded engineer thinks differently from a desktop application developer.

1. Dedicated functionality

An embedded system is designed to carry out one or a few well-determined functions - not a varied range of applications, as a personal computer does. This specialization allows the whole system to be optimized: the hardware and the software are chosen to be exactly as much as is needed, with no useless resources, which reduces the cost, the size and the power consumption.

A concrete example

The controller of a washing machine permanently carries out the same functions: it reads the water level sensors, commands the motor, manages the solenoid valves, monitors the washing programme. It does not have - and has no reason to have - a browser, a text editor or games.

2. Limited hardware resources

Most embedded systems run on microcontrollers with resources far more modest than a PC: RAM from a few kilobytes up to a few megabytes, Flash memory that must hold both the program and the permanent data. This limitation forces simple algorithms and careful management of memory and of execution time - one of the most important differences from software development for personal computers.

3. Low energy consumption

Numerous embedded systems run on batteries or other autonomous sources, so reducing consumption is a central design requirement, not a detail of later optimization. The usual techniques: sleep modes, switching off unused peripherals, adapting the frequency of the processor to the real workload. In many modern applications, the system stays "asleep" most of the time and wakes up only for a measurement or a transmission.

4. Reliability and continuous operation

Many embedded systems must run without interruption for long periods, and in industrial, medical or automotive applications a software failure may affect the safety of users, not merely lose some data. That is why reliability is a design criterion as important as performance, and critical fields observe dedicated standards such as ISO 26262 (the automotive industry) or IEC 61508 (critical control systems).

To remember These four characteristics are not independent - they influence one another. A more powerful processor runs the algorithms faster, but as a rule consumes more and costs more. Reducing the cost limits the hardware resources available, which complicates the software. Designing an embedded system means, almost always, finding a balance between them - not maximizing a single one.
Designing the embedded system Performance Low power Low cost Reliability
Fig. 2 - The four criteria that trade off against one another in the design of an embedded system. Raising performance tends to raise both the cost and the consumption; reducing the cost tends to limit the resources available.

4Fields of application9 min

Embedded systems are present in almost every category of modern technological product. The reason is simple: a great many products need monitoring, control, communication or local processing of information, and these functions are today implemented through dedicated computing systems integrated directly into the product - not through purely electromechanical mechanisms, as a few decades ago.

FieldExamplesDominant requirement
Consumer electronicssmart televisions, telephones, cameras, consolescost, user experience
Domestic applianceswashing machines, refrigerators, microwave ovensenergy efficiency, cost
Automotiveengine ECU, ABS, airbag, driver assistancefunctional safety, real time
Industrial equipmentrobots, production lines, control and monitoringrobustness, availability
Medical devicesECG monitors, insulin pumps, ventilatorsreliability, clinical validation
Telecommunicationsrouters, switches, base stations, IoT gatewaysavailability, low latency
Aerospace and defenceon-board computers, navigation, satellites, dronesextreme reliability
Internet of Thingssmart sensors, smart home, smart meterslow power, connectivity
Example - why ABS is a real-time embedded system

The ABS of a car permanently monitors the speed of the wheels and commands the braking pressure so that the wheels do not lock under sudden braking. What happens if the control algorithm reacts "only" a few hundred milliseconds late?

See the answer

The safety function becomes useless: the wheel has already locked, and the car has gone into a skid before the correct decision reaches the brake. It does not matter how correct the decision of the algorithm is if it does not arrive in time - this is exactly why ABS is classified as a hard real-time system: missing the deadline does not merely reduce performance, it cancels the purpose of the safety function.

Notice something common to all the examples above: in every case, the user interacts with the product (the car, the appliance, the telephone) and almost never directly with the computing system behind it. This remains, whatever the field, the signature of an embedded system.

5Differences from general-purpose computers10 min

At first sight, an embedded system and a personal computer look alike: both have a processor, memory, input-output devices, and both run software. The real difference is not in the components, but in the purpose for which they were designed - and that purpose influences absolutely everything else about the design.

CharacteristicGeneral-purpose computerEmbedded system
Purposerunning a varied range of applicationsrunning a dedicated function
Hardwareconfigurable and extensiblefixed at the design stage
Operating systemWindows, Linux, macOSbare-metal or an RTOS
Energy consumptionhighlow
Hardware resourcesabundantlimited
Cost per unithighoptimized for series production
Reliabilityimportantcritical in safety applications
Interaction with the userdirectas a rule indirect
Analogy Both your laptop and the electronic control unit of your car's engine contain a processor and memory for running programs. The difference: the laptop has to run very different applications at the same time - a browser, an editor, a CAD program. The engine controller runs permanently the same algorithm for controlling injection and ignition, being optimized exclusively for that function. Both are "computers" - but designed for completely different purposes.

Match each statement with the category of system it fits better:

General-purpose computer or embedded system?

6Design constraints10 min

Designing an embedded system is a process of optimization with several simultaneous, often contradictory requirements. Unlike development for general-purpose computers - where the hardware resources can be extended relatively easily - in embedded systems the choice of hardware and the design of the software are closely interdependent.

  1. Response time. Many embedded systems must react within a well-defined interval of time after an external event (see the ABS example above). Execution time has to be analysed at the design stage, not verified afterwards.
  2. Energy consumption. For battery-powered systems, an autonomy of months or years depends on sleep modes, switching off unused peripherals and efficient algorithms.
  3. Cost. At a production run of hundreds of thousands or millions of units, a difference of a few euros per component means significant savings - hence the care with which the microcontroller and the peripherals are chosen.
  4. Reliability. Systems must keep behaving correctly under difficult conditions of temperature, vibration or electromagnetic interference, observing, in critical applications, standards such as ISO 26262, IEC 61508 or DO-178C.
  5. Physical size and heat dissipation. The space available in the final product and the heat generated by the components often limit what hardware may be used.
  6. Cyber security. More and more embedded systems are connected to local networks or to the Internet, so authentication, encryption of communications and secure firmware updating have become standard requirements, not optional ones.
Exercise - a battery-powered agricultural sensor

A smart sensor for monitoring an agricultural crop must run for years on a single battery. Which design strategy best resolves this constraint?

See the solution

The microcontroller stays in sleep mode almost all the time and is woken only periodically - for example, once every few minutes or hours - in order to take a quick measurement and transmit the data, returning to sleep at once. Here reducing energy consumption matters far more than maximizing the performance of the processor: a "slower" microcontroller with efficient sleep modes beats a "faster" one that is always awake.

To remember There is no universally optimal solution. The final configuration always depends on the requirements of the application: a battery-powered IoT sensor prioritizes power and cost; an automotive ECU prioritizes performance, reliability and computing resources. The same design "recipe" applied wrongly can produce a system that is expensive and inefficient - or cheap, but unsafe.
The budget of an embedded product: cost, power and response time

7Classifying embedded systems12 min

The diversity of embedded applications makes a single classification covering every case impossible. In practice, the same systems are grouped simultaneously by several independent criteria - each criterion brings out a different characteristic relevant to the choice of the hardware and software solution.

By hardware complexity

CategoryHardware basisExamples
Low complexity8- or 16-bit microcontrollers, limited resourcesremote controls, thermostats, simple appliances
Medium complexity32-bit microcontrollers, multiple peripherals and interfacesmost automotive, industrial and IoT systems
High complexitymulticore processors or SoC platforms, running Linux/Android Embeddedinfotainment, advanced medical equipment

By real-time constraints

CategoryWhat happens when the deadline is missedExample
Hard real-timefailure of the system or a dangerous situationABS, airbag
Firm real-timeperformance drops, but the system does not faila real-time video stream
Soft real-timethe quality of service drops, but operation carries ona responsive user interface

By power source

Systems permanently powered from the mains can use more capable microcontrollers, at higher frequencies, with no worry about autonomy. Systems powered from a battery or from autonomous sources (energy harvesting) must be designed from the outset for minimum consumption - the choice of the microcontroller, the operating frequency and the software strategies for saving energy are all influenced by that decision.

Example - the same microcontrollers, completely different requirements

The controller of a washing machine may fall into low complexity, with no severe real-time constraints. An ABS controller is hard real-time. Both may use microcontrollers from a similar family - but the requirements of design, testing and validation are fundamentally different.

A real system usually belongs to several categories at once: a battery-powered IoT node is, at the same time, of low complexity, with very low consumption and soft real-time; an industrial controller may be of high complexity, permanently powered, with strict real-time requirements. The classifications above are complementary perspectives on the same system, not mutually exclusive boxes.

9Case study: a smart irrigation node9 min

Let us now tie everything discussed so far into a single example, analysed completely: a controller for a smart irrigation system, battery-powered and installed in a greenhouse.

The requirement of the application

The device measures the humidity of the soil every 30 minutes, opens a solenoid valve if the humidity falls below a threshold, transmits a report once a day to a LoRaWAN gateway and must run for at least a year on an AA battery.

We go through the requirement with each conceptual tool of this lecture, in turn.

QuestionThe answer for this system
Dedicated functionality?Yes - a single loop: measure, decide, command the valve, report. No other program ever runs on this microcontroller.
Hardware resources?Deliberately limited - a small-class 32-bit microcontroller, a few KB of RAM. It needs no more.
Dominant constraint?Energy consumption: a year on an AA battery means an average current budget of the order of tens of microamperes.
Real-time class?Soft real-time - a delay of a few minutes in opening the valve produces no failure, merely slightly late watering.
Complexity?Low - a single microcontroller, a few peripherals, no complex operating system (probably bare-metal or a minimal RTOS).
Modern trends present?IoT (reporting to a gateway), possibly OTA for updating the humidity threshold remotely, Edge (the watering decision is taken locally, not in the cloud).

Notice how one single requirement - "a year on an AA battery" - determined, in cascade, almost all the other decisions: the choice of a modest microcontroller, the classification as soft real-time (because the system can "wait" without danger), the architecture based on periodic wakings from sleep. This is exactly the kind of reasoning that designing an embedded system demands repeatedly - and which you will practise in the laboratory, in the lectures that follow and in every project of this semester.

10Case study: the energy analysis8 min

A transfer question

If the same greenhouse had, instead of a single humidity sensor, a video camera that has to detect in real time the presence of a pest animal and immediately trigger a scaring system, what would change in the table above?

See the answer

Almost everything changes: the complexity goes up (image processing demands far more computing power, probably a SoC rather than a simple 32-bit microcontroller), the real-time class moves towards firm or even hard (too slow a reaction means the animal has already done the damage), and the energy consumption becomes much harder to control - the camera and the image processing cannot stay "asleep" in the same way as a humidity sensor. The one-year battery budget would probably become unrealistic without an external power source.

The life cycle of an embedded product: put the stages in order

11Frequent mistakes5 min

  • "All embedded systems are 8-bit and very simple." False - the category covers both an 8-bit thermostat and a multicore SoC running Embedded Linux in an infotainment system. The complexity varies enormously with the application. Always classify by the concrete requirements of the application, not by a generic picture in your head.
  • "An embedded system never has an operating system." Many run bare-metal, but others run an RTOS (FreeRTOS, Zephyr) or even Embedded Linux - the choice depends on the complexity of the application and on the real-time constraints. Ask yourself rather "what level of temporal determinism does the application need", not "does it or does it not have an operating system".
  • "Real time means fast." Real time means deterministic - the system meets a guaranteed deadline, even if that deadline is relatively generous (seconds, not microseconds). A hard real-time system with a 500 ms deadline is not necessarily "faster" than a non-real-time system. Check whether there is a deadline and what happens when it is missed - that decides the classification, not absolute speed.
  • "Reducing the cost is always possible without compromises." The cost is directly linked to the hardware resources available; reducing it excessively limits the memory, the frequency or the peripherals, which complicates or even blocks the implementation of the desired software. Treat the four factors (performance, cost, power, reliability) as a system of trade-offs, not as independent targets.

12Summary and glossary5 min

An embedded system is a computer integrated into a product, designed for a dedicated function, not for maximum flexibility. Designing it means, almost always, finding a balance between four factors that influence one another: performance, cost, energy consumption and reliability - and that balance always depends on the concrete application.

Embedded system
a computer integrated into a product, with a dedicated function.
ECU
Electronic Control Unit - an automotive electronic control unit.
RTOS
Real-Time Operating System - an operating system with temporal guarantees.
Hard real-time
missing the deadline produces failure or danger.
Firm real-time
occasionally missing it reduces performance, without failure.
Soft real-time
delays affect the quality of service, not the operation.
Edge Computing
processing data directly on the device, not only in the cloud.
TinyML
machine-learning algorithms run on microcontrollers.
OTA
Over-the-Air - remote firmware updating.
IoT
Internet of Things - the interconnection of physical objects through a network.

13Self-check questions10 min

A few self-check questions, adapted from the corresponding chapter of the book - use them for revision before the laboratory or the seminar.

  1. What is an embedded system and how does it differ from a general-purpose computer?
  2. What are the main hardware components of an embedded system?
  3. What are the four fundamental characteristics of embedded systems?
  4. Why does energy consumption represent an important constraint in embedded systems?
  5. What are the differences between hard real-time and soft real-time systems?
  6. List at least five fields of application of embedded systems.
  7. How does cost influence the design process of an embedded system?
  8. What does the concept of the Internet of Things represent?
  9. What is Edge Computing and what advantages does it bring over processing exclusively in the cloud?

14Where to go next2 min

The next lecture continues directly from here, with the hardware architecture proper: what an embedded computing system looks like on the inside - processing units, the memory hierarchy and the particularities of the ARM architectures used today in most microcontrollers and systems on chip.

For the practical application of the concepts of this lecture, go on to Laboratory 01, where you build a first working embedded system on a Raspberry Pi 5 and measure, concretely, some of the trade-offs discussed here (performance vs. power).