Endpoints of Intelligent Networked System

(Press ? for help, n and p for next and previous slide; usage hints)

Mo, Yilin
Oct 2020

Introduction

Core Questions

  • What is a transducer/sensor/actuator?
  • What is a passive/active sensor?
  • What types electrical phenomena can be leveraged for sensing purpose?
  • How to does camera work?
  • How to connect sensors to endpoints?
  • What are possible energy management options?

Learning Objectives

  • Explain notion of transducer/sensors/actuator
    • Explain self-generating/modulating sensors
  • Explain the conversion of pressure/thermal energy/light into electrical phenomenon.
  • Explain the difference between UART, I2C and SPI.
  • Explain various energy management options.

Table of Contents

Sensors Overview

Classification of Sensors

Basic Terminology

  • Transducer: a device which converts one form of energy to another
  • Sensor: a transducer that converts a physical phenomenon into an electrical signal.
    • an interface from the physical world to the cyber world.
  • Actuator: a transducer that converts an electrical signal to a physical phenomenon
    • an interface from the cyber world to the physical world.

Classification of Sensors

Criterion Classes Example
Power supply Modulating Thermistor
  Generating Thermocouple
Output signal Analog Potentiometer
  Digital Position encoder
Operating mode Deflection Deflection accelerometer
  Null Servo-accelerometer

Operating Mode

  • Deflection
    • The measured quantity produces a physical effect
    • Generates an apposing effect which can be measured
    • Faster
  • Null
    • Applies a counter-force
    • To balance the deflection from the null point (balance condition)
    • Can be more accurate but slow

Power Supply

  • Modulating
    • Also known as Active Sensors
    • They need auxiliary power to perform functionality
    • Sensitivity can be controlled
  • Self-Generating
    • Also known as Passive Sensors
    • They derive the power from the input

Sensor-to-Signal Interface

  • Action of environment on sensor changes an electrical parameter that we can measure
    • resistance changes
    • capacitance changes
    • inductance changes
  • Action of environment on a sensor causes it to generate an electrical signal directly
    • voltage source
    • current or charge source

Electrical Phenomena

  • Resistive
  • Capacitive
  • Inductive
  • Piezo-electric

Resistance-based Devices

  • Resistance of the material depends on the length, area and resistivity as:

    Wheatstone Bridge

    Wheatstone Bridge” by Rhdv under CC BY-SA 3.0; from Wikipedia

\[R = \rho\frac{L}{A}.\]

  • If any one of the terms changes, it affects resistance
  • The most common circuit used to measure the change in resistance is a Wheatstone bridge

\[R_x = R_3 R_2 / R_1.\]

  • Otherwise if the resistance of the voltmeter is high, then

\[V_G = \left(\frac{R_2}{R_1+R_2} - \frac{R_x}{R_x+R_3}\right)V_s. \]

Capacitance-based Devices

  • For plate capacitor, the capacitance depends on the length, area and the permittivity of the dielectric material between the plates of the capacitor:

    Plate Capacitor

    Plate Capacitor” by Fabian_R under CC BY-SA 3.0; from Wikipedia

\[C = \epsilon\frac{A}{d}.\]

  • For vacuum, \(\epsilon_0 = 8.85\times 10^{-12}F/m.\)
  • Same geometrical factors as resistive sensors
  • “small capacitor” is ~ 100 pF (p = pico = \(10^{-12}\))

Resistive vs Capacitive touchscreen

  • Capacitive touchscreen, which measures distortion in parasite capacitance, is now ubiquitous reliable and stable.

Resistive Touch Screen

Resistive Touch Screen

by Mercury13 under CC BY-SA 3.0; from Wikipedia

Capacitive Touch Screen

Capacitive Touch Screen

by Mercury13 under CC BY-SA 3.0; from Wikipedia

Inductive Effects

  • Inductive devices are more-or-less miniature LVDTs
    • Linear Variable Displacement Transducer: a displacement measuring instrument

Linear variable differential transformer

Linear variable differential transformer

by Zedh under CC BY-SA 3.0; from Wikipedia

Linear variable differential transformer diagram

Linear variable differential transformer diagram

by Menner under CC BY-SA 3.0; from Wikipedia

Magnetic Effects

  • Magneto-resistance:
    • recent development of “giant” and “colossal” magnetoresistance materials may hold some promise
    • 2017 Nobel Prize in physics
    • Potential use in hard drives

Albert Fert

Albert Fert

by Jevillegas under CC BY-SA 4.0; from Wikipedia

Peter Grünberg

Peter Grünberg

