Introduction To Embedded System

If you have ever wondered how gadgets around you work? From your Washing Machine to Boeing 787 commercial airliner, from your Smartphone to a modern-day Space Shuttle.

There is a Secret! 

Every smart gadget has one or more Hidden Computers responsible for all the magic.

These hidden computers are called Embedded Systems.

Embedded systems control many devices in use today. Ranging from Portable devices such as Digital Watches and Smartphones to large stationary units like traffic light controllers.

INTRODUCTION

You might have wondered, How does a fridge know that door is open and hence turn on the light?

How does your car know that your seat belt is intact and it’s safe to move?

How does your washing machine know that it’s time to drain out the water and start spinning?

Before we answer these questions, let’s go back to School and understand first, What is a computer?

In simple terms, a computer is a machine made up of components such as

  • Microprocessor – where all the magic happens
  • Primary Memory – RAM, ROM & Fast – accessible caches. to retain information for a short period; and
  • A  Permanent Memory  Hard Disks, SDD Storage
  • Input Devices such as the keyboard, mouse
  • Output Device Monitor with built-in speaker
  • Wifi, Bluetooth, and Ethernet Cards for  Networking
  • The Operating System
  • Graphical User Interfaces (GUI) and
  • Application Softwares – Specific features like washing, calling, braking etc.

So, a computer is a machine designed to achieve various tasks at hand. It’s a general-purpose device. It’s bulky and power-hungry and, not to mention – Super Expensive.

Just for a moment, imagine fitting your brand new MacBook Pro into an old dumb Washing Machine to control the sequence of actions like – Estimation of Water Required, Taking the water in, Washing the clothes, Rinsing, and then spinning fast enough to drain out the water.

If you have observed here, you are wasting all the other functions of this SUPER capable computer! Which otherwise could have served you well.

Here is where Embedded Systems are useful.

Embedded Systems consist of what is known as a Microcontroller.

microcontroller is a microprocessor clubbed with Internal Memory and Interfaces to communicate to the outside world in a single package.

This microcontroller is then brought to life with Application Software to carry out specific tasks and Real-Time Operating System(RTOS), which is a very efficient BOSS, which enables the execution of these tasks — all this put together is what makes an Embedded System.

This Sub System is then embedded in a larger system like – a mechanical or an electrical device giving it computer-like functionality to sense its surrounding using its SENSORS, processing this acquired data in its MICRO and performing predefined actions through its ACTUATORS.

So, when you open your Fridge, the microcontroller inside senses the door open through a Switch, Software logic responsible here, is invoked which then TURNS the light ON through a switch.

Similarly, Advanced Traffic Light controllers capture images of vehicles using a camera, feed this data to a microcontroller which then turns the traffic light ON and OFF.

Before we plunge into more details, let’s go back in time to glance at the history of Embedded Systems.

HISTORY

In 1961, the very first embedded system was used in an ICBM(Intercontinental Ballistic Missile) called Minuteman. This embedded system was the Autonetics D-17 Guidance Computer. And it was used for guidance and control of the Minuteman ICBM, which had a range of 5500 nautical miles (i.e., 10,200 km). The integration of this embedded system and the first solid fuel enabled mass production of these missiles.

And moving forward, in 1966, the Apollo Guidance Computer(AGC) was used in the Apollo Program, which was installed in its Apollo Lunar Module and Apollo Command Module. These modules were used in Apollo 11 mission landed astronauts — Neil Armstrong and Buzz Aldrin on Moon on July 20, 1969.

MODERN USAGE

Now, let’s discuss some of the modern usages of Embedded systems.

These tiny computers find their application in almost all modern-day applications you can think of.

For example, Modern-day cars are not just mechanical dumb machines anymore. They are getting intelligent day by day. Cars are made up of Embedded Systems known as ECUs (Electronic Control Units), which are designed to handle specific tasks in a car. For example, (Anti Lock Braking System) ABS unit that helps in effective braking and avoids skidding. Another example is an Airbag Module that deploys the airbag in the event of a crash. 

