Salta al contenuto
Note per Studenti Embedded Systems and Microcontrollers Report

Embedded Systems and Microcontrollers

In questa pagina 5

What an embedded system is

Ubiquitous computing

  • Human-machine interaction model proposed in 1988 by Mark Weiser, chief engineer of Xerox's Palo Alto Research Center.
  • It is a post-desktop model: users use computing systems unconsciously, without the direct interaction typical of desktop workstations.
  • It contrasts with the Mainframe model (one computer for many users) and the Personal Computer model (one computer for one user): the ubiquitous model is many computers for one user.
  • It is a Pervasive Computing system, which involves placing processing tools inside commonly used objects. It is now widely present, adopted by everyone even unconsciously.
  • Extremely simple example: a home air freshener that activates when a user passes in front of it.

Moore's law and the evolution of computing tools

Moore's law (as stated on the slide): the complexity of microcircuits (for example measured as the number of transistors per chip or per unit area) doubles every 18 months.

Three plots accompany it:

  1. Transistors per die versus year (1960 to 2010, logarithmic vertical axis from 10010^0 to 101010^{10}, source Intel): memories (1K, 4K, 16K, 64K, 256K, 1M, 4M, 16M, 64M, 128M, 256M, 512M, 1G, 2G, 4G) and microprocessors (4004, 8080, 8086, 80286, i386, i486, Pentium, Pentium II, III, 4, Itanium) follow a straight line on the log scale, that is, exponential growth.
  2. Transistor count versus year of introduction for many named processors (1970 to 2016), from the Intel 4004 (a few thousand transistors) to chips with several billion transistors, again a straight trend on a logarithmic axis.
  3. "Microprocessor cost per transistor cycle" (logarithmic plot, in dollars per transistor per hertz): a straight decreasing line from 1975 to about 2016, annotated halving time: 1.1 years.

Commodore 64 (1982) against modern platforms

Feature Commodore 64 (1982) Arduino UNO (2005) Raspberry Pi 4 (2019)
Clock frequency 0.985 MHz 16 MHz 1.5 GHz
RAM 64 kByte 2 kByte 1, 2, 4 or 8 GByte
ROM 20 kByte 1 kByte 32 GByte microSD
Price 973.5 US dollars 20 euro 50 euro

Reading (ratios computed from the table): the Arduino UNO has a clock about 16 times higher than the Commodore 64 but 32 times less RAM; the Raspberry Pi 4 has a clock about 1500 times higher and gigabytes of RAM; both cost far less. On the Arduino platform see Arduino PlatformArduino is a family of open single-board microcontroller boards built on Atmel AVR chips (UNO, Mega, Micro), extended with stackable shields and programmed through its own IDE.Arduino Platform →.

The processing unit

  • It is the brain of the embedded system, usually equipped with memories, communication modules, analog interfaces (ADCs) and input/output ports.
  • Embedded systems carry out operations of increasing complexity, but still less than those of a PC, and are generally customised for a specific task.
  • Two types of calculation tools are generally used:
    • Microcontrollers, on which single-board microcontrollers such as Arduino are based;
    • System-on-chips (SoC), on which single-board computers such as Raspberry Pi are based.
  • Above these, in terms of power, are microprocessors, on which PCs and smartphones are based.

PLCs

Programmable Logic Controllers (PLCs) are relatively simple devices designed to work in industrial automation systems.

  • They are computation tools that process analog or digital signals coming from sensors and directed to actuators, to automate industrial processes.
  • On the market for decades, low cost, simple to use, widely used in industrial applications.
  • Programmed with ad hoc languages, both textual ("literal") and graphic.
  • The slides show two examples: a compact PLC with terminal rows and a serial connector, and a modular unit with a small display and navigation keys, relay outputs and a LAN port.

Microprocessor versus microcontroller

Aspect Microprocessor Microcontroller
Integration only the computation logic on the chip; needs external memories and peripherals completely autonomous system, works even without other components
Purpose general-purpose customised for a single task
Software typically an operating system manages the applications a firmware stored in flash memory
Clock GHz MHz

The microcontroller

Integrates on a single chip:

  • the controller (8, 16 or 32 bits; clock typically in the MHz or tens of MHz range);
  • the oscillator that generates the clock;
  • RAM and EEPROM data memories, usually a few kBytes;
  • a FLASH memory for the firmware, usually a few tens of kBytes;
  • some I/O and/or GPIO ports.

It can also integrate analog-to-digital or digital-to-analog converters, various communication modules, and input (for example buttons) and output (for example screens) interaction tools.

The System-on-Chip (SoC)

Integrates on a single chip:

  • the microprocessor (generally 32 or 64 bits, clock of hundreds of MHz or GHz);
  • the oscillator;
  • RAM in the order of hundreds of MBytes or GBytes;
  • connectors for interfaces such as USB and Ethernet;
  • analog-to-digital or digital-to-analog converters;
  • other components such as meters (timers), clocks.

