Abstract: There are many ways to achieve wireless data communication. The currently popular ones are Bluetooth technology and infrared communication technology. IrDA infrared communication is a low-cost, widely adaptable short-distance wireless communication technology. The article introduces the protocol, implementation method and application of IrDA in continuous detection data acquisition system.
Keywords: IrDA wireless communication data collection online detection
After the air conditioner is assembled on the production line, it must go to the testing line to test various technical indicators of the cooling and heating functions. These main testing items include temperature, pressure, power consumption, etc. The air conditioner is tested as it moves forward on the testing line. After each air conditioner runs empty, cools, and heats for a certain period of time, the operating temperature, pressure, power consumption and other testing data as well as the air conditioner's operating temperature must be measured at the set position. The product serial number is transmitted to the data management host computer through wireless communication while traveling. Since the production volume of air conditioners is large, the amount of data generated is also large, which requires the automatic detection device on the detection line to be able to accurately, quickly and successfully achieve wireless communication and exchange data with the data management computer. The advantage of wireless communication is that it eliminates the device's dependence on cables and connectors. Automatic air conditioner detection can be performed continuously. As long as both communicating parties support a certain protocol, a communication link can be quickly established and data exchange can be achieved. 60% of notebook computers on the market support infrared transmission, and infrared interfaces have become a must-have standard component for almost all handheld computers. Most of the PC motherboards currently produced have reserved infrared interfaces. As long as a suitable infrared transceiver module is selected, infrared wireless data communication can be achieved, and the cost is even lower than cable communication.
There are many ways to achieve wireless data communication, and the currently popular ones are Bluetooth technology and infrared communication technology. IrDA infrared communication is a short-distance wireless communication technology with low price and wide adaptability.
1 IrDA and its communication protocol
IrDA is the Infrared Data Association, the full name of which is The Infrared Data Association. It is an international organization established in June 1993. It specializes in formulating and promoting low-cost infrared data interconnection standards that can be used together and supports point-to-point working mode. Due to the unification of standards and wide application, more companies have begun to develop and produce IrDA modules. Advances in technology have also made IrDA modules more integrated and smaller in size. IrDA1.0 can support a communication rate of up to 115.2kbps, while IrDA1.1 can support a communication rate of up to 4Mbps.
The purpose of IrDA (Infrared Data Association) is to develop standards and protocols that can be implemented at reasonable costs to promote the development of infrared communication technology.
IrDA data communication is divided into three categories according to transmission rate: SIR, MIR and FIR. The rate of serial infrared (SIR) covers the rate usually supported by RS-232 ports (9600b/s ~ 115.2kb/s). MIR can support rates of 0.576Mb/s and 1.152Mb/s; Fast Infrared (FIR) is typically used for rates of 4Mb/s and sometimes all rates above S1R.
In IrDA, the physical layer, link access protocol (Irlan) and link management protocol (IrLMP) are the three necessary protocol layers. In addition, there are optional layers for special application modes.
In the basic IrDA application mode, devices are divided into master devices and slave devices. The master device detects its visual range, looks for slave devices, and then selects one of the devices that responds to it and attempts to establish a connection. During the process of establishing a connection, the two devices coordinate with each other to determine the final communication rate based on their joint highest communication capabilities. The above "searching" and "coordination" processes are all performed at 9.6kb/s baud.
IrDA data communications operate in half-duplex mode because when transmitting, the receiver is shielded by the transmitted light. In this way, the two communicating devices will simulate full-duplex communication through the fast transfer link, and the master device will be responsible for controlling the timing of the link.
The IrDA protocol is arranged in layers, and the data of the application is transmitted layer by layer, and is finally sent out in the form of light pulses. IrLAJ and lrLMP are the two software layers required in the protocol in addition to the priest layer. The first layer above the physical layer is the Link Access Protocol (IrLAP), which is an adaptation of the HDLC (High-Level Data Link Control) protocol to accommodate infrared transmission requirements. The work of the IrLAP layer includes link initialization, device address finding and conflict resolution, connection initiation, data exchange, disconnection and link closure, etc. IrLAP is used to specify the frame and byte structure of infrared data packets, as well as the error detection method of infrared communication. The layer above IrLAP is the link management protocol, or IrLMP, which is mainly used to manage link functions and applications in the link connections provided by IrLAP, evaluate services on the device, and manage data rates, number of BOFs, etc. (Start of frame) and connection reversal time and other parameters coordination, as well as error correction transmission of data, etc.
The IrDA physical layer protocol puts forward suggestions for the anti-interference ability when devices of different brands are interconnected in terms of working distance, working angle (viewing angle), optical power, and data rate. The current infrared communication distance is up to 3 meters and the receiving angle is 30 degrees.
2 Design and implementation of IrDA for air conditioning detection line
2.1 Implementation of physical layer protocol
The design of the IrDA physical layer protocol ensures error-free communication at axis deviation angles of 0° to 15° within a range of 0 to 1 meter. These include specifications for modulation, viewing angle, optical power, data rate, and noise removal to ensure physical interconnectivity between equipment traveling on the inspection line and on the fixed data management computer. The protocol also takes into account the presence of ambient lighting or other noise sources as well as interference between some detection devices participating in IR communications. The protocol requires reasonable selection of the light intensity of the transmitter and the sensitivity of the receiver to ensure that the link can work within a distance of 0 to 1 meter.
Figure 1 shows the block diagram of the IrDA physical layer. When the data rate is less than 4Mb/s, RZI (return to zero inversion) modulation is used, and the maximum pulse width is 3/16 of the bit period; at a data rate of 4Mb/s, 4PPM (pulse position) modulation is used. The coding effect of RZI (Return to Zero) modulation required by IrDA is shown in the IR frame data in Figure 2. 4PPM modulation is shown in Figure 3. Two data bits combined together form a 500ns "data symbol group". This group of symbols can be divided into four 125ns time slots. And single pulses can be placed in different time slots according to the status of the symbol group. After the demodulator locks the phase of the input bit stream, it can decode the data based on the position of the pulse in the 500ns period. The encoder/decoder required for this solution can be integrated in the 1/0 chip or as an independent component. The air conditioner detection line uses Agilent infrared communication devices. This product has great advantages in terms of power consumption, size, and price. It is widely used in small mobile phones, pagers, notebook computers, desktop PCs, Windows CE handheld products, and personal digital assistants. (PDA) and digital imaging products are widely used.
2.2 Design of hardware circuit
The core MCU of the accompanying data acquisition device for the air conditioner detection line can be RISC microcontroller 90S2313 from ATMEL Company. Its serial port can support IrDA-compatible LED transceivers and can be directly connected to it.
The infrared transceiver uses AGILENT's HDSL-3201 and HDSL-3600. The power supply voltage range of the 2.5 mm high HDSL-3201 is 2.7V to 3.6V, but the LED driving current should be compensated internally to a constant 32mA to ensure compliance with IrDAr DATA1. 2 (low power consumption) physical layer protocol indicator requirements. The transmission distance of this product is generally 30 centimeters and can support data transmission rates of 9.6kb/s to 115.2kb/s. The typical link transmission distance of the 4 mm high HDSL-3600 can be greater than 1.5 meters, and the data rate that can be received can be selected through the pin FIP-SEL. When FIR-SEL is set to low level, the maximum rate is 115.2kb/s; when set to high level, the maximum rate is 4Mb/s. At the same time, there are two pins MDO and MD1 used to select the luminous power. Users can set according to their own needs to achieve the purpose of saving power in short-distance communication situations. Figure 4 shows the pin description and typical peripheral circuit of HSDL-3600.
2.3 Data flow of IrDA infrared communication
The air conditioner detection device works in SIR mode, and all serial data transmitted between the TXD/RXD pin and the UART of 90S2313 is modulated/demodulated according to the SIR IrDA standard. Logic 0 is represented by a pulse of light that is 3/16 bits wide, or 1.6 μs wide (1.6 μs is 3/16 of the bit width at the maximum bit rate of 115.2kbps). The beginning of bit 0 corresponds to the rising edge of the pulse. Logic 1 is represented by a pulse of no light. Bytes are sent starting with LSB first. Each frame consists of a start bit, 8-bit data, and stop bits, without parity.
Since the amount of communication data of the air conditioner detection device is not large, the SIR mode can meet the requirements. In FIR mode, the communication process is much more complicated. All serial data transmitted between the TXD/RXD pins and the HSSP (High Speed Serial/Parallel) interface of the microprocessor are modulated/modulated according to the 4PPM IrDA standard. Desolved. When encoding, a byte is divided into four separate code units (2-bit pairs). The lowest code unit is transmitted first, but each code unit is not reordered. In this way, a byte is divided into four "slices" (500ns each), and each "slice" is divided into four time slots (125ns each).
A special 4Mb/s protocol can be implemented using the High Speed Serial/Parallel (HSSP) interface in the microprocessor. Its serial frame format is:
guide sign | start flag | address | Control (optional) | data | CRC-32 | Stop bit |
The boot flag is used to receive synchronization. Reception begins by receiving four 4PPM slices from the RxD2 pin using a serial shift register, then latching and decoding the slices one at a time. If these slices cannot be decoded into correct pilot flags, the slot count is delayed by 1 and the above process is repeated until the pilot flag is recognized and the flag slot counter is synchronized. The boot logo is repeated at least 16 times. Due to the constant repetition when idle (no data sent), the start flag may be received at any time after the 16 boot flag transfers are completed.
When the 8-slice length start flag is received, the system compares it with the standard encoding. If any part of the start flag differs from the standard encoding, a frame error is signaled and the search for the frame leader flag begins again. Once the correct start flag is verified, each subsequent set of 4 slices is decoded into a data byte and placed into a 5-byte temporary FIFO register. When the temporary FIFO is filled, the data values are pushed into the receive FIFO one after another.
The first byte of a frame of data is an 8-bit address area, which is used to specify the receiver during one-to-many communication. The address area can accommodate up to 255 independent addresses (00000000~11111110). 11111111 is a universal address used to broadcast information to all stations. Receive address matching can be activated or disabled. If receive address matching is activated, the received address will be compared with the address match value. If the two values are equal or the input address is a universal address, all data bytes (including address bytes) will be stored in the receive F1FO. If they do not match, no data can be stored into the 51 receive FIFO, so the system ignores the remainder of the frame and begins looking for the next boot flag.
The second data byte of a frame may include a user-defined 8-bit optional control field, which must be decoded by software because it is treated as ordinary data in HSSP. A frame can contain any number of 8-bit data up to 2047 bytes (including the ability to address data bytes). Its data length does not exceed the maximum amount of data when the CRC check can detect all errors in transmission.
3 Prospects and prospects
With the development of infrared communication technology, its communication rate will continue to increase. This year IrDA will launch the 16Mbps Very High Speed Infrared (VFIR) standard. The range of IrDA infrared communication will also be expanded from 1 meter to dozens of meters. The Bluetooth wireless communication technology that has emerged in the past two years has the advantages of long distance and no angle restrictions. However, the data rate is low and the cost is high. The bit error rate and confidentiality are not as good as infrared communication. Therefore, Bluetooth wireless communication technology has not yet reached a complete The extent to which infrared communications can be replaced.
For small equipment such as air conditioner on-the-go detection data collection, IrDA infrared communication is indeed a reliable, convenient and fast low-cost solution for exchanging data with the host computer.
Previous article:SMT testing technology
Next article:Software Design of New Coriolis Mass Flowmeter
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- 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
- Fan modification based on RSL10
- FAQ Analog Front End and Sensors
- Embedded uboot learning
- Disassembly of an eight-year-old laptop battery!
- Design of greenhouse temperature and humidity monitoring and alarm system based on zigbee
- Keysight Material Dielectric Constant Test Method - Just Read the Content
- Sound pressure, sound intensity and sound power
- Proteus MSP430 MCU simulation example 8-2-bit digital tube countdown
- The TouchGFX Designer is a real pain
- How to implement analog serial communication with TI MSP430