1.0 Module I: Foundational Concepts of Embedded Systems
1.1 Introduction to Systems Engineering
Before we can delve into the specifics of an embedded system, we must first establish a clear understanding of what constitutes a “system” in an engineering context. A system is a strategic arrangement where a collection of interdependent units assemble and work together according to a defined set of rules. The primary goal is to perform one or many tasks according to a fixed plan. The interdependency of the subcomponents is a critical concept; if one part fails, the entire system’s function can be compromised.
To illustrate this, consider a simple analog watch. It is a time-displaying system composed of various subcomponents: gears, a battery, and hands. These components follow a fixed plan—the mechanical and electrical rules governing their interaction—to achieve the primary function of displaying the correct time. If the battery fails or a gear breaks, the entire system ceases to function. In any engineered system, all subcomponents rely on each other to fulfill the system’s objective.
1.2 Defining the Embedded System
As its name implies, an “embedded” system is one that is attached to, or integrated within, another thing. More formally, an embedded system is a computer hardware system with software embedded in it. It can be a standalone, independent system or a component within a much larger system. At its core, an embedded system is based on a microcontroller or a microprocessor and is designed to perform a specific, dedicated task.
For example, a fire alarm is a classic embedded system. Its sole purpose is to sense smoke and trigger an alarm. It is not designed to play music, browse the internet, or perform any other function; its task is highly specific and unchanging.
An embedded system is comprised of three core components:
- Hardware: The physical components of the system, including the processor, memory, sensors, and actuators.
- Application Software: The specific program that enables the system to perform its dedicated task.
- Real-Time Operating System (RTOS): The RTOS supervises the application software, providing a mechanism for the processor to run processes according to a schedule. It controls latencies and defines the fundamental rules for how the system operates. It is important to note that many small-scale embedded systems are simple enough that they do not require an RTOS.
Synthesizing these elements, we arrive at a comprehensive definition: an embedded system is a microcontroller-based, software-driven, reliable, real-time control system.
1.3 Core Characteristics and Design Metrics
Embedded systems are defined by a unique set of characteristics that distinguish them from general-purpose computers. Understanding these characteristics is key to appreciating the design challenges and trade-offs involved in their creation.
- Single-functioned: An embedded system is typically designed to perform a specialized operation and repeat it consistently. A pager, for instance, is always a pager; its function is fixed and dedicated.
- Tightly constrained: While all computing systems face design constraints, those on embedded systems are particularly severe. Key design metrics—such as cost, size, power consumption, and performance—must be aggressively optimized. An embedded system often must be small enough to fit on a single chip, fast enough to process data in real-time, and efficient enough to maximize battery life.
- Reactive and Real-time: Many embedded systems must continuously react to changes in their environment and compute results without any perceptible delay. A car’s cruise control system, for example, must constantly monitor speed and brake sensors and compute adjustments to acceleration. A delay in this computation could result in a failure to control the vehicle, highlighting the critical nature of real-time performance.
- Microprocessors based: At the heart of every embedded system is a microprocessor or, more commonly, a microcontroller.
- Memory: The system’s software is typically embedded in Read-Only Memory (ROM). Unlike a personal computer, an embedded system generally does not have secondary memory like a hard drive.
- Connected: Embedded systems require peripherals to connect with various input and output devices, allowing them to interact with the physical world.
- HW-SW systems: Development involves a crucial trade-off. Software is used to provide flexibility and a rich feature set, while hardware is often used to achieve higher performance and greater security.
1.4 Evaluating the Pros and Cons
The unique characteristics of embedded systems lead to a distinct set of advantages and disadvantages.
Advantages
- Easily Customizable: Because they are designed for a specific task, both the hardware and software can be tailored for optimal performance and efficiency.
- Low power consumption: The task-specific design and tight constraints necessitate highly efficient power usage, making them ideal for battery-operated devices.
- Low cost: By integrating necessary components onto a single chip (a microcontroller), the overall system cost is significantly reduced.
- Enhanced performance: The hardware and software are optimized for a single function, leading to faster and more reliable performance compared to a general-purpose system performing the same task.
Disadvantages
- High development effort: Creating specialized hardware and custom software is a labor-intensive process that requires deep expertise.
- Larger time to market: The development lifecycle, including hardware design, software programming, and rigorous testing, often results in a longer period to bring a product to market compared to software-only applications.
1.5 The Basic Structure of an Embedded System
A typical embedded system follows a logical flow of information from input to output, managed by its core components.
- Sensor: The process begins with a sensor, which measures a physical quantity (like temperature or light) and converts it into an electrical signal for an observer or A-D converter. A sensor also stores the measured quantity to the memory.
- A-D Converter: An Analog-to-Digital (A-D) converter takes the analog electrical signal from the sensor and transforms it into a digital signal that the processor can understand.
- Processor & ASICs: The processor, often alongside Application-Specific Integrated Circuits (ASICs), takes the digital data, processes it to measure the output, and stores the result in memory.
- D-A Converter: A Digital-to-Analog (D-A) converter takes the processed digital data from the processor and converts it back into an analog signal.
- Actuator: The actuator receives the analog signal from the D-A converter and compares the output to the actual (expected) output stored in it. It then stores the approved output, which often corresponds to a physical action (like turning on a motor or a light).
This fundamental structure highlights the central role of the processor in interpreting data and controlling outputs. In the next module, we will explore the processor—the core of the machine—in greater detail.