Embedded Systems and IoT Overview 🌐
This lecture introduces embedded systems, highlighting their overlap with IoT devices.
• Definition: Embedded systems are computer-based systems that don’t resemble
traditional computers, hiding complexity from users for simple interfaces.
• Relation to IoT: Most IoT devices are embedded systems, but not all embedded systems
are networked. IoT devices typically include internet connectivity, driven by ubiquitous
and affordable networking.
• Examples:
o Digital cameras: Non-networked embedded systems with simple interfaces
(press a button to take a picture) but internal computational complexity.
o Thumb drives: Interact indirectly via other devices (e.g., computers), still
considered embedded systems.
o Car anti-lock braking: Interacts indirectly through the brake pedal, embedding
complexity within the car.
• Design Focus: Efficiency is critical—embedded systems must perform tasks elegantly
(fast, low power, or low cost) within tight constraints, unlike traditional software design
where functionality alone suffices.
• Constraints:
o Consumer devices (e.g., phones): Prioritize low cost and fast time-to-market.
o Military/medical devices (e.g., pacemakers): Emphasize performance, reliability,
and low power, even at higher costs.
• Key Point: Embedded systems prioritize efficiency and simplicity, distinguishing them
from general-purpose computers. IoT devices extend this with networking.
Embedded System Design 🛠
This section delves into designing embedded systems, emphasizing their application-specific
nature compared to general-purpose platforms.
• Application Specificity:
o Embedded systems (and IoT devices) are designed for one task or related tasks
(e.g., a camera records video, not sorts lists), unlike laptops that handle diverse
applications.
o General-purpose systems (e.g., quad-core i7 at 4 GHz) are overpowered for most
tasks (e.g., running Word), using only a fraction of their capacity except for
intensive tasks like video processing or gaming.
o Benefit: Application-specific design makes embedded systems cheaper and more
efficient for their intended tasks (e.g., an Xbox One plays games better and
cheaper than a high-end PC).
• Hardware-Software Co-Design:
o Embedded systems require simultaneous hardware and software design for
efficiency, unlike desktop software (e.g., Microsoft Word) developed separately
from hardware.
o Example: Apple’s integrated hardware-software design enhances reliability and
efficiency by tailoring components to specific tasks.
o Designers must understand both hardware (e.g., screen size, touch sensors) and
software constraints, making design more complex than traditional programming.
• Key Point: Embedded system design focuses on efficiency through application-specific
hardware and software co-design, contrasting with the versatility of general-purpose
systems.
Structure of Embedded Systems 🔌
This section outlines the hardware structure of embedded systems, focusing on key components.
• Core Components:
o Sensors: Receive environmental data (e.g., buttons, microphones, cameras, touch
screens).
o Actuators: Produce effects in the environment (e.g., LEDs, speakers, motors for
camera lenses, screens).
o Microcontroller: The central processor that processes sensor data and controls
actuators.
• Additional Components:
o IP Cores: Pre-designed, task-specific chips (e.g., audio filtering, network control)
used for common, high-volume tasks. They’re cheap in bulk but not
programmable, interacting with the microcontroller via signals.
o Field Programmable Gate Arrays (FPGAs): Reconfigurable hardware for
specific tasks (e.g., audio filtering, MPEG encoding). Faster than general-purpose
processors and don’t require fabrication, ideal for one-off designs.
• Operation: Embedded systems receive data via sensors, process it with the
microcontroller (and IP cores/FPGAs), and output results through actuators.
• Key Point: Embedded systems integrate sensors, actuators, microcontrollers, and
specialized components like IP cores and FPGAs for efficient, task-specific functionality.
Microcontrollers in Embedded Systems 💾
This section focuses on microcontrollers, the heart of embedded systems.
• Definition: Microcontrollers are integrated circuits that execute programs, managing
inputs and outputs in embedded systems.
• Microcontroller vs. Microprocessor:
o Microprocessors: Found in desktops/laptops, they’re powerful, general-purpose,
and feature-rich (e.g., quad-core at 4 GHz).
o Microcontrollers: Smaller, slower (e.g., 4–500 MHz), and cheaper, designed for
efficiency in embedded systems. They avoid overkill for specific tasks.
• Features:
o Contain flash memory for non-volatile program storage.
o Packaged with pins for connecting to other components via printed circuit boards
or manual wiring.
• Programming:
o Code is written on a host (e.g., laptop) in languages like C/C++ (Arduino) or
Python (Raspberry Pi).
o Compiled code is transferred to the microcontroller’s flash memory, often via
USB, with programming hardware integrated into boards like Arduino or
Raspberry Pi.
• Key Point: Microcontrollers are efficient, task-specific processors central to embedded
systems, programmed via host platforms for IoT applications.
Components of Embedded Systems 🧰
This section details common components in embedded systems, emphasizing their roles.
• Development Boards:
o Platforms like Arduino or Freescale boards host microcontrollers, programmed
via a host (e.g., laptop) over USB.
o Raspberry Pi allows direct development but is less common.
• Processors:
o General-Purpose Processors: Found in desktops, overdesigned with unused
features, expensive but versatile.
o Digital Signal Processors (DSPs): Optimized for data streams (e.g., audio/video
filtering, compression) with vector instructions for parallel processing (e.g.,
blurring a million pixels).
• Sensors:
o Simple Sensors: Report single values (e.g., thermistor for temperature,
photoresistor for light intensity).
o Complex Sensors: Provide detailed data (e.g., CMOS cameras capturing color
images, Ethernet controllers sensing network data).
• Actuators:
o Simple Actuators: LEDs, LCDs (e.g., digital watch displays).
o Complex Actuators: Servo motors (control precise angles), Ethernet controllers
(output network data).
• Key Point: Embedded systems combine development boards, specialized processors, and
diverse sensors/actuators for task-specific functionality.
Example Embedded System 🔄
This section demonstrates a simple embedded system using an Arduino.
• Setup:
o Sensor: A potentiometer (variable resistor) senses rotation, reporting resistance
changes via a yellow wire.
o Actuator: A servo motor controls the angle of an arm, driven by a green wire.
o Microcontroller: An Arduino reads potentiometer data and controls the servo
motor.
o Wiring: Power and ground (red/black wires) connect to a breadboard, distributing
to components.
• Operation: Turning the potentiometer adjusts the servo motor’s angle proportionally,
showcasing sensor-microcontroller-actuator interaction.
• Key Point: This example illustrates the core embedded system structure: sensors input
data, microcontrollers process it, and actuators produce outputs.
Analog vs. Digital in Embedded Systems 📈
This section explains the analog-digital divide in embedded systems.
• Analog vs. Digital:
o Analog: Continuous, like real numbers (e.g., light brightness, sound volume).
Physical phenomena (e.g., light, sound, touch) are typically analog.
o Digital: Discrete, like integers (e.g., on/off states). Microcontrollers process
digital data (zeros and ones).
• Conversion Needs:
o Analog-to-Digital Conversion (ADC): Converts analog sensor inputs (e.g.,
microphone voltage from sound pressure) into digital numbers for microcontroller
processing. The result is an approximation (e.g., stair-stepping waveform).
o Digital-to-Analog Conversion (DAC): Converts digital microcontroller outputs
into analog signals for actuators (e.g., speakers).
• Example: A microphone captures an analog sound wave (sine wave). ADC converts it to
a digital stair-stepping waveform, processed by the microcontroller. DAC reverses this for
speaker output.
• Key Point: Embedded systems bridge the analog world and digital processing via ADC
and DAC, enabling interaction with physical phenomena.
Equipment for Building IoT Devices 🔧
This section specifies equipment for constructing IoT devices, focusing on prototyping.
• Development Boards:
o Arduino: Basic board with a microcontroller, USB interface, and pins for wiring.
Minimal extras, focused on programming the microcontroller.
o Raspberry Pi: Higher-end, with additional features (e.g., accelerometer,
magnetometer).
• Cables:
o USB cables connect boards to hosts.
o Ethernet cables (common for networked boards, e.g., Raspberry Pi).
o Jumper wires connect components to board pins.
• Input Components (Sensors):
o Potentiometers (sense rotation).
o Photoresistors (sense light brightness).
o Keypads/buttons (user inputs).
• Output Components (Actuators):
o LEDs (light indicators).
o Resistors (limit current to protect components like LEDs).
• Breadboard:
o Used for non-permanent wiring, avoiding soldering.
o Features rows (five holes connected) for component connections and columns for
power/ground distribution.
• Example Circuit: An Arduino connected to LEDs and resistors on a breadboard,
programmed to control LED sequences.
• Key Point: Prototyping with development boards, sensors, actuators, and breadboards
enables flexible, efficient IoT device construction.
Overall Takeaways 🌟
Embedded systems are the backbone of IoT devices, integrating computational intelligence into
task-specific, user-friendly devices. They differ from general-purpose computers by prioritizing
efficiency (low cost, power, or high performance) and application specificity, achieved through
hardware-software co-design. Key components include microcontrollers, sensors, actuators,
and specialized hardware like IP cores and FPGAs. Analog-to-digital and digital-to-analog
conversions bridge the analog world with digital processing. Prototyping with tools like
Arduino, Raspberry Pi, and breadboards enables efficient IoT development. While most IoT
devices are networked embedded systems, their design emphasizes simplicity and performance
within strict constraints, distinguishing them from versatile but less efficient computers.