Unit 6: Embedded system and its application

ECE131 — Basic Electrical And Electronics Engineering 9 min read

I. Orientation

An embedded system is a computer-based system designed to perform a specific function within a larger electrical, electronic, mechanical, or cyber-physical product. Unlike a general-purpose computer, it combines dedicated hardware and software under constraints such as real-time response, low power consumption, limited memory, cost, size, and reliability.

A. Defining Characteristics

The operation of embedded and Internet of Things (IoT) systems rests on sensing physical conditions, processing data, communicating results, and controlling equipment.

  • Dedicated function: An embedded controller usually performs a fixed task, such as regulating motor speed, measuring temperature, or operating an anti-lock braking system.
  • Input-process-output model: Sensors provide inputs, a processor executes programmed logic, and actuators produce outputs such as motion, heat, light, or sound.
  • Real-time behavior: Correctness may depend on both the output and its timing; an airbag controller must respond within milliseconds.
  • Resource constraints: Memory may be measured in kilobytes, clock speed in megahertz, and power consumption in milliwatts.
  • IoT connectivity: Networked devices exchange telemetry and commands using technologies such as Wi-Fi, Bluetooth Low Energy, Zigbee, LoRaWAN, cellular networks, or Ethernet.
  • Cloud computing: Remote computing platforms provide scalable storage, analytics, visualization, alerting, and machine-learning services.
  • Dependability: Safety, security, fault tolerance, and predictable operation are essential because embedded systems interact directly with physical processes.

II. Embedded Systems — Purpose-Built Computing

A. Introduction to embedded system

An embedded system integrates a processor, memory, interfaces, and application software to monitor or control a defined process.

  • Core hardware:
    • Processing unit: A microcontroller, microprocessor, digital signal processor, or system-on-chip executes instructions.
    • Memory: Flash stores program code, RAM holds temporary data, and EEPROM may preserve settings after power loss.
    • Interfaces: GPIO, ADC, PWM, UART, SPI, and I²C connect sensors, actuators, displays, and communication modules.
  • Software structure: Firmware may use a simple repeated loop, interrupt-driven control, or a real-time operating system that schedules multiple tasks.
  • Signal path: A sensor converts a physical variable into an electrical signal; an ADC then represents an analog voltage digitally:
    TEXT
    Digital code ≈ (Vin / Vref) × (2^n − 1)

    Here, (V{in}) is sensor voltage, (V{ref}) is ADC reference voltage, and (n) is ADC resolution in bits.
  • Classification: Systems may be stand-alone, networked, mobile, or real-time; real-time systems are further described as hard or soft depending on the consequence of missing a deadline.
  • Examples: Microwave ovens, digital energy meters, printers, traffic controllers, pacemakers, industrial drives, and vehicle engine-control units contain embedded controllers.
  • Limitations: Restricted processing capacity complicates upgrades, cybersecurity, complex analytics, and long-term maintenance.

III. Processing Devices — Architecture and Selection

A. Comparison of microprocessor and micro-controller

A microprocessor primarily provides a CPU, whereas a microcontroller integrates the CPU and common peripherals on one chip.

  1. Microprocessor:

    • Integration: Usually requires external RAM, program storage, timers, ADCs, and I/O controllers; this increases board size and component count.
    • Performance: Supports high clock rates, large memories, complex operating systems, and computation-intensive applications.
    • Applications: Personal computers, high-end human-machine interfaces, gateways, and multimedia systems commonly use microprocessors.
    • Power and cost: External components and higher performance generally produce greater power consumption and system cost.
  2. Microcontroller:

    • Integration: Places CPU, Flash, RAM, GPIO, timers, serial interfaces, and often ADC/PWM modules on one integrated circuit.
    • Control capability: Provides deterministic access to hardware and fast interrupt response for sensor and actuator control.
    • Applications: Washing machines, motor controllers, instruments, toys, alarms, and battery-powered IoT nodes commonly use microcontrollers.
    • Power and cost: Sleep modes and single-chip construction support compact, inexpensive, energy-efficient products.
  • Selection principle: A Linux-based vision gateway may need a microprocessor, while a temperature alarm reading one sensor every second is usually better served by a microcontroller.