Flash memory is usually external, through an SD slot. It needs an operating system to run.

Architecture of an embedded system

The slides compare an embedded system with a living being, which must do four things: eat, think, remember, interact with the environment. The corresponding functions are:

  • be powered (mains, battery or other energy sources);
  • be equipped with a processing tool;
  • be equipped with memory;
  • be equipped with sensors, actuators, connectivity and interaction tools.

Fundamental components: powering system, computation system, memory, sensors and actuators, transceivers. Optional sub-systems: visual output (LCD screens), input systems (keyboards, buttons), storage memories (SD cards). The slide photo shows a real node in a plastic box: a board with a microcontroller, a radio module with an external antenna, two AA batteries, an ultrasonic sensor and other components.

Powering system

  • Simplest way: connect to a PC via USB or to the mains through a power supply.
  • In most cases the system is not connected to a computer; sometimes it can be connected to the electricity grid through a transformer.
  • Otherwise batteries or renewable energy sources (for example solar panels) are needed. Then the architecture must be studied carefully to reduce consumption to a minimum, also through duty-cycling policies.
  • The slides show photos of solar panels, AA and D cells, a lead battery, and a prototype of a small water-driven generator (a paddle wheel).

Sensors and actuators

They allow the system to interact with the environment. They include user interaction systems (Human Machine Interaction, HMI) treated separately.

  • Sensors: input instruments; they measure a parameter from the environment and transform it into an electrical signal.
  • Actuators: output instruments; they transform an electrical signal into an action.
  • Both are transducers: instruments that convert one physical quantity into another.

Sensors, general properties

  • Sensors exist for almost all physical parameters; cost from a few cents to thousands of euros.
  • Output can be analog (continuous), digital (discrete) or binary (ON/OFF).
  • Active or passive depending on whether they need power to function.
  • Static characteristic: the function linking the input stimulus to the output electrical signal.
  • Dynamic characteristic: the behaviour of the sensor when the input varies with appreciable speed.

Sensor specifications (definitions as on the slide; see also Non-Idealities in a Control Loopmodels and control consequences of the main non-idealities of a feedback loop, namely sensor bias, noise, quantization and limited bandwidth, actuator saturation and limited bandwidth, time delays with Pade approximations, disturbances and parameter or model uncertainties.Non-Idealities in a Control Loop →):

  • Sensitivity: the ratio between the input variation and the output variation (as worded on the slide).
  • Accuracy: the maximum deviation between the measurement given by the sensor and the real value of the measured quantity.
  • Range: the range of measurable values.
  • Resolution: the minimum variation of the input that produces an appreciable variation of the output.
  • Stability: the ability to keep conditions unchanged for a certain time span.
  • Reliability: the ability to perform its function successfully for a certain time span under certain conditions.
  • Repeatability: the reproducibility of the measurement.

Some sensor families (with the technologies named on the slides)

Family Technologies
Presence and movement detectors ultrasonic, optical, capacitive, pressure
Position, displacement and level capacitive, magnetic, optical, ultrasonic, radar
Speed and acceleration accelerometers, gyroscopes
Force, deformation and tactile strain gauges, piezoelectric, piezoresistive, capacitive
Pressure piezoelectric, piezoresistive, capacitive
Flux (no technologies listed; the photos show two flow meters)
Acoustic microphones
Moisture and humidity hygrometers, soil conductivity sensors, capacitive
Light detectors photodiodes, photoresistors, phototransistors, thermal detectors, CCDs
Radiation scintillators, Geiger counters
Temperature thermistors, thermoelectric sensors, optical sensors, thermocouples
Chemical (no technologies listed; the photos show an MQ-7 module and a probe)

Actuators: devices that perform actions following commands from the sensor node.

  • Light actuators: LEDs, infrared emitters.
  • Sound actuators: speakers or piezoelectric devices.
  • Switches: the most common are relays.
  • Motors: stepper, DC, servo.

Human Machine Interaction (HMI) systems

  • Input tools: switches (rotary, ON/OFF, selectors), potentiometers, buttons, joysticks, touch sensors, touch screens, trackballs.
  • Output tools: LEDs, LED arrays, 7-segment displays, LCD screens, TFT displays, buzzers, speakers.

Data transmission

Versione ripasso

Feature Commodore 64 (1982) Arduino UNO (2005) Raspberry Pi 4 (2019)
Clock 0.985 MHz 16 MHz 1.5 GHz
RAM 64 kByte 2 kByte 1, 2, 4 or 8 GByte
ROM 20 kByte 1 kByte 32 GByte microSD
Price 973.5 US dollars 20 euro 50 euro

Teoria collegata