[Electric Competition Training] Infrared Optical Communication Device 2013 Electric Competition Real Questions

Infrared optical communication device

1. Topic requirements

Design and make a mixed signal transmission communication device based on infrared light.
insert image description here

1. Basic requirements
(1) Infrared optical communication device uses infrared light-emitting tube and infrared light receiving tube as transceiver devices to transmit voice signals in a directional manner, and the transmission distance is 2m.
(2) The transmitted voice signal can be input by a microphone or a Φ3.5mm audio jack line, or by a low-frequency signal source; the frequency range is 300~3400Hz.
(3) The received sound should have no obvious distortion. When the input voice signal at the transmitting end is changed to 800Hz single-tone signal, the effective value of the output voltage of the receiving device is not less than 0.4V on the 8Ω resistive load. Without changing the state of the circuit, reduce the amplitude of the input signal at the transmitter to 0V, and use a low-frequency millivolt meter (the low-frequency millivolt meter is an effective value display, and the low-end of the frequency response range is not greater than 10Hz, and the high-end is not less than 1MHz) to measure the receiving device at this time Output noise voltage, the reading is not greater than 0.1V. If the receiving device has a squelch function, it must be turned off for the above test.
Note: If you do not have a low-frequency millivoltmeter, you can also use an oscilloscope to measure the noise voltage at the output. (4) When the receiving device cannot receive the signal emitted by the transmitter, it should be indicated with a light emitting tube.

2. Play part
(1) Add a digital channel to transmit the ambient temperature of the transmitter in real time and display it on the receiver. The digital signal transmission delay does not exceed 10s. The temperature measurement error does not exceed 2°C. Voice signals and digital signals can be transmitted simultaneously.
(2) Design and manufacture an infrared optical communication relay forwarding node to change the communication direction by 90° and extend the communication distance by 2 m, as shown in Figure 2
. The voice communication quality requirements are the same as the basic requirements (3). The relay forwarding node is powered by a 5V DC single power supply, and the circuit is shown in Figure 3. The milliammeter connected in series is used to measure the DC current of its power supply.
(3) Under the condition of meeting the requirements of part (2), the power supply current of relay forwarding nodes should be reduced as much as possible.
(4) Others.

3. Explanation
(1) The communication channel of this device must use infrared optical channel, and other communication devices are not allowed. The transmitting end and forwarding node must use a discrete infrared light-emitting tube as the transmitting device, and the light-emitting tube must be exposed during installation for inspection. Infrared light emitting chips or modules with ready-made communication protocols inside shall not be used.
(2) In addition to the single 5V power supply connected to the relay forwarding node, other power supply devices (such as batteries, supercapacitors, etc.) are not allowed.
(3) When testing, bring your own MP3 or tape recorder and audio cable.

2. Scheme design

The whole device is divided into sending part and receiving part. The sending part selects the minimum system board of STM32F103C8T6 single-chip microcomputer and temperature sensor ds18b20 to read the temperature. Based on UART protocol, AD9833 and CD4051 analog switches are used to generate corresponding 2ASK modulation signals. The temperature signal and the sound signal are sent out through the infrared emission tube respectively, and after being received by the receiving device, the audio signal and the digital signal are respectively output through the separation and processing of the signal, the audio signal is sent out through the speaker, and the STM32F103RCT6 microcontroller receives the processed signal and decodes it , to display the temperature on the display.

insert image description here

Analog part


insert image description here

digital part

The basic idea is as follows:

  • The transmitting end
System Block Diagram Code Flowchart Physical map
The transmitting end insert image description here digital part picture

For temperature information acquisition, you can choose DS18B20, DHT11 and other modules to directly obtain temperature data through the serial port, or you can use Pt100 and other thermoelectric sensors to build a temperature measurement circuit and obtain temperature information through ADC sampling. In this exercise, the DS18B20 sensor is selected for convenience.

DS18B20 sensor use reference materials "" [commonly used sensors] DS18B20 temperature sensor principle detailed explanation and routine code

There are several schemes for signal modulation, including ASK, FSK, etc. For a detailed introduction, please refer to the article "Modulation Methods of Wireless Signals OOK, ASK, FSK, GFSK".
ASK is an abbreviation for amplitude shift keying modulation, such as binary, which represents binary symbols 0 and 1 with different amplitudes (2ASK).
FSK is a digital modulation technique for data transmission by changing the carrier frequency according to a digital modulation signal. For example, in BFSK, carrier signals of different frequencies are transmitted between binary 1 and binary 0.

Directly adopt serial port communication to send data, easy to debug. In order to realize the transmission of the digital signal, the digital signal is first converted into an analog quantity, because ASK is relatively easier to handle, so the 2ASK modulation method is selected. This function can be realized by a combination of a signal source and a single 8-channel digital control analog electronic switch CD4051, and the switch is controlled by a serial port signal.

Digital Part Transmitter Circuit Diagram

Use parameters:
DDS output frequency: 38.4kHz;
DDS output waveform: sine wave;
serial port baud rate: 1200;

CD4051 Reference "" Single 8-channel digital control analog electronic switch CD4051

  • Receiving end
System Block Diagram Code Flowchart Physical map
insert image description here insert image description here insert image description here

3. Actual test

Basically realize the transmission of the analog part and the digital part, and the lost information of the digital part has not been repaired after the transfer

Guess you like

Origin blog.csdn.net/Fmix_cjlu/article/details/124889244