IV. Arduino-Based Prototyping — Interfacing the Physical World

A. Introduction to Arduino and sensors

Arduino is an open-source prototyping platform combining programmable boards, a development environment, and libraries for interfacing electronic components.

  • Typical board: The Arduino Uno uses the ATmega328P microcontroller, digital I/O pins, analog input channels, timers, and USB-based programming.
  • Program structure: setup() runs once after reset, while loop() repeats for as long as the board is powered.
    CPP
    const int sensorPin = A0;
    
    void setup() {
      Serial.begin(9600);
    }
    
    void loop() {
      int reading = analogRead(sensorPin);
      Serial.println(reading);
      delay(1000);
    }
  • Sensor function: Sensors act as transducers, converting temperature, pressure, light, motion, humidity, gas concentration, or distance into usable electrical data.
  • Sensor types:
    • Analog: An LM35 temperature sensor produces a voltage proportional to temperature and requires ADC conversion.
    • Digital: Devices such as digital humidity sensors provide encoded measurements through a data protocol.
  • Actuator connection: Motors, relays, pumps, and heaters often require transistor or driver circuits because an Arduino pin cannot safely supply high current.
  • Engineering concerns: Calibration, measurement range, resolution, sampling rate, noise, grounding, and supply-voltage compatibility determine measurement quality.
  • Prototype limitation: Arduino accelerates development, but production equipment may require stronger protection, certified hardware, secure boot, and industrial communication interfaces.

V. Industrial Plant Monitoring — Connected Process Supervision

A. Role of IoT and cloud computing in condition monitoring of plant processes

IoT condition monitoring continuously measures equipment health so that maintenance can be based on actual condition rather than fixed schedules.

  • Measured variables: Vibration in mm/s, bearing temperature in °C, motor current in amperes, pressure in bar, and acoustic emissions can reveal developing faults.
  • Data chain: Sensors feed an edge controller; a gateway filters and timestamps readings; a secure network sends selected telemetry to a cloud platform.
  • Cloud role: Time-series databases preserve trends, dashboards compare assets, and analytics detect anomalies such as increasing vibration at a particular shaft speed.
  • Maintenance outcome: Predictive maintenance estimates degradation early, while prescriptive analysis recommends actions such as lubrication, alignment, or bearing replacement.
  • Edge-cloud balance: Emergency shutdown logic remains local for low latency, whereas long-term fleet analysis can run in the cloud.
  • Constraints: False alarms, sensor drift, unreliable connectivity, incompatible industrial protocols, and cyberattacks can reduce system dependability.

VI. Connected Healthcare — Remote and Data-Assisted Care

A. IoT and cloud computing in healthcare

Healthcare IoT connects medical sensors and devices to clinical systems for continuous observation, diagnosis support, and coordinated treatment.

  • Devices: Wearable heart-rate monitors, pulse oximeters, glucose sensors, smart inhalers, and connected blood-pressure instruments collect physiological data.
  • Cloud services: Patient histories, trend analysis, clinician dashboards, notifications, and computationally demanding diagnostic models can be centrally managed.
  • Remote monitoring: A patient’s oxygen saturation may be transmitted from home, allowing an alert when readings cross a clinically configured threshold.
  • Benefits: Earlier intervention, reduced hospital visits, medication adherence tracking, and access to specialists improve continuity of care.
  • Safety requirements: Measurements require validation, calibration, reliable identity management, encryption, controlled access, and audit logs.
  • Limitations: Privacy breaches, network failure, battery depletion, inaccurate consumer sensors, and excessive non-actionable alarms can harm care.

VII. Smart Agriculture — Precision Resource Management

A. IoT and cloud computing in agriculture

