qoistoochee128

2021 E Question Digital-Analog Signal Hybrid Transmission Transceiver-Green Wave Electric Dragon Team

 
Overview

Video link

Link: https://pan.baidu.com/s/1NjkJmUVNRqUF982Hib7RoA
Extraction code: 1234

Competition tasks

E is a wireless transceiver for mixed transmission of digital - analog signals: the digital signal consists of a set of four numbers from 0 to 9 ; the analog signal is a voice signal. The transmitting end of the transceiver completes the combined processing of digital signals and analog signals, and then modulates and transmits them on the same channel. The receiving end of the transceiver completes reception demodulation and separates digital signals and analog signals. The digital signals are displayed with a digital tube and the analog signals are observed with an oscilloscope.

 

Topic requirements:

1. Basic requirements

( 1 ) Realize 100Hz~5kHz voice analog signal transmission.

( 2 ) Realize four-digit decimal digital signal transmission and display on the receiving end digital tube, with a response time of less than two seconds.

( 3 ) Realize mixed transmission of digital - analog signals.

( 4 ) The channel bandwidth of the transceiver is not greater than 25kHz , and the carrier frequency range is 20~30MHz . It is required that the transceiver can be selected and set among no less than 3 carrier frequencies, and the specific carrier frequency is determined by yourself.

2. Play part

( 1 ) After the numbers stop sending, the digital display on the receiving end will go out after a delay of 5 seconds.

( 2 ) The lower the power consumption of the transmitter end of the transceiver, the better.

( 3 ) The frequency range of the analog signal is extended to 50Hz~10kHz .

 

Competition question analysis

It seems that the question requirements are very simple, but in fact the difficult points are all in the instructions:

( 1 ) Digital and analog signals must first be processed by the combining circuit. Some students want to transmit separately through analog and digital, which is definitely not possible.

( 2 ) Both the transmitting end and the receiving end of the transceiver are powered by a single battery power supply. Normally, when using a linear regulated power supply, the ripple is relatively small and the effect is ideal. When using a battery, although the ripple is very small, it is generally difficult for the battery to directly obtain all the required voltages. It needs to be converted to other voltages, which may occur during the conversion process. There is a large ripple (which has a great impact on high-frequency circuits), and then additional voltage stabilization is required, and voltage stabilization will cause a large power loss.

( 3 ) It is emphasized that the channel bandwidth is agreed to be the -40dB bandwidth of the modulated signal. If some solutions theoretically have a bandwidth very close to 25KHZ , in fact 40db is difficult to achieve and requires a very high-order filter.

 

modulation scheme

1. Do AM frequency division multiplexing

The analog signal is 50-10kHZ, and the digital signal can be directly superimposed using other frequencies. The output part can be distinguished by using different filters. A very important question here is what frequency to choose for the digital signal. Using 25MHZ as the carrier, the normal AM modulation spectrum is as follows. The spectrum bandwidth has reached 20Khz, and the question requires that the bandwidth does not exceed 25KHZ . Then the theoretical maximum digital signal can only be less than 12.5KHZ .


However, when a digital signal sends a square wave, there will be many harmonics. If all are filtered out, the digital information will be lost and become a standard sine wave. If it is not filtered out, the frequency of the harmonics is a multiple of the fundamental wave and will definitely exceed the question standard. In addition, the difference between 10K and 12K is very small, and the high and low pass filters used to distinguish the latter are not easy to design. So other methods need to be used.

Of course, you can add a filter to AM modulation to form SSB modulation and only retain the single sideband (the upper sideband is retained in the picture)

A narrowband filter (commonly used crystal filter) is generally used here. Since the crystal has a commonly used frequency, 21.4MHZ is selected as the carrier. However, digital harmonics also have a certain impact. The third and higher harmonics must be small to ensure a 25KHZ bandwidth. Of course, the two frequency bands above are so close that it is difficult to distinguish the latter.

