Summary
This system uses STM32F103 as the control core, uses RDA5820 integrated FM transceiver chip to build an analog frequency modulation circuit, and realizes arbitrary setting of the carrier frequency. It uses an adder and demodulation circuit to create a receiver that can mix sound amplification, and uses RSSI channel occupancy detection Algorithm enables the microphone to automatically detect channel occupancy when turned on and avoid interfering signals. The wireless microphone is powered by dual batteries +3V. It can output a carrier frequency between 88MHz and 108MHz, and can be set arbitrarily with a step frequency of 200KHz. The maximum frequency deviation is 75kHz, the audio bandwidth is 40 Hz~15 kHz, and the antenna length is less than 0.5 meters. And when two microphones are used at the same time, the carrier frequency can be automatically selected within 0.5 seconds after turning on to avoid interference signals; the receiving part adopts a self-designed and produced circuit, with a receiving distance of more than 10 meters, a maximum output power of 0.5W, and realization of The acoustic signals of the two microphones are amplified or mixed amplified respectively.
After final cascading and debugging, the system achieved all the requirements of the question. Some indicators such as communication distance, automatic avoidance response time, maximum audio output power, etc. all exceed the question requirements, and the transmitter power achieves low-power output while ensuring communication quality.
1 Plan demonstration and comparison
1.1 Voice signal modulation scheme
Option 1 : Discrete component frequency modulation
Using varactor diodes and transistors to achieve direct frequency modulation is actually creating a voltage-controlled oscillator. The audio signal is loaded to both ends of the varactor diode through the low-frequency path, changing the junction capacitance of the varactor diode, thereby changing the oscillation frequency of the three-terminal oscillator and realizing the frequency modulation function. However, this circuit has a large number of discrete components, circuit calculation and debugging are difficult, and the frequency stability is lower than that of the phase-locked loop circuit.
Option 2 : Phase-locked FM
Frequency setting and stabilization is achieved through the phase-locked loop circuit. After the voice signal is loaded to the output end of the loop filter, the output frequency of the phase-locked loop circuit will change as the voice signal changes, thereby achieving the function of analog frequency modulation. The maximum frequency deviation can be controlled by controlling the amplitude of the voice signal, and the carrier frequency can be controlled by controlling the frequency division value of the phase-locked loop. However, 3 this solution requires a voltage-controlled oscillator that requires a higher frequency, and the performance of the loop filter is greatly affected by the component parameters.
Solution 3 : Integrated analog FM chip FM
Modern analog FM transmitters and radios mostly use analog FM chips to modulate and demodulate voice signals. Most of them integrate phase-locked loops, radio frequency power amplifiers, PGA, ADC, multipliers and other functional modules. Among them, the RDA5820 chip has excellent working performance and can communicate with the microcontroller through the IIC bus. Due to the high integration level and excellent performance of this chip, we choose option 3 based on the above.
1.2 Selection of carrier signal transmission mode
Option 1 : Direct output through antenna
The carrier signal output by the RDA5820 is directly transmitted through the antenna. Since the signal power output by the chip is relatively small, it is transmitted directly through the antenna. The power consumption generated by the system is small and the radiation to the surroundings is small. However, due to the limited output power of the chip, it is not Take this approach.
Option 2 : RF power is amplified and output through the antenna
Through TI's high-precision low-noise operational amplifier OPA695 chip, the carrier signal output by the RDA5820 is power amplified and then transmitted through the antenna. This solution requires step-up conversion and negative-voltage conversion of the power supply voltage. And in order to implement RSSI check, we designed a radio frequency switch to switch the receiving and transmitting antenna.
Since the question requires a large carrier frequency range for the transmitted signal and a long communication distance with the receiver, Option 2 is adopted.
1.3 Audio signal processing
Solution 1 : Use in-phase adder to achieve microphone amplification and mixed sound amplification
The non-inverting adder mixes the audio signals and drives the speakers directly. The system of this solution is simple and stable, but when the non-inverting amplifier mixes the signals, the mixed signals will interfere with each other. And the sound output from the speaker is too small
Solution 2 : Implementation using an inverting amplifier and audio power amplifier
As the system input stage, the inverting adder can mix two audio signals without affecting each other, and can achieve separate amplification of the signals. The TDA2030 power amplifier chip is used as the second-stage amplification output to achieve power amplification of the audio signal, which can drive speakers and mixed sound amplification.
Since the audio output quality of option 2 is good and it can achieve the functions required by the question, we adopt option 2.
1.2 Demonstration of overall system plan
The two microphones are mainly composed of FM transceivers, RF power amplifiers, power supply circuits, and antennas. The entire system is powered by two 1.5V dry batteries. The receiver consists of an antenna reception, FM transceiver, inverting adder, audio power amplifier, and speaker. The microphone part is spectrum analyzed by the microcontroller and adjusted to the appropriate frequency in the shortest time through the quick sorting method. The receiver part can mix audio and manually adjust the volume. The overall system adopts a two-transmit and one-receive structure. The block diagram is shown in Figure 1:
2Theoretical analysis and parameter calculation
2.1 Principle of frequency modulation
Since the frequency of the FM signal changes very slowly and the range of change is small, it can be considered as a quasi-steady-state sinusoidal signal, so it can be generated by a sine wave oscillator. By continuously changing the parameters that affect the oscillation frequency through the modulation signal, new phase balance conditions are constantly established. The oscillator continuously adjusts the oscillation frequency through feedback and continuously follows the changes in the modulation signal, thereby achieving frequency modulation. Among them, the FM differential equation is as follows:
The internal circuit of the integrated chip contains a voltage-controlled oscillator and a frequency synthesizer. The audio signal is processed and loaded into the control end of the voltage-controlled oscillator. Different amplitude voltages correspond to different output frequencies, thereby achieving quasi-steady-state analog frequency modulation. .
2.2 Design and calculation of RF power amplifier
Since the output power of the FM chip is limited, if you want to transmit farther, you must add a first-level power amplifier module. TI's OPA695 ultra-wideband current feedback operational amplifier can be used as the power amplification circuit for the modulated signal of this system. According to the data sheet, the typical value of the output current is 120 mA, which meets the power parameter requirements. As a current feedback amplifier, the voltage gain relationship of OPA695 is calculated as follows:
Combining the formula and the parameter recommendation list provided by TI, here we choose Rf=470Ω and Rg=150Ω to achieve power amplification of the carrier signal.
2.3 Design and calculation of microphone power supply part
In order for the op amp chip used in the microphone to work properly, we need to convert the power supply part into voltage boost and negative voltage. Use the switching power supply to increase the 3V voltage, and then use two TPS5430s from TI to output positive and negative 5V voltages. The measured output ripple is less than 20mV, which can effectively power the op amp chip. The relationship between voltage calculation and power loss calculation is as follows:
3Circuits and Programming
3.1 Circuit design
3.1.1 FM transceiver circuit design based on RDA5820
RDA5820 is a very highly integrated FM transceiver chip. The chip has the following features: FM transmitter and receiver integrated, supports global FM receiving frequency band of 65MHz-115MHz, and supports IIC/SPI interface. As the core chip of this system, RDA5820 is responsible for modulating and demodulating audio signals. The chip communicates with the microcontroller through IIC communication. The RDA5820 schematic diagram and PCB layout are shown in Figures 2-1 and 2-2.
Figure 2-1 RDA5820 schematic diagram Figure 2-2 RDA5820 schematic diagram
In Figure 2-1, the audio socket interface connected to the FMout pin is replaced by a whip antenna with an SMA interface. L1 is set to 100nH to match the antenna to reduce power loss caused by reflection.
3.1.2 Design of audio signal adder
In order to meet the requirements of the question, we use an inverting adder to add the audio signals. The inverting adder can achieve non-interference of the audio signals due to the virtual ground effect. The circuit is shown in Figure 3.
Figure 3 Inverting adder circuit
3.1.3
Audio power amplifier design
The schematic diagram of the audio power amplifier circuit composed of the TDA2030A power amplifier board is shown in Figure 4: the tone part uses an attenuated amplifier tone circuit that controls the high and low frequencies respectively, in which R2, R3, C1, C2, and W2 form the bass control circuit; C3 , C4 and W3 form a treble control circuit. R4 is an isolation resistor, W1 is a volume controller to adjust the volume of the amplifier, and C5 is a DC-blocking capacitor to prevent the TDA2030 DC point of the subsequent stage from affecting the front-stage tone circuit. The amplification factor of the circuit is determined by the ratio of R8 and R9. C6 is used to stabilize the drift of the DC zero potential of the fourth pin of TDA2030A. The function of C7 and R10 is to prevent low-frequency self-excitation of the circuit.
Figure 4 Audio power amplifier circuit
3.1.4 Design of RF power amplifier
In order to meet the long-distance transmission requirements, OPA695 is used to amplify the power of the modulated signal. Among them, R1 and R2 determine the gain coefficient, and R3 and C1 are used to filter the DC component of the input carrier signal. Rout is impedance matched to avoid reflection. The schematic diagram is shown in Figure 4:
Figure 5 RF power amplifier circuit
3.2 Control program design
In order to implement a wireless microphone amplification system, two STM32 system boards are needed to control two microphones and a receiver circuit. It communicates with the RDA5820 FM transceiver chip through the IIC bus, writes instructions into the chip register to change the carrier frequency and transceiver mode, and displays the current setting parameters. The software design part mainly includes the parameter setting of RDA5820 and the implementation of the signal interference avoidance algorithm.
3.2.1 Receiver software design
RDA5820 can receive FM broadcasts in the 65-115MHz frequency band. By setting the register CHIP_FUNC[3:0]=0 through the IIC bus, the current working mode is defined as FM receiving mode. The frequency band used in this design is 88-108MHz, so set BAND[3:2]=00 in the register.
This design uses a total of 8 independent buttons to control the receiving frequency (03H CHAN[15:6]) and volume (05H VOLUME[3:0]) of the two receiving modules, and set the current frequency value (0AH READCHAN[9:0]) is read and displayed on the screen through IIC. The software flow chart is shown in Figure 7:
Figure 6 Basic flow chart of receiver software
3.2.2 Microphone program control design (including transmitting frequency setting and avoiding interference signals)
RDA5820 can perform stereo transmission at 65-115MHz. Setting CHIP_FUNC[3:0]=1 in the 40H register can define the current working mode as FM transmission mode. This design adjusts the frequency through 4 buttons. The minimum adjustable step frequency is 200KHz and the maximum frequency deviation is 75KHz, which meets the requirements of the question. Read the current frequency (03H CHAN[15:6]) through IIC and display it on the screen.
RDA5820 has RSSI power detection function (0BH RSSI[6:0]), which can measure the signal strength of the current channel in receiving mode. Therefore, the frequency bands near the preset value are scanned, and the obtained signal strength values of each frequency band are processed through the software sorting algorithm to obtain the frequency band with the weakest relative signal strength, and then the transmission frequency is set based on this frequency value to avoid interference signals. The software flow chart is shown in Figure 7:
Figure 7 Basic flow chart of microphone software
4Test plan and test results
4.1 Testing and result analysis of microphone output signal frequency range and step interval
Test plan: Increase the frequency of the carrier signal step by step, observe the transmitted signal with a spectrum analyzer, record the center frequency point, and record the lowest and highest carrier frequencies.
Test conditions: The frequency sweep range of the spectrum analyzer is 70~130MHz, and the input attenuation is -20dBm.
Test results: The lowest frequency of the carrier signal is 88.00032MHz and the highest frequency is 108.0014MHz, and can be set arbitrarily in steps of 200KHz.
Table 1 Wireless microphone test data table
|
|
|
---|
Carrier frequency /MHz
| 5m apart
| 10m apart
|
88
| clear sound
| clear sound
|
95
| clear sound
| clear sound
|
98
| clear sound
| clear sound
|
105
| clear sound
| clear sound
|
108
| clear sound
| clear sound
|
4.2 Testing and result analysis of receiver communication distance
Measurement plan: Make the carrier frequency of the receiver and transmitter the same frequency, play a piece of audio near the microphone, make the maximum audio output power of the receiver 0.5W, and record the maximum communication under the 8Ω load that the receiver can play the audio clearly without obvious distortion. distance.
Test conditions: DC regulated power supply provides ±10V power supply to the receiver, the communication distance between the microphone and the receiver is 10 meters, and the test environment is an environment with radio signal interference.
Test Results:
It is greatly affected by the external environment. In an indoor environment, the maximum communication distance of the system is between 10-15 meters. When measured outdoors in an open field, the maximum transmission distance of the system exceeds 10 meters. In addition, radio signals will also affect the transmission distance of the system. At the carrier frequency with radio signals, the signal communication distance does not exceed 20 meters.
4.3 Receiver amplification and mixing function testing and result analysis
Measurement plan: Add two different audio signals near two microphones with different carrier frequencies, turn on the receiver, set the demodulation frequency to the carrier frequency of any microphone, and record the amplification effect of a single microphone. Then set the receiver demodulation frequency to the carrier frequency of each microphone, receive at the same time, and record the effect of mixed sound amplification.
Test conditions: The communication distance between the wireless microphone and the receiver is 10 meters, and the test is conducted under interference from external radio signals.
Test results: The receiver outputs audio signals without distortion, and can achieve separate amplification and mixed amplification of the two microphones. That is, the radio function meets the question requirements.
4.4 Test and result analysis of wireless microphone self-test channel occupancy function
Measurement plan: Select a frequency with channel occupancy, and set the default carrier frequency when the microphone is turned on to this frequency. Power off and then on again, measure the response time to avoid interference signals and change the carrier frequency.
Test conditions: Test under the conditions of external radio signal interference.
Test results: It takes 0.5s for the microphone to respond from being turned on to avoiding interference. The question requirement is 1s, and this device fully meets the question requirements.