.A Basic Wireless Control ECEN 2270 Electronics Design Laboratory 1
Procedures 5.A.0 5.A.1 5.A.2 5.A.3 5.A.4 5.A.5 5.A.6 Turn in your pre lab before doing anything else. Receiver design band pass filter Receiver design peak detector Receiver build and test Transmitter design modulator Transmitter build and test Communication test ECEN 2270 Electronics Design Laboratory 2
Lab 5: Part A.1 Familiarize yourself with the wireless receiver and transmitter included in your lab kit Read through the information on the RF modules, found on the materials page of the lab website. Make sure that you understand how the RF modules are supposed to be connected and used. How are the modules connected and how do they interact with each other? What are the inputs and outputs for each module? In your lab report, include a paragraph or two describing the modules and how they work. Electronics Design Laboratory 3
A.1 Receiver design band pass filter For this part of the lab, you do not need your transmitter circuit Use the following equation to determine your groups target modulation frequency f m f m 240Hz (80Hz)(GroupNumber) You may use the supplied MATLAB script to calculate the needed resistor values (ECEN2270_RX_BANDPASS.m) In LTSpice, simulate your circuit using standard resistor values A bandpass filter circuit is seen on the next page: edit the values to match your design! Use the TLV272 op amp symbol available on the lab website Since we are concerned with the frequency response of this filter, use an AC simulation first Your input source will need to have an AC value of 1 (this is in the advanced setup for the voltage source Probe the output of your filter, and check the center frequency and passband gain, which should not be larger than 0dB Check the attenuation of your circuit at f m ±40Hz. Make sure the gain at these points is well below the gain at f m Once you are satisfied with the frequency response of the filter, run a transient simulation with a PULSE source input with parameters adjusted for your f m. Ideally, the steady state output of the filter should be sinusoidal, with peak to peak amplitude close to 5V. Electronics Design Laboratory 4
A.1 Receiver design band pass filter Adjust the values to match your design! Electronics Design Laboratory 5
A.2 Receiver design peak detector Add a peak detector to your circuit. Start with C = 10n and R = 39k These values may need to be changed later Run an AC simulation again, and measure the op amp output as well as the peak detector output Comment on any differences in your report. Figures will be helpful here When you are satisfied with the operation of your circuit, you can begin building it on your robot breadboard Remember to leave room for your receiver circuit The TLV272 is a dual op amp package. The second op amp will be used to build a voltage comparator next, so make sure that you leave room! Electronics Design Laboratory 6
A.3 Receiver build and test Once your filter and peak detector are built on your breadboard, use your function generator to test the circuit Setup your function generator as a square wave output Find the actual center frequency of your filter This should be the frequency at which you get the largest op amp output. Note this frequency in the lab report. Make sure that your op amp output is close to 5V at your center frequency Adjust your passband gain until your op amp outputs nearly 5V maximum at your center frequency without saturating. Experimentally plot the transfer function of your circuit Begin 200Hz below f m, and end 200Hz above. Plot both the amplitude of your op amp output, as well as the level of your peak detector output This result should be directly comparable to your LTSpice plots Electronics Design Laboratory 7
A.3 Receiver build and test Using your plots, determine a threshold voltage based on the peak detector output at f m ±40Hz Your threshold will need to be slightly higher than this voltage Using the second TLV272 op amp, design a voltage comparator to output 5V when the peak detector output is above your threshold, and 0V when the peak detector output is below your threshold Test this circuit by sweeping the function generator frequency You should see 5V output only at frequencies close to your f m, and 0V output everywhere else Update your LTSpice schematic Wire your receiver circuit up to your filter on your robot. Electronics Design Laboratory 8
A.4 Transmitter design modulator This part of the lab will deal with building the transmitter portion of your wireless communication circuit. Begin by designing a 555 timer in LTSpice to generate an approximately 50% duty cycle square wave at f m Use the astable operation mode shown in Fig.4 of the 555 datasheet, or the 50% duty cycle oscillator shown in Fig.14. The duty cycle does not have to be exactly 50%, but the oscillator frequency should closely match your filter fm frequency. Use the data sheet. Don t just grab equation from lecture. You may need to add a comparator to the output of this circuit in order to boost the 555 timer output from around 4V to 5V. This is the same thing we did in Lab 2. Simulate your circuit, and include a plot of the outputs. Supply the Reset pin of your 555 with a pulsed waveform at 30Hz, and show that the output pulses at f m while the reset pin is low. Electronics Design Laboratory 9
A.5 Transmitter build and test Build your 555 timer circuit on a separate breadboard Use a single resistor for R B For R A you may use a resistor 5kOhms less then calculated, and add a potentiometer in series (this will allow you to tune your transmitter to closely match your f m ) Tune your transmitter to the experimentally determined f m found earlier. It is very important to be exact! Capture a screen shot of your modulator output when the reset pin of your 555 is connected to a 30Hz square wave supplied by a function generator Insert your RF transmitter into your circuit Electronics Design Laboratory 10
A.6 Communication test You should now have two separate circuits A modulator and transmitter made from a 555 timer, a voltage comparator, and an RF transmitter module A receiver and filter made from a bandpass filter, a peakdetector, a voltage comparator, and an RF receiver module Test your two circuits together The reset pin of the modulator 555 timer is your data input. Supply this with a 30Hz pulsating waveform from the signal generator. Make sure that you see a 30Hz square wave on the output of your receiver! You should be able to vary the frequency or duty cycle of your data input, and see the frequency or duty cycle of your data output change Vary the duty cycle of the input waveform between 10% and 100%, and measure the duty cycle of your receivers output. Plot this and explain any issues or differences Electronics Design Laboratory 11