Since it is difficult to do this when the frequency of the digital signal is greater than that of voice, we choose a frequency that is smaller than voice, that is, less than 50HZ . However, if it is too small, it will be easy to receive for more than two seconds. The harmonics of too large a number will affect the low-frequency characteristics of the voice. We have chosen 20HZ here .

 

2. Time division multiplexing

After mixing analog and digital in different times, AM modulation is transmitted, as shown in the figure below. However, demodulation is complex and requires judgment between analog and digital and then restoring the analog. For 10KHZ simulation, if the frequency is measured using a simple sine wave, a single-chip microcomputer can implement it, and then directly DDS outputs the corresponding frequency. However, the question says that it is not sure whether the speech signal contains multiple frequencies. If there are multiple frequencies, it needs to be sampled by a high-speed ADC and output by a high-speed DAC . It requires an FPGA. It is very time-consuming to write, so it is not used.

 

3.   Phase modulation

For example , in 16QAM , the transmitter needs to use DDS and multipliers to change the signal phase, which requires many multipliers and complicated circuits. Decoding using coherent demodulation is also complex. It is not convenient for us to implement it in a short time, but if it can be achieved, the effect should be very good.

综上,数字信号频率高过模拟带宽不好控制,由于模拟信号50-10KHZ,我们最后选择了20HZ(每一个电平40HZ)的数字信号,直接AM调制,优点是频谱一定容易满足,而且省去很多滤波器实现简单,缺点有两个:

1)数字收发慢。用BCD编码的话4位十进制编码为16位二进制,还要插入定位帧,发一遍就接近半秒,如果接收机难以一次检测成功则很容易超过两秒。不过我们认为数字信号传输质量应该还是可以保证的,最后事实确实如此,数字收发很准反应也很快。

2)模拟信号低频段50-100HZ很容易受到数字谐波干扰。

20HZ数字信号(假定为占空比为50%的方波)的三次和五次谐波分别为基波的1/31/5,频率为60HZ100HZ,对扩展要求中50-100HZ语音有影响。当然高频题难度大,且这个部分是扩展要求,我们为了保证整体功能实现这部分先舍弃,留作有时间再最后优化。最后低频部分其实也是很多队伍的难点。

这里设想的优化方式(时间关系之后并没有尝试)有两种:1. 数字信号频率改为15HZ左右,三次谐波则为45HZ左右,五次谐波幅度较小,且在输出时RC滤波有一定衰减,基本可忽略。但语音信号高通滤波需要避免三次谐波影响,过渡带很窄,阶数很高。

2. 数字信号改为DAC产生半(或整)个正弦,如下图,或者数字经过ASK调制(可以直接使用DDS一开一停来实现),从根本上减少谐波产生。(方案简单可行,见到很多国一也对数字进行了ASK,但我们时间原因未实现)

 

 

 

 

 

 

方案实现

总体方案设计如下图所示:

1、  硬件实现

1)发射部分

发射部分将数字和模拟信号进行相加后直接乘法输出产生包络,控制幅度使得调制深度50%左右,太小不方便检出包络,太大容易过调制。

加法器电路原理图

对于加法器电路,这里由于乘法器有一定输入幅度限制(一般为±1V),而方波输出为3.3V,所以需要对方波进行缩放,加法器电路先用反向放大器缩小,之后再通过加法器和正弦波叠加。由于调制不能有负,所以需要对方波添加一定直流偏置,也可以用信号发生器发生正弦时候对正弦波加偏置。设计中部分电阻设计为滑动变阻以便调节。

波形输出大致为:

之后经过模拟模拟乘法器AD835后输出波形如下图,外围包络线波形和加法器输出波形类似,这里可以看到如果加法器输出有负的,包络线会越过零刻度线相交,解调容易发生错误。

最后输出由于测试只需要1m功率足够且发射机整体功率越小越好,所以不用加功放。由于时间和条件有限,本设计功率我们并没有重点考虑,使用了开关电源加线性电源稳压使得功率较大,在3W左右。如果省去开关电源稳压,功耗将大幅下降。

