Professional Documents
Culture Documents
to Hardware
• IoT is about connected objects, aka Things
• Things = Hardware + Software
• Software is well taught today, and relatively well known by most
students and engineers
• Hardware is often "mysterious"
• “There is a reason they call it hardware — it is hard,”
• Tony Fadell, father of the iPod
Things have some very important differences with generic personal
computers:
• considered as devices / appliances, not PC
• have a specific purpose: generally meant to do one single task
• used in a huge number of different use‐cases
• linked to their environment: sensors and actuators
• connected to various kind of networks
• often constrained devices
Hardware Platforms
A hardware platform describes the physical components that
go to make up a particular device.
Two big families:
• Microprocessor based devices: CPU
• Microcontroller based devices: MCU
CPU based devices
• Microprocessor‐based devices are basically specialized computers.
• microprocessor = general purpose applications
• use same kind of CPU architecture than your PC or your
• smartphone:
• most of the time ARM: smartphones, gadgets, etc.
• Intel x86 (generally used for desktop, laptops, servers)
• MIPS: gateways, network appliances
• run a full Operating System
• generally a Linux derivative: android, openWTR, Brillo, Ubuntu IoT, etc.
• a PC with no keyboard, mouse nor screen !
CPU based devices
Advantages
• "lots" of processing power
• "lots"" of memory: several MB to several GB of RAM
• a full Operating System (generally Linux)
• can run several programs simultaneously
• easy Internet connectivity
• relatively easy to program: languages, tools, etc.
CPU based devices
Limitations
• expensive
• high power consumption
• not real time
• limited connectivity to hardware and sensors
• much better than a traditional PC, but still not at the level of a MCU
• some kind interfaces are more difficult to handle as the OS is not real time
CPU based devices
Prototyping Boards
There’s a huge variety of prototyping board today, for makers, hobbyist,
... and students:
• The most successful: Raspberry Pi
• many other now :
Intel: Edison & Galileo
Beaglebone
UDooo
Cubieboard
etc.
Microcontrollers
A microcontroller (or MCU, short for microcontroller unit) is a small
computer (SoC) on a single integrated circuit containing a processor
core, memory, and programmable input/output peripherals.
Types of Memory
• The embedded memories present in microcontrollers come in
different flavours, and are used for different purposes.
• In the Harvard architecture, systems have separate program
and data memories, usually backed by different technologies,
and with different capacities
MCU based devices
Advantages
• cheap !
• (very) low power consumption
• real time
• easily connectable to peripherals
• Very good at controlling hardware: sensors, etc.
I
• Digital and analog GPIO, SPI, I2C, UART, etc. PWM
I
• no OS: run a single program, very predictable (good thing!)
• Rust
MCU based devices
Limitations
• limited processing power: a few MHz
• limited memory:
• ram : 2Ko (arduino) to 128 KB (SMT32 for example)
• flash : a few KB to 1 MB
• more difficult to program
• No OS: single loop program, interrupts, etc.
I
• I specific tools
• limited connectivity :
• Internet (through ethernet / wifi) is not appropriate
• more suited to low power communication : Zigbee, Thread, 6LowPan, LoRa, SigFox, Bluetooth, etc.
Power and Energy
Power and energy are first-class issues in embedded systems:
● Battery Life
● Energy Density
● Environment
A processor that uses more power, but takes less time may use
less energy:
Type of PINs:
• GPIO: General Purpose Digital Input Output
• PWM : Pulse Width modulation
• ADC / DAC : Analog ‐ Digital conversion
More advanced peripherals use specific interfaces:
• SPI
• I2C
• CAN
• 1‐Wire
General Purpose Input/Output (GPIO)
• GPIO are simple on/off voltage signals, that can drive outputs, or
signal inputs to the microcontroller. They appear as physical pins on
the microcontroller.
• Microcontrollers generally have current sinking and sourcing
limitations (e.g. in the range of 50mA), meaning that GPIOs are
limited to low‐current applications. They can be used to drive higher
current loads through transistors and relays.
• Input pins can be configured to signal interrupts ‐ important for
waking up from sleep modes, and real‐time applications.
GPIO
Input/Output
Analog to Digital Conversion
• ADC: Analog to Digital Conversion, converts an analogue voltage to a
digital value
• DAC: Digital to Analog Converter (less common): converts a digital
value to an analog voltage
Analog to Digital Conversion
• Another form of simple I/O are analogue‐to‐digital inputs. These
inputs read a voltage level (usually between ground and some
reference voltage), and report back a discrete number indicating the
level of this voltage.
• Digital computers require a discrete mapping from the time domain,
to the value domain. Taking a reading at a particular point in time is
called sampling.
• The sampling rate relates to how fast the input can read a (stable)
voltage level.
• Regular sampling allows recording incoming waveforms.
Analogue-to-Digital (Resolution)
• The resolution determines how precise the reading can be for a
given voltage range. The resolution of an ADC converter is typically
stated in bits.
• Q = resolution in volts-per-step
• VFSR = difference between largest and smallest
voltage
• n = number of voltage intervals
• For example, 10-bit resolution means 210 = 1024 discrete voltage
levels.
• With a voltage range of 0-5V, this means Q = 5/1024 = 0.0049V per
step
Resolution Example (3‐bit)
Digital to Analogue
• The reverse of analogue-to-digital is digital-to-analogue. In
this case, you tell the driver what voltage to produce, and it will
generate the requested voltage, or even a (possibly complex)
waveform.
• Some applications for digital-to-analogue conversion can be
approximated with PWM, e.g. dimming an LED.
• Quality of DAC (frequency, resolution) important for application,
e.g. audio.
Pulse Width Modulation
• If you switch a GPIO on and off fast enough, you can generate a pulse‐
width modulation (PWM) signal, to approximate varying output
voltages. Microcontrollers typically have dedicated configurable PWM
drivers.
• Commonly used technique for varying power to inertial loads. The
choice of switching frequency varies depending on the target load.
• The greater the duty cycle, the more power is transferred to the load.
• Made practical by modern electrically controlled (solid‐state) power
switches, e.g. MOSFETs. Very efficient power transfer, as typically zero
current flows when the switch is open, and very little voltage drop
(RDS,ON is low) when switch is closed
Pulse Width Modulation
• The output oscillates between 1 and 0
• Creates analog voltage from a digital output by sending a series of pulses
• Used for servo‐motors, leds (dimmer), etc.
• Can be emulated with software, but difficult and not stable enough for some use
Serial bus: SPI
SPI: Serial Peripheral Interface
• four‐wire synchronous serial bus
• master/slave
• short distance
• for sensors, LCDs, card readers, etc.
• the peripherals contains a microcontroller
Sensors
Interfacing with other sensors
• Non-trivial sensors may have a dedicated
communications interface, or it may simply be
convenient to use a communications bus if
using many sensors.
• Retrieving a value from the sensor requires
interrogating the sensor’s internal registers, by
using communication channels such as: I2C,
SPI, One-wire-bus,
• 4-20ma+HART, CAN, UART.
• Example: MCP9808 I2C Temperature Sensor: send a command to
retrieve current temperature reading.
• Benefit: Sensor does all the heavy-lifting for A-
to-D conversion (+ ability to easily multiplex
sensors)
Actuators
Actuators turn a digital signal into a physical effect.
● Indicators (LEDs, bulbs, LCDs)
● Motors
● Relays
● Speakers/Buzzers
● Heaters
• Embedded systems typically can’t drive high‐power loads directly, so
must use power switches (MOSFETs, IGBTs, relays, contactors, etc) to
operate them
Application: Heating System
Application: Heating System
Testing at Honeywell Lab
GCU Sensor Nodes
• GCU Indoor • HVAC Duct • Door Sensor
Environment Sensor Node Node
Monitoring Sensor
Node
Magnetic Reed
Switches
PIR
41
Testing in GCU Environment Chamber
42
Methodology‐ Sensor Nodes
44