Professional Documents
Culture Documents
Lecture 5
Lecture 5
Lecture 5
Lecture 5
Interfacing Circuits
Interfacing Circuits
+ +
– –
Sensor ±10v
Interface
s(t) Ks(t) + b
K IN ADC
sensor signal
so ≤ s(t) ≤ s1 Gain
5 5so
K= b= s1 so
s1 so ARDUINO
R1
R4 vout
+
vin = s(t)
Ks(t) + b
–
R2 R5 5
K= =
R1 R4 s1 so
R5 s2 5so
b= =
R3 s1 so
1OUT 1 8 VCC +
1IN 2 7 2OUT
1IN + 3 6 2IN
VCC 4 5 2IN +
EE 260 Lecture 5: Interfacing Circuits
Analog Input: Simple
• Potentiometer
Variable!
+5v Input Voltage:!
0 – 5v
• PWM!
• R-2R Network!
• “Hack Methods”! http://embeddednewbie.blogspot.com/2011/02/
review-‐of-‐arduino-‐dac-‐solutions.html
• DAC Chips/Shields
• Bipolar
+12v 100% = full positive
0
t 50% = stop
–12v 0% = full negative
(e.g., automotive!
applications)
DIO
Arduino
R1 R
R2
C
+5v
1N4001
Pin BCX38B
0v
EE 260 Lecture 5: Interfacing Circuits
PWM: Unipolar
• Pin is the GPIO pin using PWM!
• The transistor is used to switch +12v
the high currents!
M
• The diode protects the power
supply from the “inductive 10k
kick.”! Pin TIP120
S1 S2
+
V1
– M
S3 S4
S1 S2 S1 S2
+ +
V1
– M V1
– M
+ – – +
S3 S4 S3 S4