同时要注意以下几点:

1DDS幅度需要比加法器输出大 否则也无法正常调制,幅度太小可以加AGC稳定放大。这里我们为1V左右。部分乘法器会有本振±1v的输入限制。

2)数字信号后的RC电路直接串联即可,具体调节只需要把高次谐波减弱,不影响语音即可无太大要求,否则会在解调后模拟输出有固定频率毛刺(类似冲激函数,只在数字发送上升下降沿产生频率和带通滤波有关)

RC为一阶直接串联即可  悬浮的即RC  下方为加法器

 

2)接收部分

1)根据AM调制解调原理,接收部分主要实现包络检波以及语音和数字的区分,包络检波后的波形即包络线,应该和加法器后波形基本一致。之后根据语音和数字频率不同,经过带通和低通区分模拟和数字信号。

2)功放主要是控制幅度问题。天线接收信号太小,需要放大。此外理论上应该通过一级带通放大器(20-30MHZ)滤去其他频段干扰,我们的天线构成了LC选频网络。但是实验发现主要50HZ工频干扰相比发送的信号幅度过大,功放带宽0.1MHZ-3000MHZ能够把50HZ基本滤去,我们这里没有合适增益的功放,就用了VCA替代(不是低噪声,但是实测影响不大,主要近距离功率大)

3)带通滤波器需要用高通加低通来实现,否则很麻烦。尽量不用有源滤波器,会引入噪声需要另外滤除。但是有可能衰减太大,可以高通使用有源滤波器控制幅度,后级无源低通会很大程度上滤除噪声。

4)包络检波直接用肖特基二极管做无源的就可以,淘宝有源的也行不过有点贵

5)模拟信号发送频率变化一定程度上会影响数字信号幅度,在程序里写了自动判断阈值

3)天线

按照频率和天线长度的关系,25MHZ天线需要3米才能达到发射和接收转换效率最高。但我们只需要一米的传输距离,没有必要要求那么高。天线不够长影响的主要时对不同频段的增益,理论上只需要将天线后加25MHZ为中心的带宽滤波器选择出我们发射的信号,之后再放大即可,对天线本身要求不高。

我们这里使用漆包线绕棍(这里木棍,铁棍没试过,可自行测试)缠制,串联可调电容(我们选用PF级的)组成LC选频网络(相当于使用了带通滤波器)之后接进低噪声放大器即可。具体选频性能需要连接网络分析仪用反射来观察。题目并不要求20-30MHZ全部频段,任选三个频点即可。所以天线窄带到25MHZ左右,选频在此附近即可。正常来说10-20DB左右。 这样做很大的好处就是简单,但是由于天线使用胶带固定,偶尔会有松动,导致频率特性发送一定变化。

此外网上有人用环形天线或者定向天线,也可以自行尝试。

        

 

软件实现

程序流程图

1发射机程序:主要根据AD9959DDS控制程序修改,进行了页面的优化,添加了数字键入和BCD编码的显示,最后数字信号用IO口高低电平输出,为了保证数字信号发送频率稳定不受其他程序干扰,将数字信号发送功能放入高优先级的定时器中断中,开关中断即可开启和关闭数字发送。

                                 使用DDS控制板 STM32F1  具体为淘宝康威家的带OLED的  接AD9959作为DDS 输出为DDS的CH1通道(没有控制板也可以按照管脚定义用F103的板子接DDS)
                                 数字信号发射引脚为DATA_OUT  PC8 使用I/O高低电平输出  可以改为DAC输出具体参照正点原子DAC实验
                功能:开机后默认发生0101循环  之后按中间键进入编辑数码页面 自动关闭发送 选好数字后再按中间按键发送之前编辑的数码(数码前面会加上00001111的定位码 方便接收端检测)。 发送时蓝灯会亮且可继续其他操作(发送使用定时器中断) 按中间键再次循环到编辑数码时向下按则可以关闭发生。发送频率为20HZ 具体在代码开始都有宏定义Code_Freq可以更改

