MartinFowler

2021 Question E Digital-Analog Signal Mixed Transmission Transceiver

 
Overview
Video link: [https://www.bilibili.com/video/BV1ta411k7dG/](https://www.bilibili.com/video/BV1ta411k7dG/) # Foreword Affected by the epidemic, the e-sports competition will be postponed to November . The competition that I was supposed to participate in during the summer vacation of my sophomore year became a matter of my junior year, and winning the national award to secure my postgraduate studies was no longer possible. However, in line with the idea of ​​​​starting and ending, it can be regarded as an explanation for my two years of training, and I am still serious. After participating in the competition, after four days and three nights of twists and turns, I finally got the second place in the country. # Team introduction The team members are from the YF105 laboratory of Chongqing University of Posts and Telecommunications. YF105 laboratory is an undergraduate laboratory of Chongqing University of Posts and Telecommunications, with complete equipment and financial support. The three members are from the School of Communication and Information Engineering. Communication Engineering is responsible for writing microcontroller and FPGA codes. Electronic Information Engineering is responsible for the design and production of circuits. Hardware Electronic Information Engineering (girls) is responsible for report writing, theoretical analysis, and auxiliary hardware design. # The project analysis first posts the question requirements ![image-20211215125616720.png] ![image-20211215125642231.png] ![image-20211215125659340.png] ! [image-20211215125708489.png]     The highlighted text in the picture is what we did during the competition. The key points highlighted when analyzing the questions are because the main training questions in the first and second years of the freshman year are instrument questions, and the instrument questions are also selected when preparing for the national competition. Communication questions are only trained during the sprint training during the summer vacation of the sophomore year. We passed two questions, one was a dual-channel voice simultaneous interpretation, and the other was a spectrum analyzer. The purpose was to strengthen the ability of hardware design. Unexpectedly, after getting the questions, we only had question A to choose from, but after our analysis, we found the code of question A. The quantity was too large, and we had not used Ti microcontrollers much and did not know what potential problems there would be, so after half a day of discussion, we finally took a gamble and chose question E. Since this is the third high-frequency question we have done, we have little experience. In addition, we have just started to learn communication principles. We have just finished learning the analog modulation part and have not learned digital modulation yet, so for those very high-end modulation methods No, other high-end methods will not be analyzed here. We spent half a day looking through books on communication principles and felt that the 2ASK modulation method was better and not difficult to implement. After rigorous theoretical analysis, we found that it can meet the bandwidth requirements. So decided to use this method. But the problem came again. We used FM modulation during the summer vacation. This time we used AM modulation. The FM demodulation during the summer vacation confused us. It was too difficult to demodulate, and the AM demodulation was incoherent. The circuit is so simple that one can't help but doubt its authenticity. The second is the antenna. I can’t make it myself. I can only use a ready-made rod antenna. However, impedance matching is a big problem. The Smith chart theory is really different from reality. Whether it can be matched depends entirely on luck. That’s a problem during summer vacation. Question: It took me two days to match the antenna. So there are a lot of questions. #Theoretical Analysis and Calculation## Overall Description This work designs and implements a digital-analog signal hybrid transmission transceiver. The work is divided into two parts: the transmitting end and the receiving end. The transmitting end adopts the idea of ​​frequency division multiplexing, and inputs numbers through the keyboard. After digital encoding, it is converted into a 2ASK (binary amplitude shift keying) signal with a center frequency of 11.5KHz. This signal Added with analog signals within 50Hz~10KHz, digital-analog combining is realized; the combined signal is amplified and sent after AM modulation; the receiving end first uses band-pass filtering and low-noise amplifier to process the signal, and uses envelope detection to The processed signal is subjected to AM demodulation, and a digital filter is used to separate the 2ASK signal containing the typed numbers from the analog signal. The analog signal is output after shaping and processing. The 2ASK signal is converted into a square wave and entered into the microcontroller for decoding, and the decoded numbers are sent to the receiving end. show. Actual measurements show that the work achieves mixed transmission of 50Hz~10KHz analog and digital signals, the channel bandwidth is not greater than 25KHz, the transmission distance is greater than 1 meter, the analog signal has no obvious distortion, and the digital signal is displayed correctly. ## Solution Demonstration Analysis ### The 20MHz~30MHz carrier solution demonstration analysis originally planned to use AD9959, which is a DDS chip, and has ready-made modules and ready-made codes. The highest frequency can reach 300MHz, so it is completely satisfactory. , and very convenient, but a fatal problem is that its power consumption is too large, and the working current can reach 300mA. When we use the signal source as the carrier, the overall working current is only 120mA, which is obviously not acceptable. of. The second is to use a phase-locked loop. This is difficult to do. I have never done it before, so just pass it. Then the simplest method was adopted, using a crystal oscillator plus filtering, and switching crystal oscillators of different frequencies to achieve carrier conversion. However, their frequencies were quite different, and they had requirements for antennas, so they had to give or take, and finally achieved the effect. It is very good. The passive filter should be made steeper and the spurious frequencies should be filtered out, so that the transmitted spectrum information can be clean. After the game, we found that the AD9854 DDS is very good, with an operating current of only 20mA, which is undoubtedly very convenient. We bought it and the effect is very good, but we need to pay attention to the impedance matching between it and the multiplier, otherwise the signal will be reflected back and produce intermodulation distortion, and the spectrum will be impossible to see. ### Signal synthesis cannot be developed separately. The question requires that one channel be transmitted together, so there are frequency division multiplexing, time division multiplexing, and of course code division multiplexing. This is too complicated and will not be considered. Time division multiplexing is a scheme that interweaves different signals in different time periods and transmits them along the same channel. At the receiving end, a certain method is used to extract the signals in each time period and restore them to the original signal. communication technology. This solution has stronger anti-interference ability, but requires an accurate clock signal to determine the type of transmitted signal, and the implementation is more complicated. Frequency division multiplexing, the transmitter transmits the voice signal in one frequency band, and the digital signal is encoded and converted into a 2ASK signal for transmission in another frequency band. The two channels of voice signals with different frequency bands are synthesized into one signal through an adder, and the receiver then combines the two channels. The signals are restored separately. The advantages of this solution are high channel utilization and relatively simple implementation. Two signals can be transmitted simultaneously. The disadvantage is that there is a channel bandwidth limit in the question. The distance between the two frequency bands is not far enough. The receiving end needs a filter to separate the two signals. Very high roll-off coefficient, but we solved this problem with digital filtering. ### The modulation method adopts the AM modulation method. AM changes the amplitude of the carrier signal waveform so that the amplitude of the AM modulation waveform changes with the change of the synthetic signal waveform. AM modulation can be achieved by passing the synthetic signal and the carrier signal through a multiplier. The advantage of this solution is that it has fewer circuits and is simple to implement. The disadvantage is that the anti-noise performance is weak and the long-distance transmission loss is large. However, we only transmit a distance of 1 meter, so its shortcomings are tolerable. The FM modulation method is used to carry the synthesized signal at the frequency of the carrier. This can be achieved by feeding the signal back to the input of a voltage-controlled oscillator. The advantage of this solution is that it has stronger anti-noise capability, but the circuit is relatively complex, especially at the receiving end. demodulation. ### Overall plan The system is divided into two parts: the sending end and the receiving end. Type a set of 4 numbers on the numeric keyboard at the sending end. The STM32 stores the numbers and displays them on the digital tube. The numbers are encoded and converted into a 2ASK signal. This signal is combined with the voice signal generated by the function generator. The combined signal is modulated by AM. Send, AM modulation carrier frequency is optional; after the receiving end receives the signal, it goes through a low-noise amplifier to amplify the received weak signal, and band-pass filtering reduces the noise. After the signal undergoes envelope detection, a digital-analog mixed signal is obtained, and the signal is filtered by FPGA The voice signal obtained is directly displayed on the oscilloscope. The filtered digital signal is converted into binary symbols and passed to the microcontroller. After processing by the microcontroller, the numbers are displayed on the digital tube. ![image-20211219113505406.png] ## **Theoretical Analysis and Calculation** ### 1. Digital-analog signal combined analysis (1) Digital encoding and decoding In order to synchronize the data sent and received by the receiving end and the transmitting end, we It specifies the communication protocol between the sender and the receiver, as shown in Figure 2. 30 symbols are sent at a time, the symbol rate is 40Hz, the maximum data value is 9999, the corresponding binary code is 10011100001111, and the length is 14bit. We are in the data Add 1 bit of data at the beginning. When 1 is received, the data begins to be transmitted. The microcontroller receives the data and adds 15 bits of 0 at the end of the data. ![image-20211219113712541.png] (2) The combined speech signal of the two-channel signal is analyzed using the sinusoidal signal as an example, and the speech signal generated by the signal generator is recorded![image-20211219114051837.png] Formula (1): ![image -20211219114103241.png] Among them, ![image-20211219114217428.png] is the voice signal amplitude, ![image-20211219114229494.png] is the voice signal frequency, ranging from 50Hz to 10KHz. The digital signal is encoded and converted into a 2ASK signal. In order to separate it from the frequency band of the voice signal, the carrier frequency of 2ASK is selected as 11.5KHz, that is, ƒc0 is 11.5KHz, 2ASK signal! [image-20211219114310358.png] as shown in equation (2): ! [image-20211219114319171.png] Among them, ![image-20211219114356777.png] is the input code element, the value is 0 or 1, ![image-20211219114406741.png] is the binary code element period, ![image-20211219114414503.png ] is the carrier signal amplitude. The 2ASK signal bandwidth is twice the baseband bandwidth, so the baseband bandwidth cannot be too wide. From the analysis in the previous section, we can see that within 2S, we need to transmit 30 symbols, so the symbol transmission rate! [image-20211219114506592.png] , We choose![image-20211219114534356.png] =40bit/s to send symbols. At this time, the bandwidth of the 2ASK signal is![image-20211219114616539.png] . The two signals are added through the adder to obtain the combined signal as shown in Equation ![image-20211219114643171.png] (3): ![image-20211219114659266.png]
## 2. Channel bandwidth design analysis signal synthesis schematic diagram is shown in Figure 3 As shown in the figure, we analyze the bandwidth of the synthetic signal. The original carrier signal is 0~10KHz and the bandwidth is about 20KHz. The carrier frequency of the 2ASK signal is 11.5KHz and the bandwidth is 80Hz. (Only the main lobe frequency and side lobes are drawn in the figure. The signal amplitude is very small and can be ignored). The signal bandwidth after the two signals are synthesized is about 23KHz, which is smaller than the 25KHz channel bandwidth in the question, which meets the requirements of the question. ![image-20211219114818569.png] ## 3. AM modulation analysis The synthetic signal is m(t) in equation (3), and 20MHz~30MHz is used as the carrier to perform AM modulation on the signal. The modulated signal is as shown in equation (4) Display: ![image-20211219114943042.png] where, ![image-20211219115024348.png] is the carrier frequency, and A is the DC bias added to the signal![image-20211219115040249.png] . ![image-20211219115055836.png] ## 4. Envelope detection analysis The envelope detection circuit is shown in Figure 5. The AM signal is demodulated through the conduction and cutoff of the diode and the charge and discharge of the capacitor. When RC satisfies Equation (5) When , the output signal ripple will not be obvious, and the output signal is approximately proportional to the original baseband signal. ![image-20211219115138353.png] Among them, ![image-20211219115200072.png] represents the carrier frequency, ![image-20211219115207085.png] represents the bandwidth of the baseband signal. ![image-20211219115215197.png] # Hardware circuit analysis Let me explain first, our entire work uses existing modules, such as DDS, FPGA, adders, multipliers, amplifiers, followers, etc. I believe it is really serious Friends who are preparing for e-sports are very familiar with these things, so there is nothing much to talk about. Let’s talk about the models of each chip in detail. The DDS that generates the ASK signal uses AD9833, which we have used when participating in school competitions, and the effect is very good. Then there is the adder. The adder uses NE5532, the follower uses OPA1611, and the transmitter amplifier uses AD847, the multiplier uses the classic AD835. There are modules available for purchase. Of course, it is not complicated to draw the circuit by yourself. It may be better to draw it yourself than to buy one! The FPGA is from Xilinx. The picture below is an envelope detector. These parameters are all usable. In fact, the effect is not bad. However, during the competition, we found a ready-made envelope detector. That one has better effect and is more recommended, but it is a bit expensive. . It's called the AD8361 module, but you have to take a look at its circuit after buying it. Its output terminal is connected to a low-pass filter, and the output has a DC component. If you want to change it, you can give it a try. ![image-20211219120019481.png] The most important thing is the design of various filters. The filters are designed using a software called filtersolution. This software is very easy to use and can design passive and active filters. The various filters we use are It was designed with it. In the question, a passive bandpass filter was used, and the elliptic function filter was used, and the effect was excellent! If you have never used this software before, you will get started quickly. ![image-20211219120857013.png] For antenna matching, a vector network analyzer is necessary. If it is strong enough, it can be directly matched based on the two components on the radio frequency circuit. However, according to my limited experience, it is not possible, so I The method used is to sample the filter design software and design a 3rd order bandpass filter. The effect is very good. Of course, it depends on the accuracy of your source device. Although it is a little worse, it can be used and saves time! Tried and tested, this method came to mind during our review. First, a topology diagram of the physical hardware connection is given: ![Drawing 1.jpg] Transmitter part: The hardware connection is as shown in the figure. DC bias is necessary, which can be obtained according to the AM modulation formula. For digital signals, the microcontroller controls the AD9833DDS module to generate the ASK signal. Specifically, it gives a fixed sine wave signal, and then controls the opening and closing of the channel selector to generate the ASK signal. What needs to be noted here is that the signal after passing through the channel selector There is a DC signal superimposed. This signal is not acceptable. The DC signal must be removed to make the ASK signal symmetrical, so a first-order RC high-pass filter needs to be connected to the output of the channel selection switch module. It is better to use AD9854 to generate the local oscillator signal because it has low power consumption, good effect and many adjustable frequencies. It should be noted here that the local oscillator signal generated by DDS has harmonics, so a band-pass filter needs to be added. multiplier, otherwise there will be a lot of harmonic components when viewed on the spectrum analyzer. Then the input port of the multiplier and the impedance of the filter must match, otherwise the signal will be reflected and harmonics will be generated! Just find a broadband amplifier for the amplifier connected to the antenna. There is no need to use a low-noise amplifier, and the low-noise amplifier is not used here. Receiver part: The first thing is the matching of the antenna. If the antenna does not match, the signal may be received, but the effect will be very poor! So impedance matching still needs to be done. Next is the low-noise amplifier. It is strongly recommended to use a low-noise amplifier here, because low noise can improve the signal-to-noise ratio! Later, I will borrow an envelope detector, active one is recommended, the effect is better than the diode one. Then connect a low-pass filter, and the signal that passes through this filter can basically be used. In order to match the impedance of the subsequent stage, add a follower buffer. At this time, there should be a DC component, so the output port of the follower also needs to add a DC blocking filter circuit. After the signal is processed, it enters an ADC, and the ADC signal is sent to the FPGA. There is a 11.5kHZ low-pass filter in the FPGA to filter out the analog signal, and then the DAC is output and connected to the filter for display. There is also a circuit in the FPGA that processes digital signals, which restores the digital signals to square waves, which are then connected to the microcontroller for processing and displayed. ~~~~ ### Issues that need attention: Whether the waveform of the circuit is correct cannot be judged just by the waveform shape of the oscilloscope. This is not feasible in communication questions. Every parameter of the waveform must be analyzed, especially the DC component, which cannot be introduced here. DC component, so off-the-shelf modules may not be usable, and some DC isolation needs to be added in certain places. The specific situation will be analyzed in detail. If your spectrum has a lot of harmonic components, it’s important to consider whether there is an impedance matching problem! # Program flow chart: On the transmitter side, we use 2ASK modulation to modulate the numbers, and we need to encode the ratio data. The encoding idea is shown in Figure 2. The decoding process is as follows: In the case of no data transmission, the default bit sent by the transmitter is 0. When the first high-level data is received, it means that the encoded data transmission begins. After that, 14 level data will be collected and recorded, converted into decimal data and displayed. After sending the first 15 bits of data, 15 bits of 0 level will be sent to ensure the stability of data transmission. ![image-20211219121834243.png] ![image-20211219121857909.png] ![image-20211219121907310.png] ## Transceiver bandwidth The following figure shows the spectrum of using a 25MHz sine wave as the carrier and simultaneously transmitting 10KHz analog sine signals and digital signals. As can be seen from the figure below, the signal bandwidth is less than 24KHz, which meets the requirements of the question. ![image-20211219122023695.png] # Actual picture![image.png] Transceiver set picture![image.png] Transmitter ![image.png] Receiver![image.png] Channel spectrum![image.png] Use the antenna matched by the above method![image.png] ![image.png] Filter![image.png] Crystal oscillator carrier source# To summarize , in fact, the scheme of this set of works is not difficult, and the circuit is also very simple from the physical perspective , the difficulty lies in the design of the filter and the point of adjusting each signal. In other words, you must be very clear about the theory. You cannot adjust it for the sake of purpose. When you find that you have no way to go, you can look back at the theory, and you may find your own mistakes. . #You can see these schematics by clicking on them. I don’t know why.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-15 22:03:15

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号