Introduction to Embedded Systems

What is an Embedded System?

First, a system is a set of tasks executed against a fixed set of rules, program or plan for a given objective. Embedded System is an application specific computer system comprised of both hardware and software to complete a set of tasks for a given objective. Embedded System runs inside larger system giving it more functionality/features, better performance and reliability.

Key characteristics are:

  1. Built for a specific application
  2. Built using Micro controller unit (MCU) – see section below
  3. Runs inside a larger system with well defined input/output, integration interfaces for other systems and user interface
  4. Have real time computing constraints of performance, power, cost, size, weight
  5. Cannot be programmed by end user but end user can provide inputs to get the embedded system to perform a function

Examples of Embedded Systems

The following systems will have one or more embedded systems in them

  • Missile – guidance system
  • Automobile systems – anti braking system, air bag system and so on
  • Household applications – waching machine
  • Consumer electronics – cameras
  • Telecom – mobile phones
  • Healthcare – diagnotic machines
  • Drones

Types of ES

Task based embedded system – that complete a specific task in a configured time period. e.g.: washing machine

Real time embedded system – that execute tasks within specified real-time constraints (power, performance, cost, size, weight) based on external input from sensors/actuators

Design contraints of ES

Power – in majority of cases embedded systems are supplied power from a battery hence they should consume as less power as possible to ensure system running longer running on battery

Performance – generally needs to be real time meeting response/execution time requirements of an application

Area – embedded system is a computer in itself hence it should pack in the required hardware, with required resources for the software, in limited space

Cost – needs to be low cost since part of a bigger system which may be made of many different embedded systems

Time to market – getting right the design as per requirements in one go is key to releasing on time a system/product

Building an Embedded System

Steps when building an embedded system

  • Requirements gathering
  • Writing detailed specification
  • Architecture
  • Component design
  • Development (see figure below for details)
  • System integration

The following are the challenges

  • How much power is available and how do I limit power consumption?
  • What is the time to market?
  • What is the target area available in the system in which to embed?
  • Testing and ensuring it meets target specification
  • Restricted development environment

Components of an Embedded System

Example block diagram of a Chocolate Vending Machine

Micro controller unit (MCU)

MCU is the brain of an embedded system responsible for taking input (eg: sensor data – crash detection in a car, software instructions) and producing output (eg: actions to be performed – launch the airbags in case of crash). It is a hardware made of multiple hardware components that interoperate with each other via a high speed bus. They have a very tiny size varying from 2-10mm

The following are components of a MCU

  1. Processor – to do required computation to achieve the application objectives
  2. Memory – to store required program instructions (non volatile – ROM, EEPROM/Flash memory) and data (volatile – RAM)
  3. Reset circuits and oscillator – reset circuits helps initialize or reset the system including cases of failure, reset oscillator provides timing signals for the operation of micro controller and speed of execution of instructions
  4. Power Supply
  5. Analog Digital/Digital Analog Converter – analog sensor to digital, digital output signal to analog actuator (on signal does mechanical action)
  6. I/O Ports – simple communication analog/digital interface (pins) with external devices (e..g: senors, user interface)
  7. Communication Interface – complex communication interface (specialized hardware) with external devices
  8. Interuppt Controllers – manages, prioritizes tasks that require immediate attention
  9. Timers – used for scheduling tasks, event counting, measuring time intervals

Micro Controller vs Micro processor

MicroprocessorMicrocontroller
A silicon chip that is a CPU for arithemetic and logical operationsA integrated chip that is comprises of a CPU, Memory, I/O ports, Interuppt control units and so on
Built for general purpose use for processing inside a system Built for a specific application purpose inside a system
Dependent on other hardware devices to input/output and processingSelf contained unit that can independently complete specific application purpose
Does not contain an I/O portContains multiple I/O ports
Limited power saving optionsDesigned with several power saving features

Operating System

Operating System is a software that acts as an interface between application software and hardware (MCU). It makes it easier and makes it more efficient to use the hardware of a system.

The main functions of a operating system are:

  • Process management
  • File management
  • Memory management
  • Security and protection
  • User Interface
  • I/O Management