软件页面CHO后数字为载波频率,DATAOUT为输出数字编码,下方为运行状态和转为二进制的编码显示。

2接收机程序:整体设计思路非常简单就是ADC采样抽判检测高低电平,之后进行解码显示。数码显示使用带TM1367的数码管模块,通过IIC通信,管脚只需要四个,自动刷新,控制简单。

但是实际上会有两个问题:首先,随着模拟频率变化,数字信号幅度也会有一点变化,如果检测阈值不变就容易让抽判结果错误。所以这里加入了一个阈值检测和更新的程序,即快速ADC检测并计算出最大和最小的数据,剔除偏差较大的,分别求平均值来获得新的阈值。其次,ADC采样中可能遇到波形的毛刺或者不同步,使得结果错误。添加每一位解码结果小于10的判断,另外采样函数放入高优先级的定时器中断中,保证间隔稳定。

使用STM32F1迷你版和精英版通用有LCD显示功能,不用LCD情况下可用其他F103板子替代,数码管使用带TM1637的IIC显示模块,操作方便,引脚为VCC-PC4 CLK-PA4 DIO-PC5 可在TM1637.h中修改。如果修改DIO引脚需要同时修改其下方DIO方向语句,ADC检测引脚为PA1,GET_Range()为自动检测阈值开机只启动一次,需要DDS先启动(默认发射0101循环以便检测阈值)

 

 

实物展示

发射机

 

接收机

前级分别是VCA821和包络检波(淘宝)。

装配和采购

为了实现方便这里使用了大量淘宝成品模块,下面有具体模块图片,没必要型号和店家都一样,如DDS AGC VCA等只要功能正常满足基本参数要求即可。

发射机

其中DDS为AD9959(也可更换其他),控制板与其配套,AGC为AD603,乘法器为AD835,淘宝购置即可,DC-DC转正负双电源为TPS5430+LM317/337模块(不能只用TP5430的,纹波大)

具体如下

接收机

包络检波就淘宝二十多的就可以,很多这里的VCA821如图

比赛心得

1、  电赛前期准备非常重要

高频电路中大部分可以依靠已有的模块搭建,而主要需要设计的是一些滤波器,我们在前期准备中学习和尝试了filter solutionfilter pro的滤波器设计,并绘制打印了一部分滤波器的PCB,在比赛中使用PCB直接焊接就显得非常方便,此外也获得如部分情况使用椭圆滤波器效果阻带下降效果更好,带通滤波器使用高通加低通级联频带效果好,有源滤波器容易引入噪声,无源滤波器衰减很大等经验,让我们在比赛中设计滤波器就显得得心应手。

2、  高频题方案选择很重要

The high-frequency questions have very high theoretical requirements and involve a lot of relevant knowledge from professional courses such as signals and systems, high-frequency electronic circuits, and communication principles. Most of them rely on circuits to achieve, and the final effect may be slightly different from the theory. Different solutions vary greatly in difficulty and effect. If you don’t understand the question at the beginning and think clearly about the implementation process, and the relevant modules are difficult to find on campus, it is basically impossible to change the solution midway.

3.   You need to maintain a good attitude and actively communicate with instructors and teammates.

The electronic competition time is very tight, and the theoretical knowledge is often not enough during the high-frequency debugging process, and some unexpected problems will always be encountered. A person's thinking is inevitably limited. If it is difficult to solve the problem for a long time, we need to actively communicate with teachers and classmates, keep trying, discover patterns, find problems, and gradually solve them.

 

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 05:11:52
  • Android smartphones will soon have facial recognition
  • Support special reports in the MCU field
  • 【Help】
  • What to do when a rising edge trigger is required
  • [TI's First Low Power Design Competition] Play with MSP430FRAM MCU unboxing!
  • Low frequency frequency meter

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号