ecen 22701electronics design laboratory electronics design laboratory lecture #11, fall 2014
TRANSCRIPT
Electronics Design Laboratory 1ECEN 2270
Electronics Design LaboratoryLecture #11, Fall 2014
Electronics Design Laboratory 2
Experiment 5 Tasks• Final Project– Start working on final project ideas– Milestone 1, informal discussion about project ideas –
November 11th
• Nothing due yet… I’ll stop by each lab bench to discuss your ideas.
• Experiment 5 Specific– Build the components of a wireless on/off and speed
control circuit (Part A, 1 week) – Write code for the Arduino to measure the on time of a
digital input for speed control (Part B, 1 week)– Demonstrate wireless on/off and speed control of the
robot, demo is on November 13th
ECEN 2270
Electronics Design Laboratory 3
Wireless Transmitter/Receiver
• 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
Data
RF
vtx
1/fm
1/fc
vrx
Data
Electronics Design Laboratory 4
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0
1
2
3
4
5
Volts
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0
1
2
3
4
5
Seconds
Volts
RF Communication
ECEN 2270
• 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
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
Group A Data
Group B Data
Electronics Design Laboratory 5
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0
1
2
3
4
5
Volts
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0
1
2
3
4
5
Seconds
Volts
RF Communication
ECEN 2270
• Both signals are modulated using a 555 timer oscillating at 500Hz for Group A, and 1.2kHz for Group B
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
5VDC
Input
Output
fm1 = 500Hz
fm2 = 1.2kHz
Group A Data
Group B Data
Electronics Design Laboratory 6
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-3
-2
-1
0
1
2
3
Volts
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-3
-2
-1
0
1
2
3
Seconds
Volts
RF Communication
ECEN 2270
• 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
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
fc = 10kHz
fm1 = 500Hz
fm2 = 1.2kHz
Electronics Design Laboratory 7
0 1 2-3
-2
-1
0
1
2
3
Volts
0 1 2-3
-2
-1
0
1
2
3
0 1 2-3
-2
-1
0
1
2
3
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
-5
0
5
Seconds
Intesity
RF Communication
ECEN 2270
• 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.
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
Group A Transmission
Group B Transmission RF Noise
Total RF noise and signal
Electronics Design Laboratory 8
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
• 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
Electronics Design Laboratory 9
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
• 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
Electronics Design Laboratory 10
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
fc
• 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+fm1 fc-fm1
Electronics Design Laboratory 11
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
fc
• 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
Electronics Design Laboratory 12
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
fc+fm2 fc-fm2
fc
• 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
Electronics Design Laboratory 13
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
fc fc
• 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
Electronics Design Laboratory 14
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
fc fc
• 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
Electronics Design Laboratory 15
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
fc fc fm1 fm2
• 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
Electronics Design Laboratory 16
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
• Each groups filter is tuned to their specific modulation frequency
• This is how we separate our signal from noise and other groups
5VDC
5VDC47kΩ
47kΩ 0.1μF
2
10nF
10nF
R3
R1
R23
fm1 fm2
Group A Filtered Output
Group B Filtered Output
Electronics Design Laboratory 17
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
• Each groups filter is tuned to their specific modulation frequency
• This is how we separate our signal from noise and other groups
5VDC
5VDC47kΩ
47kΩ 0.1μF
2
10nF
10nF
R3
R1
R23
Group A Filtered Output
Group B Filtered Output
fm1 fm2
Electronics Design Laboratory 18
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
2
4
Seconds
Magnitude
0
1
2
3
4
5
Seconds
Volts
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
1
2
3
4
5
Seconds
Volts
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
• Each groups filter is tuned to their specific modulation frequency
• This is how we separate our signal from noise and other groups
5VDC
5VDC47kΩ
47kΩ 0.1μF
1
10nF
10nF
R3
R1
R22
Group A Filtered Output
Group B Filtered Output
Electronics Design Laboratory 19
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
2
4
Seconds
Magnitude
0
1
2
3
4
5
Seconds
Volts
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
1
2
3
4
5
Seconds
Volts
RF Communication
ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
• Each groups filter is tuned to their specific modulation frequency
• This is how we separate our signal from noise and other groups
Group A Filtered Output
Group B Filtered Output
20ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
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.
Out
Peak Detector
Electronics Design Laboratory
In
0.05 0.1 0.15 0.2 0.250
2
4
Seconds
Magnitude
0
1
2
3
4
5
Seconds
Volts
0.08 0.085 0.09 0.095 0.1 0.105 0.11 0.115 0.120
1
2
3
4
5
Seconds
Volts
0.7V
0.7V
21ECEN 2270
Input Signal Transmitter Receiver Robot
(Arduino)Modulator Filter Peak Detector
RF Communication
Electronics Design Laboratory
5VDC
5VDC47kΩ
47kΩ 0.1μF
Input
10nF
R3
R1
R2
Peak Detector
5VDC
5VDC
R40.1μFR5
Comparator
Output
• Output is time delayed• Output pulses are shorter than input pulses!• There may be ‘bounce’ on positive transitions
Electronics Design Laboratory 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
– Ultrasonic– Infrared– Buttons
• Position– Compass– Accelerometer– Gyros– GPS– Tilt
• Sound– Voice Recognition– Microphone– Speakers
• Environment– Temperature– Humidity– Altitude– Pressure– Light (LDR, etc)
• Physical– Pressure– Flex– Vibration– Buttons
• Other– RFID– ZigBee– Bluetooth– Other wireless
ECEN 2270
Actuators• Your robot• Motors
– DC (Brushed or Brushless)– Stepper– Servo– Linear– Solenoid
• LEDs– Single Color– RGB w/ PWM control– Infrared– 7 segment
Arduino• Shields
– Motor/Stepper/Servo– GPS– Audio (wave, mp3, etc)– Ethernet– GSM– Wifi
• Larger controllers