What are Embedded Systems and How Do They Work?

An embedded system is a computerized controller that uses a real-time operating system to perform a dedicated function or functions within a large electrical or mechanical device. When we use the term Embedded System, we're usually talking about a computer system (usually based on a microcontroller) that is embedded into another device, such as a home appliance, home automation device, video game console, a cell phone, or a printer.

We can summarize the defining properties of an embedded system as:

  • It is a computer system (hardware and software)

  • It is powered by a microcontroller or microprocessor

  • It is embedded in another device

  • It uses a real-time operating system

Microprocessors have been used in computers for decades now, but up to 98% of all manufactured microprocessor chips are being used in embedded systems and computerized devices, rather than in computers themselves. Real-time operating systems are meant to process data as it comes into the system with a minimal allowance for processing delays.

Key Characteristics of Embedded Systems

Beyond the definitive properties listed above, there are several characteristics shared by the majority of embedded systems we observe in the world around us. Understanding these characteristics and the reasoning behind them can help shed light on some of the most important design decisions made by embedded systems engineers.

Embedded Systems Must Include a Processor Engine

An embedded system is a computer, and all computers need a processor. Embedded systems engineers can choose between ordinary microprocessors and microcontroller devices for inclusion in their embedded systems projects. An ordinary microprocessor uses separate integrated circuits for device memory and peripherals. In contrast, microcontrollers have memory and peripherals built onto the chip itself - so which is better?

Microprocessor chips are entirely dedicated to delivering the processing power that your embedded device needs, so expect better processing speeds from an ordinary microprocessor. On the other hand, the on-chip peripherals offered by the microcontroller can reduce overall device size and power requirements and reduce costs. Microprocessors also require most support circuitry, and a greater number of parts and circuits means more things that can break or malfunction.

Embedded Systems May Have No User Interface

If you're reading this on a computer or a mobile phone, you're interacting with your computer through something called a user interface. The user interface is the medium through which you, the user, can interact with the computer. It includes the screen, the appearance of a desktop, computer speakers or headphones, and input devices like your mouse and keyboard. The user interface on your computer is bi-directional - you use the screen and speakers to receive information and your keyboard and mouse are input devices to send information back.

In contrast, most embedded systems are built without a user interface. Think about the computers that control the anti-lock braking system in your car, or the tire pressure monitoring system. These embedded systems use sensors to monitor specific features in your car and can trigger an automated response based on data from the sensor. As the vehicle operator, you have no way of interacting with these systems through a user interface, although you may receive an indicator when one of these embedded systems is doing something.

Embedded systems constructed without a user interface are expected to function optimally for long periods with no input from the user, so it is important that they are thoroughly debugged before being deployed. This can be done with a device called a protocol analyzer that monitors traffic on the system and helps the device developer quickly diagnose and rectify bugs.

Dashboard of a modern vehicle with embedded systems

Modern vehicles incorporate a variety of embedded systems that monitor and control different features. Some of these can be controlled through a user interface that is built into the vehicle dashboard, while others of these systems operate on their own with no input from the driver.

Embedded Systems are Designed with a Purpose

There are numerous types of embedded systems found in today's manufactured vehicles, but why wouldn't the manufacturers simply control the entire vehicle with one computer?

The truth is that all embedded systems are designed for a specific purpose, and each one contains optimizations that allow it to meet the performance requirements of its designated task. You might have one embedded system that controls the vehicle's internet access and another one that controls the parking assist function. They may have some similar characteristics, but they'll have different inputs and outputs, different power and memory requirements, different applications, and maybe even a different operating system.

Embedded systems are typically highly specialized - they are designed and optimized for one specific task and probably cannot perform any other function.

Embedded Applications are Built-in

Embedded systems are always designed for a specific purpose or application, and it's more than likely that neither the developer or the user will be able to install applications onto the device once it has been deployed. As a result, all of the applications need to run the embedded system are built into the device itself, making embedded devices by definition a hardware-and-software product.

In desktop computing, manufacturers build hardware and operating systems that allow the user to deploy a wide range of applications onto the platform. Software developers can then create applications that are compatible with the most popular operating systems. In embedded systems engineering, the hardware of the device can be designed to meet the specific performance requirements of the application.

Embedded Systems use a Real-Time Operating System

Embedded systems incorporate a real-time operating system (RTOS) to ensure that applications within the system can process data as soon as it enters the system. Delays in processing are measured in tenths of a second, and even the smallest delay can be considered a system failure. Processing time constraints are some of the most significant faced by engineers of embedded systems, who must ensure that the system always processes data within the specified time period.

There are two common RTOS designs that are implemented in embedded systems.

Event-Driven RTOS uses a resource scheduling method called preemptive priority, or priority scheduling. In this type of system, the RTOS will change to a different task only when it is of higher priority than the current task. Tasks are scheduled and managed by the RTOS according to their priority level.

WIth a Time-Sharing RTOS, tasks are switched on a regular basis using a clock interrupt. The system does not assign priority, but switches between tasks frequently to ensure that every task is getting done.

Embedded systems engineers conduct extensive bench-top testing of their devices to ensure that the RTOS performs according to specifications.

Embedded Systems are Resource Limited

The real design challenge for embedded engineers is working with a computer system that is resource-limited. Due to their necessarily small size and few components, embedded systems face significantly limited resources compared to larger computers. While storage space in desktop computers is measured in terabytes, embedded systems force designers to confront the realities of trying to cram more memory into a smaller package.

We mentioned earlier that embedded engineers can design their embedded hardware for their exact application requirements. This becomes even more important when you realize that a 40% increase in processing power or a 40% increase in memory might add 40% to the cost of the device - and since the device only needs to perform one specific function, it makes sense to go for the cheapest hardware that can deliver on those requirements.

Embedded Systems May Be Power Limited

Embedded systems in portable or mobile devices may run on batteries, and as a result, they face power limitations that can affect system design choices. To make the device user-friendly, engineers must design a system that does not consume too much power during use - otherwise, the user might have to change or recharge the batteries frequently.

Embedded systems in your vehicle are powered through your car battery, which charges when you run your engine. The efficient design and low power consumption of embedded systems in your vehicle, therefore, contributes to overall reduced operating costs.

Summary

Embedded systems are everywhere around us - in our cars, homes, and the mobile devices that we carry with us. They are computers with processors, embedded into other electrical or mechanical devices that use a real-time operating system to process data from the environment. Embedded systems are almost always designed for a specific purpose, and satisfying that purpose while minimizing device cost, power consumption, and hardware requirements are one of the core design challenges that underlies embedded development.