by Armin Kübelbeck under CC BY-SA 3.0; from Wikipedia

  • Hall effect: the production of a voltage difference (the Hall voltage) across an electrical conductor, transverse to an electric current in the conductor and to an applied magnetic field perpendicular to the current.
    • Hall effect switches are in common use in computer keyboards

“Hall Effect Sensor” by FraunhoferIIS under CC BY-SA 4.0; from Wikipedia

Piezo- and Pyro-electric Devices

  • Piezo- (pressure) and pyro- (heat) electricity are always coupled
    • due to separation of electrical charges in the material’s crystalline arrangement
    • electric dipoles at the molecular level
    • high voltage poling to macroscopically align dipoles
    • “electrets” made by poling various waxy mixtures

      Piezoelectricity

      Piezoelectricity

  • Can get very high voltages (enough to spark across ~ 1 mm) in response to impact
    • 1 cubic centimeter of quartz with 2 kN of correctly applied force can produce a voltage of 12500 V
  • Sensor: Pressure to voltage
  • Acutator: Voltage to deformation
  • Due to leakage, effect is transient

Practical Piezo-Electric Materials

  • Quartz (cut along particular crystal axes to maximize piezo- and minimize pyro- effects):
    • the effect is small but very stable
  • Various ceramics, e.g., ZnO, PZT - Lead Zirconate Titanate (piezoelectric ceramic material)
    • Esp. by deposition on micro- and mini- fabricated devices
    • SAW (surface acoustic wave) devices
  • Plastics (e.g., polyvinylidene difluoride PDVF )
    • (apparently) enormous quantities are used in submarine sonar transducers

Signal Processing

Signal Conditioning

  • Signal conditioning is the manipulation of an analog signal in such a way that it meets the requirements of the next stage for further processing.
  • Filter for expected frequency regime
  • Subtract DC offset (“zeroing”)
  • Amplify or attenuate signal (“scaling”)
  • Linearize relationship between measurand and observed electrical parameter
    • usually done in software after ADC

Analog-to-Digital Converter (ADC)

  • Many different principles
  • Often integrated with microcontrollers
    • in some types, e.g., “successive approximation”, the CPU participates in the conversion process
    • Normally, want to avoid this
  • All involve trade-offs of speed (conversion time), resolution (number of bits) and cost

Flash A/D converter

2-bit Flash ADC

2-bit Flash ADC

by Jon Guerber under CC BY-SA 3.0; from Wikipedia

Pros:

  • Fastest ADC
  • Suitable for applications that requires large bandwidth: image, video sensors

Cons:

  • High power
  • Large die/high cost
  • Limited Resolution

Successive Approximation A/D converter

Successive Approximation ADC

Successive Approximation ADC

by White Flye under CC BY-SA 2.5; from Wikipedia

Pros:

  • High accuracy
  • Low power consumption
  • Low cost

Cons:

  • Low speed

Basic Sensors

Pressure Sensors

  • Transduces pressure into electrical quantity
  • Pressure exerts force which can be converted to electrical voltage using various methods
  • Types
    • Piezo-resistive sensor
    • Capacitive sensor
    • Piezoelectric sensor

Piezo-resistive Strain Gauges

  • Based on the variation of resistance of a material when mechanical stress is applied
  • Made of alloys like constantan, nichrome and also semiconductors
  • Can be bonded or un-bonded
  • Pros:
    • Silicon strain gauges can be very sensitive to pressure changes (2kPa)
    • Metal sensing element are more durable and can withstand high temperature
  • Cons: Consumes power

Strain Gauge

Strain Gauge

by Izantux under CC0 1.0; from Wikipedia

Capacitive Sensor

  • Capacitive diaphragms
    • Diaphragm acts as one plate of capacitor
    • The stress changes the space between capacitor plates
  • Pros:
    • Low power consumption, No DC current, Ideal for wireless sensors
    • Mechanically simple, durable
  • Cons: need careful circuit design to minimize parasite capacitance

Piezoelectric Sensor

  • Pros:
    • durable, ruggedness, some material can withstand 1,000℃
    • low power
    • insensitive to electromagnetic interference
    • inexpensive
  • Cons:
    • cannot be used for truly static measurements

      Piezoelectric sensor frequency response

      Piezoelectric sensor frequency response

      by Omegatron under CC BY-SA 3.0; from Wikipedia

Microphone

  • A microphone is an acoustic to electric transducer that converts sound into an electrical signal.
  • Microphones capture sound waves with a thin, flexible diaphragm. The vibrations of this element are then converted by various methods into an electrical signal that is an analogue of the original sound.
  • Most microphones in use today use electromagnetic generation (dynamic microphones), capacitance change (condenser microphones) or piezo-electric generation to produce the signal from mechanical vibration .

