SlideShare a Scribd company logo
Electronics for the
Internet of Things
SUMMER SCHOOL
Outline
Electronic Signals
Electricity Equations
General Purpose Input / Output (GPIO)
Pulse Width Modulation (PWM)
Analog to Digital Converters (ADC)
Microcontrollers and Computers
Questions
2
Electronic
Signals
3
Image from http://autosystempro.com/analog-and-digital-principles/
Analog and Digital
We can only store digital signals
◦ Using 1 or several bits / sample
We store an array of numbers
Parameters
◦ Bits per sample
◦ Sampling rate
4
Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx
Bits per sample
1 bit signals sample
◦ Values LOW (0) and HIGH (1)
◦ digital
n bits signals sample
◦ Values 0 .. 2n-1
◦ digital representation of an analog signal (analog)
5
Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx
Sampling
Sensor signals are analog
6
Image from http://www.snotmonkey.com/work/school/405/overview.html
Sampling Rate
The faster we sample the higher the accuracy
Nyquist Theorem
◦ Sampling frequency >= 2 x maximum frequency
Voice is 0.3 .. 3.4 KHz
◦ 8KHz phone
7
Image from http://www.jazzpoparkisto.net/audio/audio32.html
Electricity
Equations
8
I =
U
R
kik
å = 0
kEk
å = kR kIk
å
Ohm’s Law
9
I =
U
R
I =
3V
10W+50W+ 60W
= 0.025A = 25mA
Kirchhoff Law I
10
kik
å = 0
- 1I + 2I + 3I = 0
Kirchhoff’s Law II
11
kEk
å = kR kIk
å
1L : E = 1I 1R + 3I 3R
2L :0 = 2I 2R - 3I 3R
Voltage Divider
12
1V + 2V = inV
1V = I 1R
2V = outV = I 2R
We measure Vout
Voltage Divider
13
1R = 0
outV = ?
Voltage Divider
14
1R =¥
outV = ?
Voltage Divider
15
2R = 0
outV = ?
Voltage Divider
16
2R =¥
outV = ?
Voltage Divider
17
1R = 0
2R = 0
outV = ?
Voltage Divider
18
1R = 0
2R = 0
outV = ?
Short circuit
General Purpose
Input / Output
19
Output and Input
Digital Pins
◦ Value LOW (0) or HIGH (1)
Each pin acts like a
◦ battery (OUTPUT)
◦ voltage meter (INPUT)
20
Output
Pins act like a battery
◦ LOW – 0V
◦ HIGH – 5V, 3.3V or 1.8V
21
Input
We measure Vout
◦ It goes into the pin
22
Pulse With
Modulation
23
Pulse Width
We set the % of “high” cycle
◦ 0 – 0%
◦ 255 – 100%
◦ Depends on the library
Implementation
◦ Hardware
◦ Software
Usage
◦ LED dimming
◦ Servo Motors
24
Analog to Digital
Converters
25
Analog and Digital Converters
Measure voltage
Parameters
◦ Bits per sample
◦ Sampling rate
For 1 bit we have …
26
Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx
Analog and Digital Converters
Measure voltage
Parameters
◦ Bits per sample
◦ Sampling rate
For 1 bit we have …
◦ GPIO Input
27
Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx
Analog and Digital Converters
Measure voltage
Parameters
◦ Bits per sample
◦ Sampling rate
For 1 bit we have …
◦ GPIO Input
28
Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx
Analog and Digital Converters
Measure voltage
Parameters
◦ Bits per sample
◦ Sampling rate
For 1 bit we have …
◦ GPIO Input
For n bits we have …
29
Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx
Analog and Digital Converters
Measure voltage
Parameters
◦ Bits per sample
◦ Sampling rate
For 1 bit we have …
◦ GPIO Input
For n bits we have …
◦ 0 – 2n-1
30
Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx
Analog and Digital Converters
One ADC
Multiplexed
◦ Reads for A0
◦ Reads for A1
◦ Reads for A2
◦ Reads for A3
…
31
Image from http://www.centerpointaudio.com/Analog-VS-Digital.aspx
Microcontrollers
and Computers
32
Microcontrollers and Computers
Simple systems
Control hardware
Low speeds
Small memory
GPIO
PWM
ADC
Run single software
Full CPUs
High speeds
Large memory
GPIO
Run OS
Microcontrollers and computers
Firmware Software
Intel® Edison
Firmware (will be available) Software
Questions?
36

More Related Content

Electronics for the Internet of Things