If you are curious enough, the next time you take your car to a service station, check out the ECUs your car is equipped with. You will be amazed! 

Embedded Systems are also saving millions of lives every year. They are an integral part of every piece of medical equipment in use today.

Have you ever heard of a pacemaker? And how it works?

No? let me explain!

The normal Human Heart has a natural pacemaker responsible for keeping its pumping action in sync. It creates electrical impulses that reach Atria(a chamber in which blood enters the heart). This impulse makes the Atria contract and pumps blood into the Ventricles. After a few milliseconds, this pulse reaches Ventricles which contract, thus pushing the blood out of the heart. If this Natural pacemaker is malfunctioning, it leads to abnormal heartbeats resulting in cardiac arrest and even death. An electronic pacemaker is implanted in patients with this problem, which has a computer and electrodes to carry out the functions of a natural pacemaker.

FAILURES

Let us now discuss some of the failures involving embedded systems.

Pathfinder

In 1996, NASA launched Mars exploration Robot — PathFinder. It was assigned to collect soil samples, take photographs, and do chemical analysis on the samples collected. After a few days of regular operation, the mission was jeopardized by software resets, interrupting its normal operations, and the risk of data loss.

After a thorough analysis, it was found that these computer resets were caused by a software bug known as Priority Inversion.

In simple terms, Priority Inversion is a scenario where a High Priority task is made to wait too long for its turn because another low priority task is being executed. This is due to bad resource management and task scheduling.

Ariane 5

Another famous failure involving Embedded Systems was on June 4, 1996. Ariane 5 rocket was launched from the coast of French Guiana. 37 seconds later, the rocket flipped 90 degrees in the wrong direction that ripped the boosters apart from the main stage, which caused the self-destruction of a (Three Hundred and Seventy Million Dollar) $370m investment.

What went wrong?

The problem was a Software Bug in the rocket’s _Inertial Reference System_. The rocket used this system to determine whether it was pointing up or down, known as the horizontal bias – BH value. This value was represented by a 64-bit floating variable, which was perfectly adequate.

However, the processor encountered an _operand error_ when the software tried to stuff 64-bit value into a 16-bit integer, resulting in the engine being fed with junk data instead of actual flight data. This caused the engines immediately to over-correct by thrusting in the wrong direction, destroying the rocket seconds later.

In layman’s terms, consider a boat with people onboard way more than its capacity, which is doomed to sink!

CHALLENGES

So, there are many challenges both in HW and SW when an Embedded System is designed.

Hardware Design challenges

Hardware Design challenges start with choosing the suitable processor first.
One should decide on an adequate amount of ingredients like

  • Power Consumption
  •  Processor type – RISC vs. CISC (Which is nothing but how many complex instructions a processor can understand when developing the software)
  • Word length (which is the number of bits a processor can handle in one clock cycle) For example, an 8-bit processor can process 8 bits in one clock cycle.
  • Memory addressability  (Which is the number of memory locations a processor can point to)
  • Number of Registers (Registers are very small and extremely fast memories that processor can directly access. More number of registers means more speed)

All this is just for the processor!

There are similar challenges when choosing RAM, ROM, Input/Output Interfaces, Human-machine interface, etc.

Software Design challenges

Software design challenges start from RTOS selection and end with Memory testing and validation.
Code optimization is also incorporated

  • to increase code efficiency
  • to decrease code size 
  • to reduce memory usage
FUTURE

Having understood Embedded systems, let us now discuss how the future of Embedded Systems will be?

There is no doubt that Embedded systems will play a vital role in emerging technologies like – IoT, self-driving cars, smart agriculture, advanced healthcare devices, Robotics, Artificial intelligence, and even Elon Musk’s dream of putting a man on Mars.

Leave a Reply

Your email address will not be published. Required fields are marked *