Condenser (or Capacitor) Microphones

  • In a condenser microphone, the diaphragm acts as one plate of a capacitor, and the vibrations produce changes in the distance between the plates.

    Figure

  • Pros:
    • Low mass of the diaphragm
    • flat and extended frequency response
    • higher sensitivity and lower noise
  • Cons:
    • Requires power
    • Sensitive to noise
    • Easy to break

Dynamic Microphones

  • In a dynamic microphone, a small movable induction coil, positioned in the magnetic field of a permanent magnet, is attached to the diaphragm.
  • When sound enters through the windscreen of the microphone, the sound wave vibrations move the diaphragm.

    Figure

  • When the diaphragm vibrates, the coil moves in the magnetic field, producing a varying current in the coil through electromagnetic induction .
  • Pros:
    • power producing
    • sturdy
    • frequency response peaks around 2.5kHz, could be desirable for human voice/music instrument
  • Cons:
    • Large inertia, low pass

Equal-loudness contours

Equal-loudness contours

by Lindosland under Public Domain; from Wikipedia

Piezo Microphone

  • A piezo microphone uses the phenomenon of piezo-electricity

    Figure

  • Piezoelectric transducers are often used as contact microphones, e.g., amplifying sound from acoustic musical instruments.
  • Or to record sounds in unusual environments, such as underwater under high pressure.

Accelerometer

  • Piezo-resistive

    Figure

    • Proof mass suspended with piezo-resistive beams
    • Simple structure, fabrication, and readout (low impedance output)
    • Large temp. sensitivity, smaller overall sensitivity than capacitance devices
  • Capacitive

    Figure

    • Acceleration is measured by the capacitance between a fixed plate and plate on the proof mass.
    • Stable (temperature, drift)
    • Can be susceptible to EMI .

Piezoelectric Accelerometer

  • The principle is to sense the inertial force created by a seismic mass under an acceleration.

Theory behind a piezoelectric accelerometer

Theory behind a piezoelectric accelerometer

by Archiem under CC BY-SA 3.0; from Wikipedia

Temperature Sensors

A temperature sensor detects a change in a physical parameter such as resistance or output voltage that corresponds to a temperature change.

Type of Sensing:

  • Contact
    • Sensor is in direct physical contact with the object to be sensed
    • To monitor solids, liquids, gases over a wide range
  • Non-contact
    • Interprets the radiant energy of a heat source to energy in electromagnetic spectrum
    • Monitor non-reflective solids and liquids

Contact sensing

  • Thermocouples
  • Thermistors
  • Resistance Temperature Detectors (RTD)
  • Semiconductor Temperature sensors
  • Liquid-in-Glass Thermometers
  • Bi-metallic Thermometers

Non-Contact sensing

  • Radiation Thermometers
    • Infrared Thermal Imaging
    • Scanners
    • Spot Radiometers

Motion Detector

  • Photo Sensor
    • Beam of light crossing the room near the door, and a photo sensor on the other side of the room. When the beam breaks, the photo sensor detects the change in the amount of light and rings a bell (or opens garage doors).
  • Microwave- Or Ultrasonic-based
    • Burst of microwave radio energy and waits for the reflected energy to bounce back.
    • When a person moves into the field of microwave energy, it changes the amount of reflected energy or the time it takes for the reflection to arrive.
    • The same thing can be done with ultrasonic sound waves, bouncing them off a target and waiting for the echo.

Pyroelectric/Passive Infrared (PIR) Motion Detector

  • Humans, having a skin temperature of about 34℃, radiate infrared energy with a wavelength between 9 and 10 micrometers. Therefore, the sensors are typically sensitive in the range of 8 to 12 micrometers
    • \(\lambda\) [microns] = 2900 / T [deg K]
  • The infrared light bumps electrons off a substrate, and these electrons can be detected and amplified into a signal.
  • When a person walks by, the amount of infrared energy in the field of view increases
  • Pros: Low power consumption
  • Cons:
    • low sensitivity
    • does not operate when the ambient temperature is close to human temperature
    • insensitive to very slow motion of the objects.

Pyroelectric/Passive Infrared (PIR) Motion Detector

Figure

Passive Infrared Motion Detector

Humidity Sensors

  • Humidity is defined as the water vapor content in the air (or other gases)
  • Absolute Humidity
    • Ratio of the mass of water vapor to the volume of air or gas
  • Relative Humidity
    • The ratio of the moisture content of air compared to the saturated moisture level at the same temperature or pressure
  • Dew Point
    • Temperature and pressure at which gas begins to condense into liquids (like water vapor in air showing up as dew drops)

