1
Cyber-Physical Systems Analog Output
ICEN 553/453– Fall 2018
- Prof. Dola Saha
Cyber-Physical Systems Analog Output ICEN 553/453 Fall 2018 Prof. - - PowerPoint PPT Presentation
Cyber-Physical Systems Analog Output ICEN 553/453 Fall 2018 Prof. Dola Saha 1 Pulse Width Modulation (PWM) Technique that conforms a signal width, generally pulses The general purpose is to control power delivery The on-off behavior
1
2
Ø Technique that conforms a signal width, generally pulses Ø The general purpose is to control power delivery Ø The on-off behavior changes the average power of signal Ø Output signal alternates between on and off within a
Ø If signal toggles between on and off quicker than the load,
3
Ø A measure of the time the modulated signal is in its “high”
Ø Generally recorded as the percentage of the signal period
Period (T) Duty Cycle (D) VL VH On Off
4
% 100 ´ = Period Time On Cycle Duty
L H avg
T
*In general analysis, VL is taken as zero volts for simplicity.
Period (T) Duty Cycle (D) VL VH On Off
5
6
Ø Counter counts up
Ø When the counter
7
Ø The PWM device on the RPi is clocked at a fixed base-
Ø Integer divisor and range values are used to tailor the
Ø !
"#$ = 19.2*+,/(/010234×46789)
Ø If !
"#$ is 10KHz (0.01MHz), and range is 128,
§ /010234 =
;<.=$>? @ABC×DEFGH = 15
8
9
10
11
12
Ø PWM in effect
13
14
15
Ø https://projects.drogon.net/raspberry-
Ø https://github.com/WiringPi/WiringPi/blob/master/wiringP
16
17
Ø PWM implemented in software Ø https://sourceforge.net/p/raspberry-gpio-
18