Documente Academic
Documente Profesional
Documente Cultură
Internet of Things
SUMMER SCHOOL
Electronic Signals
Electricity Equations
General Purpose Input / Output (GPIO)
Pulse Width Modulation (PWM)
Outline Analog to Digital Converters (ADC)
Microcontrollers and Computers
Questions
2
Electronic
Signals
3
Analog and Digital
We can only store digital signals
◦ Using 1 or several bits / sample
4
Bits per sample
1 bit signals sample
◦ Values LOW (0) and HIGH (1)
◦ digital
5
Sampling
Sensor signals are analog
6
Sampling Rate
The faster we sample the higher the accuracy
Nyquist Theorem
◦ Sampling frequency >= 2 x maximum frequency
7
U
Electricity I=
Equations R
åi k = 0
k
åE = åR I
k k k
k k
8
Ohm’s Law
U
I=
R
3V
I= = 0.025A = 25mA
10W + 50W + 60W
9
Kirchhoff Law I
åi k
=0
k
-I 1 + I 2 + I 3 = 0
10
Kirchhoff’s Law II
åE = åR Ik k k
k k
L :E = I R +I R
1 1 1 3 3
L :0 = I R - I R
2 2 2 3 3
11
Voltage Divider
V +V = V
1 2 in
V =I R
1 1
V =V = I R
2 out 2
We measure Vout
12
Voltage Divider
=
R1 0
V out
=?
13
Voltage Divider
R =¥
1
V =?
out
14
Voltage Divider
R =0
2
V =?
out
15
Voltage Divider
R =¥
2
V =?
out
16
Voltage Divider
R =0
1
R =0
2
V =?
out
17
Voltage Divider
R =0
1
R =0
2
V =?
out
Short circuit
18
General Purpose
Input / Output
19
Output and Input
Digital Pins
◦ Value LOW (0) or HIGH (1)
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
26
Analog and Digital Converters
Measure voltage
Parameters
◦ Bits per sample
◦ Sampling rate
27
Analog and Digital Converters
Measure voltage
Parameters
◦ Bits per sample
◦ Sampling rate
28
Analog and Digital Converters
Measure voltage
Parameters
◦ Bits per sample
◦ Sampling rate
29
Analog and Digital Converters
Measure voltage
Parameters
◦ Bits per sample
◦ Sampling rate
30
Analog and Digital Converters
One ADC
Multiplexed
◦ Reads for A0
◦ Reads for A1
◦ Reads for A2
◦ Reads for A3
…
31
Microcontrollers
and Computers
32
Microcontrollers and Computers
Simple systems Full CPUs
Control hardware High speeds
Low speeds Large memory
Small memory GPIO
GPIO
Run OS
PWM
ADC
Run single software
Microcontrollers and computers
Firmware Software
Intel® Edison
36