Application design of short-distance ISM band wireless data transmission

Publisher:TranquilMindLatest update time:2012-04-11 Source: 中国工控网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

In recent years, with the development of integrated circuit technology, the performance of ISM band single-chip wireless data communication ICs has been continuously improved, and the application fields of short-range wireless are also constantly expanding, including home appliances, consumer electronics, industrial control, security, automatic meter reading, car remote control and many other fields.

This article introduces the application of ATA5428, a single-chip multi-frequency transceiver chip from ATMEL that works in the ISM band, in wireless data transmission.

ATA5428 is a new integrated circuit launched by ATMEL that includes radio frequency function and logic control function. It can work at 431.5MHz~436.5MHz. ATA5428 has the advantages of low power consumption and high integration, long transmission distance and high receiving sensitivity. It integrates voltage-controlled oscillator, phase-locked loop circuit, power amplifier circuit, demodulation circuit, inverter, intermediate frequency amplifier circuit, etc. Due to the high degree of integration, the complex wireless circuit is greatly simplified. The radio frequency part that was difficult to handle in the past has been simplified to only adding a few discrete components without debugging on the periphery of the IC.

ATA5428 contains an automatic timed receive wake-up digital logic control circuit, which can set the wake-up cycle. Selecting this function will only increase the transmit and receive delay, but will reduce the receive power consumption exponentially.

ATA5428 contains 7 control registers, which can easily set the frequency, receiving and sending rate, and modulation mode. ATA5428 also contains a 16-byte first-in-first-out RAM buffer. This function reduces the dependence on the MCU and gives the MCU more time to handle other matters. Therefore, even if the MCU runs at a relatively low frequency, it can still work normally if the sending and receiving sides respond in no less than 100ms.

System circuit design

This system uses the AVR series single-chip microcomputer ATmega88. ATA5428 uses the SPI interface to communicate with ATmega88 and the UART interface to communicate with the outside. Due to the high degree of integration of ATA5428 and very few peripheral parts, the key to the design is the design of the matching circuit of the RF front end. The impedance of the transmitting and receiving ports of general RF chips is not the standard 50Ω impedance, but can be equivalent to a real part plus an imaginary part at different frequencies. For example, the input impedance of ATA5428 at a frequency of 433.92MHz can be equivalent to (32-j169)Ω. To achieve the best reception effect, the input impedance must be compensated by peripheral devices to match it with the 50Ω antenna.

[page]

In Figure 1, the role of L4 and C1 is to compensate the input impedance to 50Ω. Similarly, the role of L2 and C8 is to compensate the output impedance to 50Ω. At the same time, L2 also plays the role of high-frequency choke. C9, L1, and C10 form a third-order low-pass filter circuit. The cut-off frequency of 3dBm is about 500MHz. The low-pass filter circuit can suppress the transmitted high-order harmonics on the one hand, and attenuate the input noise on the other hand. It must be noted that in order to reduce the mutual influence of the input and output networks, an antenna switch is added inside the ATA5428. The switch is closed in the transmitting state. The 20mm×0.4mm transmission line before the input network is equivalent to a capacitor grounded because its length is much less than 1/4 wavelength. When receiving, it is equivalent to an inductor. The design of this part must pay attention to the influence of distributed parameters. In addition, the routing of the high-frequency part should be as short and thick as possible, and the parameters of the components should be appropriately adjusted according to the actual situation of the circuit board to offset the influence of distributed parameters.

The sensitivity of ATA5428 is already quite ideal. When there are some special occasions that require a longer communication distance, such as two-way car remote controls, a low noise amplifier LNA can be added to the RF input of ATA5428 (see Figure 2) to further improve the receiving sensitivity of ATA5428. The input and output of the amplifier circuit both use LC matching networks. The actual gain of the amplifier is as high as nearly 20dB, which can increase the sensitivity by 4dB to 6dB, equivalent to increasing the distance by 30% to 80%.

Figure 2 LNA application circuit

Software Design