Relative Humidity Sensor

  • Capacitive RH sensor
    • Common dielectric material, such as plastic or polymer, has a typical dielectric constant ranging from 2 to 15. the value of the capacitance.
    • At normal room temperature, the dielectric constant of water vapor is about 80
    • Change in dielectric constant is directly proportional to the relative humidity in the environment
    • Very low temperature effect
    • 0.2-0.5 pF change in capacitance for 1% RH change, (while the bulk capacitance is between 100 and 500 pF at 50% RH)
  • Resistive RH Sensors
    • Measure the resistance change
    • Inverse exponential relationship to relative humidity
    • Mostly used are conductive polymer, salt etc.
    • Less accurate but cheaper than capacitive sensor

Absolute Humidity Sensor

  • Thermal Conductivity Humidity Sensors

    Thermo Conductivity Sensor

    • Measure absolute humidity
    • Calculate the difference between dry air and air containing water vapor
    • One thermistor sealed in dry nitrogen and another exposed to the environment
    • Difference in current proportional to humidity

Light and Image Sensing

Light Sensing: Principles

  • Photo-chemistry
    • Light renders silver halide grains in film “emulsion” “developable ”
  • Thermal physics
    • Heating effect of incident light heats a sensor that basically measures temperature
  • Photo-physics
    • Interaction of light with matter frees electrons or promotes them from valence to conduction band.

Photoelectric effect

Figure

Figure

Photoelectric effect in a solid

Photoelectric effect in a solid

by Ponor under CC BY-SA 4.0; from Wikipedia

  • Einstein’s Nobel Prize in 1921 “for his services to Theoretical Physics, and especially for his discovery of the law of the photoelectric effect”

Photodiode response function

  • For silicon photodiodes, usually linear, but:
    • non-linear when potential well is saturated (over-exposure)
    • non-linear near zero (due to noise)

      Figure

      Figure

Underexposure Image Noise

  • Canon EOS 6D + EF35mm f/1.4L USM
  • f/1.4 1/8s ISO 12800
  • Captured at Sabah, Malaysia

Underexposure Image Noise

  • Canon EOS 6D + EF35mm f/1.4L USM
  • f/1.4 1/8s ISO 12800
  • Captured at Sabah, Malaysia

Photodiode quantum efficiency (QE)

