There is a great demand for short-range radio remote control, but the design and debugging of radio frequency circuits are relatively complex, and the requirements for personnel and equipment are high, thus limiting its scope of use.
Bluetooth technology provides low-cost, short-range wireless communication. It supports point-to-point and point-to-multipoint bidirectional digital transmission. It works in the ISM band of 2.402-2.480GHz. The data rate is 1Mb/s, the error correction code uses a 1/3 repetition code, a 2/3 Hamming code, 79 frequency hopping points, and a frequency hopping rate of 1600 times/second. The transmission distance of Class 2 modules is about 10m, and that of Class 1 modules can reach 100m.
The Bluetooth module is used in the radio remote control system, and the work of the wireless radio frequency part is completed by the Bluetooth module, making the remote control system design simple and convenient.
Wireless remote control transmitter
The block diagram of the transmitter in the wireless remote control system is shown in Figure 1.
Figure 1 Transmitter block diagram
It has three analog (joystick) inputs and six switch (button) inputs. The microcontroller uses TI's MSP430F2274 single-chip microcomputer, which has the main advantage of low power consumption. The Bluetooth module uses Stollmann's BlueRS+ Class1 module.
Transmit command coding: There are 64 groups of codes for the combination of all states of the six switch quantities. Since the number of groups of effective coding is much smaller than the number of combined codes of all states, and the effective combination coding of the switch state is represented by a length of 2 bytes (16 bits), the Hamming distance between code groups is increased, and a group code with error correction function is used as the transmission coding of the switch state.
The transmitter commands the code to send a frame every 20ms. The format of each frame of data is shown in Figure 2.
Figure 2 Transmitter command frame
One frame of data is 18 bytes. The frame header field occupies 4 bytes, of which the 4th byte is the frame number, with 256 as the modulus; the three fields of analog 1, analog 2 and analog 3 each occupy 2 bytes, which are the digital encodings of the position information of the 1st, 2nd and 3rd joysticks respectively; the switch 1 field occupies 2 bytes, which is the encoding indicating the status of the six switches; the switch 2 and switch 3 fields are the repetitions of the switch 1 field, respectively, in order to increase the anti-interference capability. When the receiver decodes the information, as long as the error code of one of the three groups of codes received, switch 1, switch 2 and switch 3, does not exceed the error-correctable range, the corresponding action can be correctly executed. There is no need to wait for the next frame of data to be received, which can reduce the delay time.
The connection between the Bluetooth module and the microcontroller is shown in Figure 3. The microcontroller transmits the frame information representing the command code to the connected Bluetooth module, which sends it to another Bluetooth module connected to the receiver via a wireless channel, which transmits the data to the microcontroller of the receiver.
Figure 3 Connection between Bluetooth module and microcontroller
Transmitter Microcontroller Program
The transmitter program flowchart is shown in Figure 4. The time required for the microcontroller to execute instructions such as reading switch status, switch code, reading joystick, and framing is very short. Most of the time is waiting for the 20ms timer. When the 20ms timer is interrupted, the timing flag is set to be valid. When the main program sees that the timing flag is valid, it moves the prepared framing data to the transmission buffer and starts the serial port to send data. The serial port transmission uses the interrupt method. [page]
(a) Interrupt program flowchart
(b) Main program flowchart
Figure 4 Remote control transmitter program block diagram
The transmitter is designed to send a frame of remote control instructions every 20ms in order to cooperate with a model servo in the remote control object.
The microcontroller and the Bluetooth module use serial communication, and the baud rate is selected as 9600b/s. A frame of data is 18 bytes long, and the transmission time is approximately:
18 bytes × 10 bits × (1/9600) seconds ≈ 18.75ms
The channel coding of the information to be transmitted (remote control command coding), its error correction, frequency hopping timing control and other tasks are completed by the Bluetooth module under its embedded Bluetooth protocol operation.
Receiver
The block diagram of the remote control receiver is shown in Figure 5. The Bluetooth module is connected to the microcontroller. The data containing the remote control command coding information sent by the remote control transmitter received by the Bluetooth module is transmitted to the microcontroller. The microcontroller decodes and transforms the command coding, isolates and amplifies it through the corresponding drive circuit, and then controls the corresponding controlled object action.
Figure 5 Receiver composition
The information received by the microcontroller of the remote control receiver should theoretically be the same transmitter command coded data as shown in Figure 2. However, since the data is transmitted via radio frequency wireless transmission during the transmission process, it is more likely to cause errors due to interference and other reasons, making the received information inconsistent with the sender's information, which requires error correction processing of the received coded information again. For switch quantity information, the method of increasing the Hamming distance between code groups is adopted to increase the error correction capability. For analog quantities such as the joystick position, the method of continuous sliding filtering is adopted to reduce the impact of errors.
Conclusion
The actual measurement shows that when the distance between the transmitter and the receiver is 70m and there is no obstruction, the receiver does not refuse to operate or malfunction. It does not work reliably at a distance of 100m. The delay from the transmitter pressing the switch to the corresponding port of the receiver responding is about 50-70ms.
Since it is a short-distance remote control, the operator can visually observe the response status of the controlled object. For simplicity, only the forward channel is used to transmit remote control commands. The reverse channel is not used.
Previous article:Wireless intelligent lighting system based on ZigBee technology
Next article:Design of Universal Operation Panel Using CY8C21534
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Techniques for PCB board array vias
- EEWORLD University ---- Razavi Analog Integrated Circuit Tutorial (English)
- How to interconnect DSP5509A and ARM
- 【Industrial Production Process PDA】Material Unboxing Post- DISCOVERY KIT WITH STM32F7508-DK
- Will 3D Touch be popular in the future?
- Car maintenance oscilloscope detection Volvo S80 fan does not rotate
- 2021 Electronics Contest E Question - Analog digital signal hybrid transmission transceiver, how to do it from scratch, is there any guiding post
- 【GD32E503 Review】One-month test summary
- 【Goodbye 2021, Hello 2022】I have become a father
- Big Baby Sleeping Assistant-Unfinished