Lecture 11 (Experiment 5, Part A & B)

advertisement
Electronics Design Laboratory
Lecture #11
ECEN 2270
Electronics Design Laboratory
1
Experiment 5 Tasks
• Final Project
– Start working on final project ideas
– Parts can take 1-1.5 weeks to get here. Order early and
order extras!
– Email TAs/me with questions on parts/methods/etc
• Experiment 5
– Build the components of a wireless on/off and speed
control circuit (Should be done this week)
– Write code for the Arduino to measure the on time of a
digital input for speed control (should start this Thursday,
could probably finish next week if needed)
– Demonstrate wireless control of the robot.
ECEN 2270
Electronics Design Laboratory
2
Wireless Transmitter/Receiver
Data
1/fm
vtx
1/fc
RF
vrx
Data
• Carrier frequency fc is fixed at 434MHz
• Modulation frequency fm is much lower
• By filtering vrx the sent data can be re-created
ECEN 2270
Electronics Design Laboratory
3
1
1
0.5
0.5
1
0
0
0.5
0.5
Ideal Modulation
1
AM Modulation
0
-1
-1
-0.5 0 -0.5 0
-1
Simple Modulation
1
1
0.5
0.5
1
1
0
0
0.5
0.5
1/fm 1/fm
2/fm 2/fm
0
1/fm 1/fm
2/fm 2/fm
Carrier 3/fm 3/fm
Modulation
Signal
3/fm 3/fm
-0.5 -0.5
0
0
-1
-1
-0.5 0 -0.5 0
-1
ECEN 2270
-1
1
1.5
1
1.5
0.5
1
0.5
1
Frequency Domain
-1
0
1.5
Time Domain
-0.5 -0.5
0
1.5
0
0.5
2/fm 2/fm
Electronics Design Laboratory
3/fm 3/fm
fc
fc
fc
fc
fc
fc
0
0
0 fm 0 fm
1.5 1.5
1
1.5
1
1.5
0.5
1
0.5
1
0
0.5
1/fm 1/fm
0
0.5
0 fm 0 fm
0
0.5
0 fm 0 3fm
5fm 5fm
fm 3fm
4
RF Communication
•
•
Receiver
Transmitter
Group A (Red Waveforms)
wants to send a 1sec pulse
starting at 100ms. Group
A will use a 500Hz
modulation frequency
Group B (Black
Waveforms) wants to send
a 1sec pulse as well, but
starting at 500ms. Group
B will use a 1200Hz
modulation frequency
Both groups are going to
try and send this signal
wirelessly, using a
434MHz wireless
transmitter/receiver pair
Robot
(Arduino)
Group A
Data
4
3
2
1
0
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
1.4
1.6
1.8
2
5
4
3
2
Group B
Data
1
0
0
ECEN 2270
Peak
Detector
Filter
5
Volts
•
Modulator
Volts
Input
Signal
0.2
0.4
0.6
Electronics Design Laboratory
0.8
1
1.2
Seconds
5
RF Communication
Input
Signal
Modulator
Receiver
Transmitter
• Both signals are
modulated using a 555
timer oscillating at
500Hz for Group A, and
1.2kHz for Group B
Peak
Detector
Filter
Robot
(Arduino)
fm1 = 500Hz
5
Group A
Data
Volts
4
5VDC
3
2
1
0
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
1.4
1.6
1.8
2
5
Output
Volts
4
3
2
Group B
Data
1
Input
0
0
ECEN 2270
0.2
0.4
0.6
Electronics Design Laboratory
0.8
1
1.2
Seconds
fm2 = 1.2kHz
6
RF Communication
•
Receiver
Transmitter
The RF transmitter modulates
the signal a second time at the
carrier frequency
In this example, a 10kHz carrier
frequency is used. The RF
transmitters you will be using in
the lab transmit at
434MHz
Peak
Detector
Filter
Robot
(Arduino)
fm1 = 500Hz
3
2
1
0
-1
-2
-3
0
0.2
0.4
0.6
0.8
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
1
1.2
Seconds
1.4
1.6
1.8
2
3
2
1
Volts
•
Modulator
Volts
Input
Signal
0
-1
-2
-3
fc = 10kHz
ECEN 2270
Electronics Design Laboratory
fm2 = 1.2kHz
7
RF Communication
•
•
Receiver
Transmitter
Both RF transmitters are sending on
the same frequency
In addition, there is a noticeable
amount of noise in most
environments
The result is an extremely messy
signal, and this is with just two groups
transmitting simple pulses.
Filter
Peak
Detector
Group B
Transmission
Group A
Transmission
3
3
2
2
2
1
1
1
0
0
0
-1
-1
-1
-2
-2
-2
0
1
2
-3
0
1
Robot
(Arduino)
RF Noise
3
-3
2
-3
0
1
2
Total RF noise
and signal
5
Intesity
•
Modulator
Volts
Input
Signal
0
-5
0
ECEN 2270
0.2
0.4
0.6
Electronics Design Laboratory
0.8
1
1.2
Seconds
1.4
1.6
1.8
2
8
RF Communication
Input
Signal
Modulator
Transmitter
Receiver
Filter
Peak
Detector
Robot
(Arduino)
• When neither
transmitter is
operating, the
RF spectrum is
dominated by
noise
• This random
noise floor is
generally of a
low magnitude
and equally
distributed
across all
frequencies
fc
ECEN 2270
Electronics Design Laboratory
9
RF Communication
Input
Signal
Modulator
Transmitter
Receiver
Filter
Peak
Detector
Robot
(Arduino)
• When Group A
begins to
transmit, spikes
in the frequency
spectrum appear
• These spikes are
much larger than
the noise floor
and at known
frequencies!
fc
ECEN 2270
Electronics Design Laboratory
10
RF Communication
Input
Signal
Modulator
Transmitter
Receiver
• When Group A
begins to transmit,
spikes in the
frequency
spectrum appear
• These spikes are
much larger than
the noise floor
and at known
frequencies!
Filter
Peak
Detector
Robot
(Arduino)
fc-fm1
fc+fm1
fc
ECEN 2270
Electronics Design Laboratory
11
RF Communication
Input
Signal
Modulator
Transmitter
Receiver
Filter
Peak
Detector
Robot
(Arduino)
• When Group B
begins to transmit,
additional spikes
in the frequency
spectrum appear
• These spikes are at
a different
frequency than
Group A’s
transmissions!
• Neither signal
overlaps with the
other
fc
ECEN 2270
Electronics Design Laboratory
12
RF Communication
Input
Signal
Modulator
Transmitter
Receiver
• When Group B
begins to transmit,
additional spikes
in the frequency
spectrum appear
• These spikes are at
a different
frequency than
Group A’s
transmissions!
• Neither signal
overlaps with the
other
Filter
Peak
Detector
Robot
(Arduino)
fc-fm2
fc+fm2
fc
ECEN 2270
Electronics Design Laboratory
13
RF Communication
Input
Signal
Modulator
Transmitter
Receiver
Filter
Peak
Detector
Robot
(Arduino)
• When Group B
begins to transmit,
additional spikes
in the frequency
spectrum appear
• These spikes are at
a different
frequency than
Group A’s
transmissions!
• Neither signal
overlaps with the
other
fc
ECEN 2270
Electronics Design Laboratory
14
RF Communication
Input
Signal
Modulator
Transmitter
Receiver
Filter
Peak
Detector
Robot
(Arduino)
• An RF receiver acts
as a demodulator
• This demodulation
shifts the frequency
spectrum such that
fc = 10kHz is shifted
to 0Hz
• Both Group A and
Group B receivers
are picking up
everything
fm1 fm2
ECEN 2270
Electronics Design Laboratory
fc
15
RF Communication
Input
Signal
Modulator
Transmitter
Receiver
Filter
Peak
Detector
Robot
(Arduino)
• An RF receiver acts
as a demodulator
• This demodulation
shifts the frequency
spectrum such that
fc = 10kHz is shifted
to 0Hz
• Both Group A and
Group B receivers
are picking up
everything
fm1 fm2
ECEN 2270
Electronics Design Laboratory
fc
16
RF Communication
Input
Signal
•
Modulator
Transmitter
Receiver
Filter
Peak
Detector
Robot
(Arduino)
Each groups filter is tuned to
their specific modulation
frequency
This is how we separate our
signal from noise and other
groups
•
10nF
R3
10nF
R1
5VDC
Group A Filtered Output
2
3
R2
Group B Filtered Output
47kΩ 5VDC
47kΩ
ECEN 2270
0.1μF
fm1 fm2
Electronics Design Laboratory
17
RF Communication
Input
Signal
•
Modulator
Transmitter
Receiver
Filter
Peak
Detector
Robot
(Arduino)
Each groups filter is tuned to
their specific modulation
frequency
This is how we separate our
signal from noise and other
groups
•
10nF
R3
10nF
R1
5VDC
Group A Filtered Output
2
3
R2
Group B Filtered Output
47kΩ 5VDC
47kΩ
ECEN 2270
0.1μF
fm1 fm2
Electronics Design Laboratory
18
RF Communication
•
Modulator
Each groups filter is tuned to
their specific modulation
frequency
This is how we separate our
signal from noise and other
groups
•
Receiver
Transmitter
Magnitude
Input
Signal
2
0
0.2
0.4
0.6
0.8
R1
Volts
Volts
ECEN 2270
1.8
2
2
Group A Filtered Output
Seconds
3
2
1
0.1μF
1.6
4
2
47kΩ
1.4
3
0
5
1
47kΩ 5VDC
1.2
4
5VDC
R2
1
Seconds
5
1
10nF
Robot
(Arduino)
4
0
10nF
R3
Peak
Detector
Filter
0
Group B Filtered Output
0
0.2
0.4
0.6
Electronics Design Laboratory
0.8
1
Seconds
1.2
1.4
1.6
1.8
19
2
RF Communication
Each groups filter is tuned to
their specific modulation
frequency
This is how we separate our
signal from noise and other
groups
Peak
Detector
Filter
Robot
(Arduino)
4
2
0
0
0.2
0.4
0.6
0.8
1
Seconds
1.2
1.4
1.6
1.8
2
5
4
Volts
•
Receiver
Transmitter
3
2
1
Group A Filtered Output
0
5
Seconds
4
Volts
•
Modulator
Magnitude
Input
Signal
3
2
1
0
ECEN 2270
Group B Filtered Output
0
0.2
0.4
0.6
Electronics Design Laboratory
0.8
1
Seconds
1.2
1.4
1.6
1.8
20
2
RF Communication
•
Peak detector follows the peak value of
the waveform
This value is a diode drop less than the
real peak!
We can use a comparator on this peak
detector output in order to generate our
pulse outputs.
Volts
•
Peak
Detector
In
Receiver
Transmitter
Filter
Peak
Detector
Robot
(Arduino)
4
2
0
0.05
0.1
0.15
Seconds
0.2
0.25
5
4
3
0.7V
2
1
0
5
4
Out
Volts
•
Modulator
Magnitude
Input
Signal
3
Seconds
0.7V
2
1
0
0.08
ECEN 2270
0.085
0.09
0.095
Electronics Design Laboratory
0.1
Seconds
0.105
0.11
0.115
0.12
21
RF Communication
Input
Signal
Modulator
Receiver
Transmitter
Filter
Peak
Detector
Robot
(Arduino)
• Output is time delayed
• Output pulses are shorter than input pulses!
• There may be ‘bounce’ on positive transitions
R3
10nF
R1
5VDC
Peak
Detector
Comparator
Input
5VDC
R2
Output
47kΩ 5VDC
47kΩ
ECEN 2270
5VDC
R5
0.1μF
Electronics Design Laboratory
R4
0.1μF
22
Project
• Must rely on fully functional Lab 2-5 circuits
– Can re-do wireless or replace it with a different control
method if desired
– Your robot does not need a remote control! (ex. line
followers and Roombas don’t need remotes)
• Must include an additional analog circuit-design
hardware component. Programming only add-ons or
enhancements do not count.
• When selecting components check
– Range
– Voltage
– Communication
ECEN 2270
Electronics Design Laboratory
23
Sensors
•
Range
–
–
–
•
LEDs
–
–
–
–
Voice Recognition
Microphone
Speakers
Single Color
RGB w/ PWM control
Infrared
7 segment
Temperature
Humidity
Altitude
Pressure
Light (LDR, etc)
Physical
–
–
–
–
•
•
DC (Brushed or Brushless)
Stepper
Servo
Linear
Solenoid
Environment
–
–
–
–
–
•
Compass
Accelerometer
Gyros
GPS
Tilt
Your robot
Motors
–
–
–
–
–
Sound
–
–
–
•
•
•
Position
–
–
–
–
–
•
Ultrasonic
Infrared
Buttons
Actuators
Pressure
Flex
Vibration
Buttons
Arduino
•
–
–
–
–
–
–
Other
–
–
–
–
RFID
ZigBee
Bluetooth
Other wireless
ECEN 2270
Shields
•
Motor/Stepper/Servo
GPS
Audio (wave, mp3, etc)
Ethernet
GSM
Wifi
Larger controllers
Electronics Design Laboratory
24
Download