How many of the incident photons will the photodiode convert into electrons? \[QE = \frac{\#electrons}{\#photons}\]

  • Fundamental optical performance metric of imaging sensors.

    Quantum efficiency of the CCD chip 'PC1' in the Hubble Space Telescope's Wide Field and Planetary Camera WFPC2

    Quantum efficiency of the CCD chip 'PC1' in the Hubble Space Telescope's Wide Field and Planetary Camera WFPC2

    by Eric Bajart under CC BY-SA 3.0; from Wikipedia

Image sensors

Charged Coupled Device (CCD): converts electrons to voltage using readout circuitry separate from pixel

  • higher sensitivity
  • lower noise

Complementary Metal Oxide Semiconductor (CMOS): converts electrons to voltage using per-pixel readout circuitry

  • faster read-out
  • lower cost

CCD vs CMOS

CMOS sensor (very) simplified layout

  • Modern CMOS sensors have optical performance comparable to CCD sensors.
  • Most modern commercial and industrial cameras use CMOS sensors.

    CMOS Image Sensor Layout

    CMOS Image Sensor Layout

    by Shape under GNU General Public License; from Wikipedia

Analog front end

  • Analog amplifier (gain):

    Figure

    • gets voltage in range needed by A/D converter.
    • accommodates ISO settings.
    • accounts for vignetting.
  • Analog-to-digital converter (ADC):
    • depending on sensor, output has 10-16 bits.
    • most often (?) 12 bits.
  • Look-up table (LUT):
    • corrects non-linearities in sensor’s response function (within proper exposure).
    • corrects defective pixels.

Color Primer

Figure

Is the dress Black/Blue or While/Gold?

Color is complicated!

Color is an artifact of human perception

Spectrum of Visible Light

Spectrum of Visible Light

by Jarvisa under GNU Free Document License; from Wikipedia

  • “Color” is not an objective physical property of light (electromagnetic radiation).
  • Instead, light is characterized by its wavelength
  • What we call “color” is how we subjectively perceive a very small range of these wavelengths

Spectral Power Distribution

  • Most types of light “contain” more than one wavelengths.
  • We can describe light based on the distribution of power over different wavelengths.

    Figure

    Spectral Power Distribution of Multiple Light Sources

Spectral Sensitivity Function (SSF)

  • Any light sensor (digital or not) has different sensitivity to different wavelengths.
  • This is described by the sensor’s spectral sensitivity function
  • When measuring light of a some SPD \(\Phi(\lambda)\), the sensor produces a scalar response:

\[R = \int_\lambda \Phi(\lambda)f(\lambda)d\lambda\]

  • Weighted combination of light’s SPD: light contributes more at wavelengths where the sensor has higher sensitivity.

Spectral Sensitivity Function of Human Eye

  • The human eye is a collection of light sensors called cone cells.
  • There are three types of cells with different spectral sensitivity functions.
  • Human color perception is three-dimensional (tristimulus color)
  • “short”: \(S = \int_\lambda \Phi(\lambda)S(\lambda)d\lambda\)
  • “medium”: \(M = \int_\lambda \Phi(\lambda)M(\lambda)d\lambda\)
  • “long”: \(L = \int_\lambda \Phi(\lambda)L(\lambda)d\lambda\)

Spectral Sensitivity Function of Human Eye

Normalized response spectra of human cones

Normalized response spectra of human cones

by BenRG under Public Domain; from Wikipedia

Color Filter Arrays

  • To measure color with a digital sensor, mimic cone cells of human vision system.
  • “Cones” correspond to pixels that are covered by different color filters, each with its own spectral sensitivity function

    Bayer Pattern on an Image Sensor

    Bayer Pattern on an Image Sensor

    by Cburnett under CC BY-SA 3.0; from Wikipedia

Many different spectral sensitivity functions

Each sensor has its more or less unique, and most of the time secret, SSF.

  • Makes it very difficult to correctly reproduce the color of sensor measurements.

    Figure

    Spectral Sensitivity Function of Different Camera Sensor

Many different spectral sensitivity functions

Figure

Different Camera Sensor Produces Different Colors

The Retinal Color Space

Chromaticity

CIE 1931 xy color space diagram

CIE 1931 xy color space diagram

by BenRG under Public Domain; from Wikipedia

  • Perspective projection of 3D retinal color space to two dimensions.
  • The edge corresponds to the color of monochromatic light.

Metamers

  • Distinct mixed beams can produce the same retinal color
  • These beams are called metamers
  • There is an infinity of metamers

Illustration of colour metamerism

Illustration of colour metamerism

by cmglee and Vanessaezekowitz under CC BY-SA 4.0; from Wikipedia

Color Gamuts

Comparison of some RGB and CMYK colour gamut on a CIE 1931 xy chromaticity diagram

Comparison of some RGB and CMYK colour gamut on a CIE 1931 xy chromaticity diagram

by BenRG and cmglee under CC BY-SA 3.0; from Wikipedia

  • Why would a color space not be able to reproduce all of the chromaticity space?
  • Many colors require negative weights to be reproduced, which are not realizable.

Fun Fact: Impossible Colors

Depth Camera

The camera as a coordinate transformation

  • A camera is a perspective projection from the 3D world to a 2D image

\[x = PX\]

  • \(x\): 2D image point
  • \(X\): 3D world point
  • \(P\): camera matrix

    Figure

    Camera as a Projection

Perspective Projection

Figure

Figure

Perspective Projection(Ames Room)

Figure

Ames Room

Triangulation (No noise)

Ideal Triangulation Case

Ideal Triangulation Case

by KYN under Public Domain; from Wikipedia

Triangulation

  • In practice, the image points \(y_1\) and \(y_2\) cannot be perfectly measured, due to
    • Geometric distortion
    • Diffraction
    • Quantization
    • Localization error (feature extraction/matching)
  • The corresponding projection lines (blue) do not, in general, intersect in 3D space and may also not intersect with point \(x\).
  • Solution: “minimize” the error

Triangulation

Non-Ideal Triangulation Case

Non-Ideal Triangulation Case

by KYN under Public Domain; from Wikipedia

Feature Matching

Figure

Figure

Optical Time-of-Flight 3D camera

Principle of operation of a time-of-flight camera

Principle of operation of a time-of-flight camera

by Cmglee under CC BY-SA 4.0; from Wikipedia

The distance can be computed as \( d = \frac{1}{2} \frac{q_1}{q_1+q_2} ct \)

  • \(c\) is the speed of light
  • \(t\) is the length of the pulse
  • \(q_1\) is the accumulated charge in the pixel when light is emitted
  • and \(q_2\) is the accumulated charge when it is not.

Applications

Xbox One's Kinetc

Xbox One's Kinetc

by Evan-Amos under Public Domain; from Wikipedia

Sensor to Endpoints Communication

Serial Communication

Motivation

  • Connect different systems together
    • Two embedded systems
    • A PC and an embedded system
  • Connect different chips together in the same embedded system
    • MCU to peripheral (sensors/actuators)
    • MCU to MCU
  • Without using a lot of I/O lines
    • I/O lines require I/O pads which cost $$$ and size
    • I/O lines require PCB area which costs $$$ and size
  • Often at relatively low data rates
  • But sometimes at higher data rates

Serial vs Parallel

Serial v.s. Parallel Communication

Serial v.s. Parallel Communication

by AmenophisIII under CC0 1.0; from Wikipedia

Design Consideration

  • Number of wires required?
  • Asynchronous or synchronous?
  • How fast can it transfer data?
  • Can it support more than two endpoints?

UART

  • Universal Asynchronous Receiver/Transmitter

    Figure

  • The data format and transmission speeds are configurable
  • The actual electric signaling levels and methods (such as differential signaling etc.) typically are handled by a special driver circuit
  • Commonly used in conjunction with communication standards such as EIA, RS-232, RS-422 or RS-485

UART Protocol

UART Timing Diagram

UART Timing Diagram

by IngenieroLoco under CC BY-SA 4.0; from Wikipedia

  • Each character is sent as
    • a logic low start bit
    • a configurable number of data bits (usually 7 or 8, sometimes 5)
    • an optional parity bit
    • one or more logic high stop bits
    • with a particular bit timing (“baud”)

UART Protocol

  • Asynchronous means that data is transferred without support from an external clock signal.
  • The baud rate (in bit per second) specifies how fast data is sent over a serial line.
  • The inverse of baud rate equals to how long it takes to transmit a single bit.
    • or at what period the receiving device should sample its line.
  • Both sending and receiving devices need to agree upon the same rate.
  • Common baud rates is 9600 bps. Other “standard” baud are 1200, 2400, 4800, 19200, 38400, 57600, and 115200.

I2C

  • Feature 3 wire
    • SCL(clock)
    • SDA(data)
    • GND
  • All slaves share the same bus wire
  • Speed
    • Standard: 100 Kbps
    • Fast-mode: 400 Kbps
    • High-speed mode: 3.4 Mbsp

Master/Slave

  • Master is the initiator of data Tx/Rx
  • Master drive the SCL
  • Slave passively receive command and execute command sent by master

Figure

I2C Master and Multiple Slaves

Example: APDS9960/Power over Ethernet HAT

Figure

APDS9960

class adafruit_apds9960.apds9960.APDS9960(i2c, *, interrupt_pin=None, address=57, integration_time=1, gain=1, rotation=0)

Figure

PoE HAT

Master Write operation

  1. Master generate specific start signal to inform all devices
  2. Master put target device address to the I2C bus, 7-bit address + 1-bit read / write flag
  3. Target device (device with matched address) sends 1bit ACK
  4. Master see ACK on SDA, continue transmitting data on SDA Line
  5. Master release SDA after transmitting each byte, waiting for ACK from the target device
  6. Device sends ACK indicating that data received correctly
  7. Master continue sending data until end of data
  8. Master send specific data to inform end of transmission

Master Write operation

Figure

Master Write

Master read operation

  1. Master generate specific start signal to inform all devices
  2. Master put target device address to the I2C bus, 7-bit address + 1-bit read / write flag
  3. Master release SDA waiting for target device response.
  4. Target device (device with matched address) sends ACK
  5. Master receive data when target response.
  6. Target send data via SDA, After sending each byte, slave release SDA, waiting for master response.
  7. Master sends ACK or NAK to response to slave

Master read operation

Figure

Master Read

SPI

  • Feature 5+ wire
    • SCLK(clock)
    • MOSI(Master out Slave in)
    • MISO(Master in Slave out)
    • SS(Slave Select)
    • GND
  • Typical Speed: 50 Mbps

SPI Single Master and Single Slave

SPI Single Master and Single Slave

by Cburnett under CC BY-SA 3.0; from Wikipedia

Time Diagram

SPI Bus Timing Diagram

SPI Bus Timing Diagram

by Cburnett under CC BY-SA 3.0; from Wikipedia

Multiple Slaves

SPI Single Master and Multiple Slaves

SPI Single Master and Multiple Slaves

by Cburnett under CC BY-SA 3.0; from Wikipedia

Comparison between UART/I2C/SPI

UART I2C SPI
Single Slave Multiple Slaves Multiple Salves
Full Duplex Half Duplex Full Duplex
Tx, Rx SDA, SCL SCLK, MOSI, MISO, SS(mutilple)
Up to 115.2k 3.4 Mbsp ~ 50 Mbps

Other Communication Method

  • Parallel
    • Infiband (up to 1000G for 4-link XDR)
    • USB 3.x (up to 20G for USB 3.2 Gen 2x2)
    • Ethernet (10M/100M/1G/10G)
    • Camera Interface
  • Wireless
    • Will be covered in the next lecture

Energy Sources and Power Management

Power Management

Power Budget

  • Active sensor power
  • Frequency of data collection
  • Wireless radio communication strength and power
  • Frequency of communication
  • Microprocessor or microcontroller power as a function of core frequency
  • Passive component power
  • Energy loss from leakage or power supply inefficiency
  • Power reserve for actuators and motors

Example: TI SensorTag CC2650

Figure

Texas Instruments CC2650 SensorTag

  • Sensors
    • Ambient light sensor
    • Infrared temperature sensor
    • Ambient temperature sensor
    • Accelerometer
    • Gyroscope
    • Magnetometer
    • Altimeter/Pressure sensor
    • Humidity sensor
    • MEMS microphone
    • Magnetic sensor
  • Communications
    • Bluetooth Low Energy
    • IEEE 802.15.4

Example: TI SensorTag CC2650

The TI SensorTag CC2650 has the following power characteristics:

  • Standby mode: 0.24 mA
  • Running with all sensors disabled: 0.33 mA
  • Sensors enabled
    • Temperature sensor: 0.84 mA
    • Light sensor: 0.56 mA
    • Accelerometer and gyros: 4.68 mA
    • Barometric sensor: 0.5 mA
  • Bluetooth LE

Example: TI SensorTag CC2650

State Time [µs] Current [mA] Time * Current
Wake Up & Pre-processing 1283.89 3.10 3981.68
Preparation for Recieve 394.22 3.58 1409.55
Recieve (RX) 461.33 6.69 3085.90
RX to TX transition 109.22 5.21 568.97
Transmit (TX) 84.39 7.34 619.44
Post-Processing 853.44 2.62 2239.63
Total time of connection event [µs]     3186.50
Total time * current [µs*mA]     11905.2
Average Current draw [µA]     3736.1

The TI SensorTag uses a standard CR2032 coin cell battery rated at 240 mAh. Therefore, the maximum life is expected to be about 44 hours.

Power Management Practices

Many power management practices can employed, such as

  • New material: clock gating components not being used in silicon
  • reducing the clock rates of processors or microcontrollers
  • adjusting the sensing frequency and broadcast frequency
  • back-off strategies to reduce communication strength
  • and various levels of sleep modes

Energy storage

Ragone Plot

Figure

Ragone plot of various energy storage/propulsion devices

  • Batteries like Li-ion have higher energy density
  • Capacitors produce very high-power densities

Batteries

  • Lithium-ion (Li-ion) battery is the standard form of power in mobile devices due to its energy density
  • Batteries develop memories with many charge-discharge cycles.
    • For example, 30% capacity loss after 1,000 cycles
    • Loss will increase in a high-temperature environment
  • Another factor in battery life is self-discharge.
    • The rate of loss depends on chemistry and temperature.
    • Typically, a Li-ion can last for 10 years (at ~2% loss per month)

Discharge Profile

Figure

Example of relative discharge rates for various batteries

  • Li-ion provides a nearly constant voltage over its life, but has a precipitous drop towards the end of its storage capacity
  • Difficult to predict the remaining power

Design Considerations

  • The battery energy capacity.
  • Weight. Is the unit intended to fly as a drone, or float on water?
  • The battery power characteristics. How the battery’s energy will vary over time as it’s discharged.
  • Is the sensor in a thermally constrained environment that can affect battery life and reliability?
  • How often will the battery be recharged?
  • Is the renewable form of energy constantly available, or intermittent, as in solar?
  • Geometry/Accessibility/…

Supercapacitors

  • Supercapacitors (or supercaps) store energy at significantly higher volumes than typical capacitors

    Figure

    • A typical capacitor: 0.01 Watt-hours/kg.
    • A supercap: 1 to 10 Watt-hours/kg
    • A battery: 200 Watt-hours/kg.
  • can charge to their full potential in seconds
  • cannot be overcharged
    • Li-ion can be overcharged and can result in serious safety concerns
  • Easy to predict remaining power
    • need DC-DC converter to keep the voltage constant
  • Cons:
    • leakage current
    • the cost (need exotic material such as graphene)

Comparison

  Li-ion Battery Supercapacitor
Energy density 200 Wh/hg 8-10Wh/kg
Charge-discharge cycles 100-1,000 after capacity drops Nearly infinity
Charge-discharge time hours seconds
Discharge profile constant linear decay
Form factor small large
Cost($/kWh) Low(250-100) High(10,000)

Hybrid solution (Electrical vehicle):

  • use supercap for regenerative braking and acceleration
  • use battery for cruising

Energy harvest

  • Any system that represents a change in state can convert its form of energy into electrical energy.
    • hot to cold
    • radio signals
    • light
  • Can be used as the sole form of energy, or to augment or extend the life of a battery
  • In general, have a low energy potential and low conversion efficiency
  • Systems must be efficient in capturing energy and storing power
    • E.g., sensors embedded in a sidewalk (harvesting mechanical energy)
    • Need to compensate the time period in which there is not enough foot traffic
  • There are situations where there is a large supply of untapped waste energy, e.g., in industrial settings

Energy Harvesting Sweet Spots

Figure

Typical Energy Consumption for Various Devices

Solar Harvesting

  • Energy from natural (or artificial) light can be captured and used as an energy source.
  • Solar resources varies seasonally and geographically.
  • Solar PV are not 100% efficient.
    • Efficiency lies between 15% to 20%
    • State of the art is 23%
  • A 25 square cm solar array could produce 300 mW at peak power
  • Also need to consider incidence of light.

Solar Harvesting

Solar Resource Map of China

Solar Resource Map of China

by Cburnett under CC BY-SA 4.0; from World Bank

Piezo-Mechanical Harvesting

Three main ways to convert mechanical energy into electricity:

  • Piezoelectric devices: they use piezoelectric materials that present the ability to generate charges when they are under stress/strain.
  • Electromagnetic devices: they are based on electromagnetic induction and ruled by Faraday’s law. An electromotive force is generated from a relative motion between a coil and a magnet.
  • Electrostatic devices: they use a variable capacitor structure to generate charges from a relative motion between two plates.

Figure

Figure

Electrostatic Device: Charge-constrained cycle

Figure

Figure

Figure

\[E_q = \frac{1}{2} Q_{cst}^2 \left(\frac{1}{C_{min}} - \frac{1}{C_{max}}\right).\]

RF Energy Harvesting

  • Near-field application: RFID
  • Far-field applications, harvest energy from broadcast transmissions
    • Broadcast transmissions are ubiquitous
    • However, capturing energy from RF is difficult due to its low energy density
    • Also need to design appropriate antenna to capture a frequency band

Thermal Harvesting

  • Thermal energy can be converted into an electric current for any device exhibiting heat flow
    • Thermoelectric: Direct conversion of thermal energy into electrical energy through the Seebeck effect.
    • Thermionic: Also known as thermotunneling. Electrons are ejected from an electrode that is heated, and into an electrode that is cool.

Thermoelectric Effect

Thermoelectric Effect

Thermoelectric Effect

by Cmglee under CC BY-SA 4.0; from Wikipedia

  • A thermoelectric generator (TEG), could produce voltage simply based on the temperature difference of a human, and outside temperature
  • One substantial problem with TEG is the poor efficiency of the energy conversion (less than 10%)

Conclusion

Sensor

  • Sensor: a transducer that converts a physical phenomenon into an electrical signal.
  • Action of environment on sensor changes an electrical parameter that we can measure
    • resistance changes
    • capacitance changes
    • inductance changes
  • Action of environment on a sensor causes it to generate an electrical signal directly
    • voltage source
    • current or charge source

Image Sensing

  • Photoelectric effect: Interaction of light with matter frees electrons or promotes them from valence to conduction band.
  • Light is characterized by its wavelength
  • “color” is how we subjectively perceive a very small range of these wavelengths
  • A camera can also be seen a perspective projection from the 3D world to a 2D image
  • One could reconstruct the 3D object by triangulation from multiple cameras
  • Time-of-flight can also be leveraged to gain depth information

Serial Communication

UART I2C SPI
Single Slave Multiple Slaves Multiple Salves
Full Duplex Half Duplex Full Duplex
Tx, Rx SDA, SCL SCLK, MOSI, MISO, SS(mutilple)
Up to 115.2k 3.4 Mbsp ~ 50 Mbps

Energy Management

  • Energy management is important for wireless endpoints
  • Energy storage: battery vs supercapacitor vs hybrid solution
  • Energy harvesting:
    • Solar
    • Mechanical
    • Radio
    • Thermal
  • Power management: do NOT waste energy