Download presentation
Presentation is loading. Please wait.
1
A lecture for Arduino Course, Winter 2017/18
A few useful circuits Boris van Sosin, Commissar-Engineer A lecture for Arduino Course, Winter 2017/18 Technion, IIT
2
Voltage Divider πΌ= π π
Ohmβs Law: πΌ= π π
πΆπ’πππππ‘= ππππ‘πππ π
ππ ππ π‘ππππ
3
Voltage Divider Assume: When open: Voltage reader has R=β to ground
πΌ= π π
Assume: Voltage reader has R=β to ground When open: V read = 0V π=0π πΌ=0 π= π πΊππ· =0π
4
Voltage Divider Assume: When closed: Voltage reader has R=β to ground
πΌ= π π
Assume: Voltage reader has R=β to ground When closed: V read = 5V π=5π πΌ= ππΆπΆ π
1 π= π πΊππ· =0π
5
Generalized Voltage Divider
πΌ= π π
Total current: πΌ= ππΆπΆ π
1+π
2 Equal to current over each resistor πΌ= πΌ ππ£ππ π
2 Therefore: π ππ£ππ π
2 = πΌ ππ£ππ π
2 β
π
2 =ππΆπΆβ
π
2 π
1 + π
2 πΌ= ππΆπΆ π
1+π
2 π= π πΊππ· =0π π ππ£ππ π
2 =ππΆπΆβ
π
2 π
1 + π
2
6
Voltage Divider Uses: Lots of Arduino inputs
7
Low-Pass Filter Charging a capacitor through a resistor
Initially capacitor is empty π ππππ =0π As capacitor charges, π ππππ rises
8
Low-Pass Filter Charging a capacitor through a resistor
RC Law: π π‘ = π πππ₯ β
1β π βπ‘β
πΆπππ π‘ π π‘ Chart by desmos.com
9
Low-Pass Filter Charging a capacitor through a resistor RC Law
RC Constant depends on resistor and capacitor π π‘ = π πππ₯ β
1β π β π‘ π
β
πΆ Greater resistance and/or capacitance means slower charge
10
Low-Pass Filter Uses: Smoothing a signal
11
Low-Pass Filter Uses: Smoothing a signal
Smoothing digital waveform to (nearly) analog Smoothing high frequency analog Noise filtering
12
H-Bridge Recall first tutorial: Powering a DC motor:
Reversing a motor:
13
H-Bridge Control direction via logic? Simplified solution: Switches
14
H-Bridge Control direction via logic
Close diagonal pair of switches to power motor Close other pair to reverse
15
H-Bridge Control direction via logic Problem: illegal states
Short circuit!
16
H-Bridge Connecting to logic: Replace switches with transistors
HIGH (or PWM) to D5 HIGH (or PWM) to D6 for reverse direction NEVER POWER BOTH! What is missing?
17
H-Bridge Connecting to logic
Diodes, capacitor, protection against illegal state
18
H-Bridge Can be contained in a chip L293D 4x Half H-Bridge
L298 2x Full H-Bridge
19
Increasing No. of Outputs
Arduino UNO has 20 I/O pins TX/RX 12 digital I/O 6 digital Out + Analog In How can this be increased?
20
Shift Register Shift register
Recall from Digital Systems / Logic Design Convert Serial to parallel
21
Shift Register Shift register
Demo: Write 1100 to a 4-bit shift register Strategy: Write in reverse order
22
Shift Register Shift register Write 0 ? ? ?
23
Shift Register Shift register Write another 0 ? ?
24
Shift Register 1 1 Shift register Write 1 ?
25
Shift Register 1 1 Shift register Write another 1 1
26
Shift Register Problem: look at previous state Current output is 100
Is it valid? ?
27
Shift Register Problem: Intermediate output states
Solution: second layer of registers Requires βLatch outβ control
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.