Lec 2
Lec 2
2
What to expect ?
• Roadmap to build IoT systems
• Some basic electrical components - An overview
• Characteristics of IoT Systems
• Sensors
• Actuators
3
How do you build IoT things?
4
How do you build IoT things?
• IoT is a synthesis of hardware and software
5
Some basic electrical components
6
Hardware revolution
• Low-cost, componentized hardware enables rapid prototyping without
advanced electrical engineering knowledge
7
Background: Atoms
8
Background: Electrical Current
• Usually free electrons hop
around randomly
• However, outside forces can
encourage them to flow in a
particular direction
• Magnetic field, charge
differential this is called
current
• We can vary properties of
current to transmit information
(via waves, like dominos, as
electron drift velocities are
very slow)
9
Making an Electrical “Circuit”
10
Electrical Current Can Be Manipulated
• It is possible to take current and change it
11
Flowing Electricity is Like Flowing Water
12
Water Analogy: Capacitance
13
Electrical Components
14
How to draw a circuit
• Need to remember our designs, show to others
• Need to clearly describe what each component is, properties of
component, which pins are connected, etc.
15
Electronic Symbols
16
Resistors and Potentiometers
• Useful for:
• Protecting components from getting too
much current
• Increasing and decreasing voltage
• Measuring things (e.g., light intensity)
17
Resistors and Potentiometers
• Key metrics:
• Resistance: how much they resist current (Ohms)
18
Capacitors
• What they do:
• store charge
• Useful for:
• Temporarily holding some charge (like
a tiny battery)
• Smoothing out voltage spikes
• Measurement (humidity, pressure,
touch sensors)
19
Capacitors
• Key metrics:
• Capacitance: how much charge it can store (farads)
21
Diode
• Key metrics:
• Maximum forward current: how much
current can go through in the forward direction
(amps)
• Maximum reverse voltage (breakdown
voltage): how much voltage can be withstood
in reverse direction
• Maximum forward voltage: voltage difference
between input/output when current going
through forward direction (ideally should be
zero, no resistance to current)
22
Transistors
• What it does:
• acts like a switch; when voltage
applied to one wire, forms
connection between other two wires
• Useful for:
• Acting like a switch
• Amplifying a signal
23
Transistors
• Key metrics
• Type: does applied current turn on connection
(NPN) or turn off connection (PNP)
• Maximum reverse voltage (breakdown
voltage): how much voltage can be withstood in
reverse direction
• Maximum forward voltage: voltage difference
between input/output when current going
through forward direction (ideally should be
zero, no resistance to current)
24
Electric Motors
• Main Idea:
• Get two big magnets, one north and one south
25
Common types of Electric Motors
26
More types of Electric Motors
27
References
• At SparkFun.com you can buy electronics materials and there are also excellent tutorials
including; What is Electricity, What is a circuit, What is Voltage, What is current, What is Electric
power….
• JIMBO. n.d. “What is Electricity.” Sparkfun Electronics. https://learn.sparkfun.com/tutorials/what-is-
electricity
• Learn Engineering. 2016. “How Does a Diode Work.” YouTube video,
https://www.youtube.com/watch?v=JNi6WY7WKAI
• Learn Engineering. 2016. “Transistors, How do they Work?” YouTube video,
https://www.youtube.com/watch?v=7ukDKVHnac4
• MITK12Videos. 2015. “What is a Semiconductor.” YouTube video,
https://www.youtube.com/watch?v=gUmDVe6C-BU
• RimstarOrg. 2014. "How to Read a Schematic." YouTube video
https://www.youtube.com/watch?v=_HZ-EQ8Hc8E
• Techquickie. 2017. “Capacitors, Resistors, and Electronic Components.” YouTube video
https://www.youtube.com/watch?v=JNi6WY7WKAI
• Electronics Tutorials. n.d. “Semiconductor Basics.” Aspencore https://www.electronics-
tutorials.ws/diode/diode_1.html
• Diodes: https://www.electronics-tutorials.ws/diode/diode_3.html
28
Characteristics of IoT Systems
29
Characteristics of IoT Systems
• They can perceive one or more aspects of the world; i.e. they can hear, see, feel,
smell or taste something.
• They can produce an action in the world; i.e. they can move, turn on, or activate
something.
• They have a bit of ‘intelligence’, that uses sensed information to make decisions
about when and how to produce an action.
30
Characteristics of IoT Systems
• Example:
• You can design a system that
unlocks the door of a house when
it recognizes the face of someone
who lives there.
• Example:
• ??
• The air conditioner is a closed-loop system: You set the desired temperature and the air
conditioner ‘knows’ when to start and stop operation to keep the room temperature as
close to the desired value as possible
32
IoT System to IoT Hardware
Micro
Sensor Controller
Actuator
33
Sensors
34
What is a Sensor?
35
Human Sensors
• Touch
• A very much mechanical sense converting mechanical energy into bioelectrical
signal that our brain interprets.
• Hearing
• Mechanized pressure waves reaching on ears and triggering a signal cascade
• Proprioception (Balance)
• Relying on sort of a gyroscopic detection. For instance, inner ear function to detect
mechanical tilt in in different direction
• Vision
• Although it is not mechanical per se, but we have light impinging on a sensor that is
being converted to a biological signal and than our brain is interpreting all these
signals.
36
Human Sensors (touch)
37
Human Sensors (touch)
38
Human Sensors (touch)
39
Phone Sensors
40
Sensors
41
Sensors
42
Sensors
43
Sensors
44
Sensors
45
Sensors – References
• Temperature: Thermistors, thermocouples, resistive temperature detectors and many
others.
• Pressure: Fibre optic, vacuum, elastic liquid-based manometers, linear variable differential
transformer and electronic.
• Flow: Electromagnetic, differential pressure, positional displacement, thermal mass.
• Level Sensors: Differential pressure, ultrasonic radio frequency, radar, thermal displacement.
• Proximity and displacement: Linear variable differential transformer, photoelectric,
capacitive, magnetic, ultrasonic.
• Biosensors: Resonant mirror, electrochemical, surface Plasmon resonance, Light addressable
potentio-metric.
• Image: Charge coupled devices, CMOS.
• Gas and chemical: Semiconductor, infrared, conductance, electrochemical.
• Inertial Measurement Units: Gyroscopes, accelerometers, magnetometers.
• Others: Moisture, humidity sensor, tilt sensor, force, viscosity.
• List of sensors
46
Cases of 'indirect' sensor measurements
• we can sense a great many things indirectly, from sensors not intended
for that particular purpose, or by using multiple sensors to determine a
seemingly unrelated property.
• CASE: Water salinity
• The level of dissolved salt in water is a critical measurement in many industries,
particularly agriculture.
• However there isn’t a sensor available (at a reasonable cost, easy portability, etc.)
that will directly measure NaCl (the type of salt we are interested in).
• So, the common approach is to approximate this value by measuring something
that is a by-product of salinity levels: in this case, conductivity.
47
Cases of 'indirect' sensor measurements
48
Generic Sensing Application
49
Generic Sensing Application
50
Generic Sensing Application
51
Generic Sensing Application
• Smart Sensors
• At a minimum, a smart sensor is made of a
• sensor,
• a microprocessor and
• communication technology of some kind.
52
Sensor Nodes
• The overall architecture of a sensor node consists of:
• The sensor node processing subsystem running on sensor node main CPU
• The sensor subsystem and
• The communication subsystem
53
54
55
56
57
58
Desirable Sensor Characteristics
• Linearity: The output should change linearly with the input
• High resolution: Resolution is the smallest change in the input that the device can detect.
(1.0 or 1.001 )
• Repeatability : Deviation from reading to reading when they are taken for a number of
times under identical conditions
Sensitivity Min input of physical parameter that will create a desirable output change
Linearity An expression of the extent to which the actual measured curve departs from the ideal
Accuracy The max difference between the actual value and the value indicated at the output
Range Difference between max and min values that can be measured
Response time Output state changes to a new state over a period of time
Resolution Smallest change in the input that the sensor can detect
60
Sensor Terminology/ Specifications
• Sensitivity = slope = dV/dp
(Voltage) (Voltage)
(Pressure) (Pressure)
Ideal Sensor Real World Sensor
–Linear Relationship – Non-linear relation (even with offset)
61
Sensor Terminology/ Specifications
• Non-linearity - How to handle it
• Piece-wise linear relationship
• Three different slopes
62
Sensor Terminology/ Specifications
• Non-linearity - How to handle it
• Best-fit line – Most common
• % error = how much it is going to vary
1 % error
100
63 Mpa
Sensor Terminology/ Specifications
• Hysteresis
• Another component of non-linearity
• History driven behavior
• Different behavior for increase/decrease of pressure
• May be due to phase change, trap charge,
• Precision (Repeatability)
• Solution – Best fit curve
64
Sensor Terminology/ Specifications
• Drift - how voltage varies with time at one pressure point
• Reasons – thermal as well as electrical
65
Causes of Non-linearity
Non-ideal sensors Hysteresis
Drift
Repeatability issues
(Precision)
66
Sensor Terminology/ Specifications
• Non-linearity
• Check out foot-notes of the % full scale
output
specification sheets
67
Sensor Terminology/ Specifications
• Overall Error (Error Band)
68
Sensor Terminology/ Specifications
• Accurate - Average of sampled output is close to real value (AC
errors and noise)
69
Sensor Terminology/ Specifications
• Span/ Range
• Manufacturers specify the span or
operating range of the sensor that is
guaranteed for.
70
Sensor Terminology/ Specifications
• Response - Real sensors need time to collect the signal and
response to the signal which is affected by
• Signal Conditioning
• Filtering
• Sampling rate – at what frequency should we collect the information
• Response to input:
• Final value : final stable value required to be achieved
• Overdamped response : system is resisting and takes time/effort to
reach the final resting value
• Underdamped response: Oscillations to reach the final position
• Critically damped response: we get to the resting position as fast as
possible without any offshoot 71
Sensor Terminology/ Specifications
• We have some types of sensors, or we want some
sensors that are stiff and are overdamped
72
Sensor Terminology/ Specifications
input
Delay
73
Sensor Terminology/ Specifications
• Bandwidth (BW) :
• It refers to the range of frequencies over which a
sensor can accurately detect and respond to the input
signal.
• There isn’t a universal formula that applies to
calculate all sensors bandwidth
• BW can be calculated using delay and decay time
• if we assume a signal to be composed of a various number
of frequencies, then Bandwidth is defined as the difference
between the highest frequency (fh) and the lowest
frequency (fl) of the signal.
74
Electronic Noise Sources
75
Electronic Noise Sources
76
Sensor Terminology/ Specifications
• Resolution: Smallest signal that the sensor can
resolve or produce for a particular set of operating
conditions.
• If there is no output signal, even then we can see
some activity due to noise
• Sensor output can only be detected if we can go
above the noise floor
• Noise has some frequency distribution
• Signal to Noise ratio of the signal
• Depends upon BW
77
Sensor Specifications
1.Environmental condition: Usually has limits for temperature/humidity.
These environmental factors can even have an effect on the readings and
need to be factored into the calculations. E.g. accelerometers are sensitive to
temperature and often have a temperature sensor incorporated into the
device.
2.Calibration: Essential for most of the measuring devices, as the readings
change with time.
3.Sensors can be classified based on power or energy supply requirement:
• Active sensor: Requires a power supply. Examples include IMUs, LiDAR (Light
detection and ranging), CCDs.
• Passive sensor: Examples include some RFID tags, thermistors, and temperature
dependant resistors.
78
Reading a Sensor Spec Sheet Early Smart phone accelerometer
79
Reading a Sensor Spec Sheet
80
Reading a Sensor Spec Sheet
81
Reading a Sensor Spec Sheet
82
Actuators
83
84
85
86
Analog front-end to control a motor (actuator)
• An electric motor is a rotating device whose speed is determined by the load the weight of the object
attached to the motor shaft and the DC voltage applied to it’s terminals.
• A digital to analogue converter receiving numbers from a computer and then generating an analogue
voltage that is fed to a pre amplification stage and from there to a motor driver that drives perhaps high
current and high voltage and from there to the actual motor.
• The voltage produced By a DAC can be used after proper conditioning to control the speed of an electric
motor.
• Motor driver serves as an interface between a microcontroller or other control system and the motor itself,
enabling precise control of the motor's speed, direction, and other parameters.
• If we can put all these blocks together and we can call them an actuator. 87
Actuator
• For practical purposes all the blocks after the DAC in the figure above can be represented as a single block.
89
90
Actuator vs Sensors
For every sensor there is an opposite actuator
• Light sensors measure the light coming in, LED sends light out
• Microphone measures the volume of sound coming in, and speaker sound going
out
• Button or on-off switch that detects whether you have pressed it to not. We have
a relay that turns off and on based on the electrical signal
• Cameras to capture visual information, screens to show this information
• Rotation sensors to show how much something rotates, we have stepper motors
where we control the rotation
91
Actuator vs Sensors
• How following sensors and actuators are inverse of each other
Physical Phenomenon Sensors Actuators
Temperature Thermocouple; Thermistor; Thermostat; Heater; Fan; Peltier pumps
Resistive Temperature Detectors (RTDs)
Speed Tacho-generator; Reflective/Slotted Opto-coupler AC and DC Motors
Doppler Effect Sensors Stepper Motor; Brake
93
94
thanks
95