Agricultural IoT uses field measurements and remote analytics to apply water, fertilizer, and other resources according to crop needs.

  • Field sensing: Soil-moisture probes, weather stations, pH sensors, cameras, and livestock trackers produce location- and time-specific data.
  • Automated irrigation: A local controller can open a solenoid valve when soil moisture falls below a set threshold and close it after the target level is reached.
  • Cloud analytics: Historical weather, forecasts, sensor trends, and satellite imagery support irrigation scheduling, disease-risk estimation, and yield forecasting.
  • Benefits: Precision application can reduce water consumption, avoid over-fertilization, detect stress early, and improve traceability.
  • Connectivity options: LoRaWAN suits low-data-rate field sensors over long distances, while cellular links may connect farm gateways to cloud platforms.
  • Limitations: Rural network coverage, sensor fouling, weather exposure, installation cost, and dependence on platform providers affect adoption.

VIII. Smart Manufacturing — Connected Production Systems

A. IoT and cloud computing in manufacturing

Manufacturing IoT links machines, products, workers, and enterprise software to create measurable and adaptable production processes.

  • Operational visibility: Connected programmable logic controllers, machine tools, robots, and energy meters report status, cycle time, faults, and consumption.
  • Performance metric: Overall equipment effectiveness is commonly expressed as:
    TEXT
    OEE = Availability × Performance × Quality

    Availability represents operating-time ratio, performance represents speed efficiency, and quality represents the fraction of acceptable output.
  • Cloud applications: Cross-factory dashboards, production records, machine-learning models, and digital twins support optimization and capacity planning.
  • Quality control: Cameras and edge processors can detect surface defects immediately, while cloud records reveal recurring patterns across production batches.
  • Integration: Manufacturing execution systems coordinate shop-floor activity, while enterprise systems manage orders, materials, and business resources.
  • Risks: Legacy-machine compatibility, network latency, proprietary data formats, intellectual-property exposure, and production disruption require careful governance.

IX. Connected Automobiles — Intelligent Mobility

A. IoT and cloud computing in automobiles

Automotive IoT combines onboard embedded controllers with external networks to improve safety, maintenance, navigation, and fleet operation.

  • Embedded network: Electronic control units manage the engine, transmission, braking, steering, airbags, battery, and infotainment, often communicating through CAN buses.
  • Telematics: A vehicle gateway transmits position, speed, fuel or battery status, diagnostic trouble codes, and driving events through cellular communication.
  • Cloud functions: Fleet tracking, route optimization, remote diagnostics, over-the-air updates, traffic services, and usage-based maintenance use aggregated vehicle data.
  • Electric vehicles: Cloud analytics can estimate charging demand, battery degradation, and available range from temperature, driving pattern, and state-of-charge data.
  • Local priority: Braking and stability control must operate onboard with deterministic timing; they cannot depend on a distant cloud connection.
  • Risks: Unauthorized remote access, unsafe software updates, location privacy, communication loss, and incompatible vehicle platforms demand layered security.

X. Smart Grid — Digitally Coordinated Power Networks

A. IoT and cloud computing in smart grid

A smart grid uses sensing, two-way communication, automation, and analytics to coordinate generation, transmission, distribution, and electricity consumption.

  • Grid devices: Smart meters, phasor measurement units, transformer sensors, protective relays, and distributed-energy controllers provide frequent operating data.
  • Electrical quantities: Voltage in volts, current in amperes, frequency in hertz, active power in watts, and energy in kilowatt-hours indicate grid condition.
  • Cloud contribution: Scalable platforms support demand forecasting, meter-data management, outage analysis, renewable-generation prediction, and asset-health monitoring.
  • Demand response: Consumers or automated loads shift consumption away from peak periods in response to price or control signals, reducing stress on the network.
  • Distributed resources: IoT coordination helps integrate rooftop solar systems, battery storage, electric-vehicle chargers, and controllable loads.
  • Reliability: Sensors can locate faults and support automated network reconfiguration, reducing outage area and restoration time.
  • Constraints: Protection functions require local real-time control, while cybersecurity, consumer privacy, clock synchronization, interoperability, and communication resilience remain essential system requirements.