As we all know, before receiving valid data, a general wireless digital receiver must identify the flag information of the beginning of the data and the preamble PREAMBLE and the synchronization header SYNCWORD (see Figure 3). The preamble is composed of several 01010... data and is mainly used to recover and synchronize the clock of the wireless receiver. The synchronization header can be several specific data, which marks the beginning of the data. The ID FIELD is an option and is used to identify the address of the receiver. The data field DATA FIELD is the real data area. The length of the data is usually variable. CRC is the verification of the ID FIELD and DATA FIELD. CRC16 or CRC32 can be selected. ATA5428 recommends Manchester encoding to distinguish it from other similar ICs. ATA5428 detects the preamble by comparing the pulse width of each bit and has a range window that can set the length of the bit data. Other similar ICs use the recognition of whether there is 01010... data to identify the preamble. The ATA5428's method of comparing the preamble obviously has obvious advantages and greatly enhances the anti-interference ability.

Figure 4 ATA5428 receiving diagram [page]

ATA5428 has two receiving working modes, normal mode and transparent mode. Our application uses normal mode. In normal mode, the receiving process is to activate the transmit and receive data buffer control logic after detecting the preamble and synchronization header, and write the data into the transmit and receive data buffer, as shown in Figure 4. It should be noted here that ATA5428 only has a 16-byte buffer. If the data queue length exceeds 16 bytes, a buffer overflow will occur, so it is very important to read the data in time to avoid data overflow. ATA5428 has a counter that displays the received data. When the counter value reaches a certain value, it can communicate with the MCU through an interrupt.

ATA5428 needs to be initialized before it works. The following only gives the initialization function in normal receiving mode and the initialization function in sending mode.
void receive_init()
{
__disable_interrupt(); //disable all
interrupts
SETBIT(PORTD,CS_5428); //CS___/----
spi(write_ctr_reg|5); //0xa5--->ctr6
spi(write_ctr_reg|4); //0x50--->ctr5
spi(0x90); //6 bits check, lim_min:
16,4b
spi(write_ctr_reg|3); //0x80--->ctr4
spi(0x00);
//FREQ = (frf/fxto-32.5)*16384-20.5,3928
spi(write_ctr_reg|2); //0x7b--->ctr3
spi(0x7b); //vsout on, clock out on
spi(write_ctr_reg |1); //0xb0--->ctr2
spi(0xb1); //manchester modulator on
spi(write_ctr_reg|0); //0x42--->ctr1
spi(0x26); //tx mode.send 1data
every time
CLRBIT(PORTD,CS_5428);//close 5428
spi interface
SETBIT(PORTD,CS_5428);
spi(cancel_IRQ);
CLRBIT( PORTD,CS_5428);//close 5428
spi interface
send.sum_value = 0;
}

The sending process is first initialized, and then a 2-3 byte 01010... preamble is sent from the SPI port. Since Manchester is set, a few 0XFFs can be sent. The following format can refer to the data transmission format in Figure 4. The sending function is as follows.
void transfer_data()
{
SETBIT(PORTD,CS_5428);//CS_5428
___/----
spi(write_TRX_buffer);//write writing
buffer command
spi(0xFF);//send 0xFF ,for bit check
spi(0xFF);//send 0xFF ,for bit check
spi(0x55); //for SYNCWORD
spi('T') ;//send 'T'
.
.
ID FIELD and DATA FIELD
CRC16
.
.
CLRBIT(PORTD,CS_5428);//CS_5428 ---
-\____
SETBIT(PORTD,CS_5428);//CS_5428
___/----
spi(write_ctr_reg|0);//0x00 -> ctr1
spi(0x00);/ /go to IDLE mode
CLRBIT(PORTD,CS_5428);//CS_5428 ---
-\____
}

After receiving the data, ATA5428 actively sends out an interrupt request, the MCU responds to the interrupt and calls the receiving function. The receiving process first determines whether the synchronization code is correct, and then receives the data field and CRC verification. If the verification passes, it is output to the UART port.

Conclusion

Experiments show that this design has the characteristics of low cost, low power consumption, and long communication distance. After actual operation measurement, the communication distance in open area exceeds 500m. Especially in the case of complex application environment and data signal is easily interfered by various noises, the reliability of this scheme is obviously better than the super regenerative data transmission scheme.

References:

1. ATA 5428 datasheet, ATMEL

Reference address:Application design of short-distance ISM band wireless data transmission

Previous article:Design of WPAN Network Equipment Based on AT86RF230 ZigBee
Next article:Wireless remote monitoring based on GSM module TC35T

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号