“SX1212 is an ultra-low-power single-chip wireless chip launched by SEMTECH, with a frequency range from 300MHz to 510MHz. The SX1212 is optimized for very low receive power consumption, with a typical receive current of 2.6mA, much less than that of comparable transceivers. The working voltage is 2.1-3.6V, and the maximum transmit power is +12.5dBm. The SX1212 has a very high level of integration. It includes integrated circuits with radio frequency functions and logic control functions. It integrates voltage-controlled oscillators, phase-locked loop circuits, power amplifier circuits, Low noise amplifier circuits, modulation and demodulation circuits, frequency converters, intermediate amplifier circuits, etc.
SX1212 is an ultra-low-power single-chip wireless chip launched by SEMTECH, with a frequency range from 300MHz to 510MHz. The SX1212 is optimized for very low receive power consumption, with a typical receive current of 2.6mA, much less than that of comparable transceivers. The working voltage is 2.1-3.6V, and the maximum transmit power is +12.5dBm. The SX1212 has a very high level of integration. It includes integrated circuits with radio frequency functions and logic control functions. It integrates voltage-controlled oscillators, phase-locked loop circuits, power amplifier circuits, Low noise amplifier circuits, modulation and demodulation circuits, frequency converters, intermediate amplifier circuits, etc. In addition it integrates a baseband modem for data transfer rates up to 150Kbps. Data processing functions include a 64-byte FIFO, packet processing, automatic CRC generation and data whitening. Its highly integrated architecture allows for minimal external component count while maintaining design flexibility. All major RF communication parameters are programmable, most of which can be set dynamically. It complies with European (ETSI EN 300-220 V2.1.1) and North American (FCC part 15.247 and 15.249) standards.
This paper introduces the wireless module design based on the wireless chip SX1212, which has many advantages such as relatively long transmission distance, high receiving sensitivity, and low working power consumption, so it is suitable for wireless water and gas meter reading, wireless remote control systems, wireless sensor networks, Wireless temperature and pressure data acquisition, robot control and other fields that require long-term work with batteries.
System circuit design
The system is mainly composed of an MCU and SX1212 as shown in Figure 1. MCU selects ST’s low-power microcontroller STM8L101F3, SX1212 uses SPI interface to communicate with the microcontroller, and uses UART interface to communicate with external terminals. Since the highly integrated SX1212 has very few peripheral parts, the key to the design is the design of the matching circuit of the RF front end. In addition, the traces of the high-frequency part should be as short and thick as possible, and the component parameters should be adjusted appropriately according to the actual situation of the circuit board to offset the influence of the distribution parameters. The impedance of the general RF chip transmit and receive ports is not the standard 50Ω impedance. To achieve the best receiving effect, the input impedance must be matched with the 50Ω antenna through the compensation of the peripheral devices. The circuit is shown in Figure 1. In the figure, Y2 is the surface acoustic filter, which is used to attenuate signals outside the specified frequency band. L2, C3, and C22 are impedance matching networks. L4 and L5 are the inductance of the voltage-controlled oscillator. Adjusting the inductance of the voltage-controlled oscillation can make the module work in different The frequency, C7, R3, C8 is the phase-locked loop circuit.
work mode design
A typical wireless transceiver code is shown in the figure below.
The four working modes of the wireless module based on SX1212 and the application system design preamble is “1010” alternating code, its function is to synchronize the target receiver clock with the transmitter, the preamble length in normal mode is generally 32bit, if working In the power saving mode sequence, the preamble also has the function of waking up the receiver. At this time, the transmitter must send a longer preamble to wake up the receiver in the power saving mode and enter the normal working state. If the receiver is set to wake up once every second, the receiver wakes up every 1 second to search for the preamble (tw), and the duration is generally 16 bits. The transmitter first transmits the preamble for more than 1 second and then transmits the synchronization code after that, which means that the receiver can successfully detect and wake up to receive as long as the preamble is found in the channel during the wake-up period. The schematic diagram is shown in Figure 2.
Here we have designed four working modes, see Table 1. These four working modes are converted by using the SET_A and SET_B pins of the MCU, and all four modes can be converted to each other.
Table 1: Description of the four working modes
Figure 2: Transmitting is in Mode 2 and Receiving is in Mode 3. The sleep mode is implemented by software, so that the interface of the system maintains the corresponding level during sleep, and can switch various states quickly, because the MCU main clock It is generated by the RC oscillator, the start-up time only needs 4uS, and the measured time from sleep to wake-up plus wake-up initialization only needs 20uS, which means that when the module is in the sleep state, after the SET_A pin is set low, 20uS can be input through the UART port data to the module. Here we designed the system in the process of receiving or transmitting, even if it is set to work in mode 3 or 4, the module should enter the power-saving mode or sleep mode after the receiving or transmitting process is completed, and the AUX pin will be in the receiving or transmitting process. is deasserted. Using this feature, when the module is in the mode 3 or module 4 state, the user of the lower computer can set the SET_A pin high immediately after setting the SET_A pin low to wake up the module and input data, without waiting for the module to send the data wirelessly. The module will automatically detect the SET_A pin after the data is sent. If it is high, it will go to sleep. Whether the data is sent or not can be obtained by querying the AUX pin.
Figure 3: The connection diagram between the module and the lower computer
In a battery-powered circuit, the slave module (such as a water and gas meter) can normally be set to mode 3. When the main module (such as a collector or a transceiver) sends data in mode 2, the slave module wakes up and receives data. After completion Use the AUX pin to wake up the lower computer MCU, and then output the data. After the MCU receives the data, it can switch from the module to mode 1 and respond to the main module. If the master module receives the response, it can also be switched to mode 1. At this time, the master and slave modules are in normal mode, which can realize high-speed data transmission. If the master module receives the response, if there is no subsequent data exchange, the slave can switch to the mode 3 to be in the power saving mode again, waiting for the next wake-up, while the master module can switch to the mode 4 sleep state.
Because power saving is achieved by periodically waking up from sleep and then wake-up, the power consumption in power-saving mode is related to the wake-up period and the time (tw) for each wake-up to search for the preamble, as well as the static power consumption of sleep. The user can set the wake-up period online from 50ms to 5s. The preamble time for each search is related to the rate of RF transmission, and the rate of RF transmission can also be set. The average wake-up search preamble time at a rate of 10Kbps is about 4.5ms .
The battery life in power saving mode can be calculated by the following formula:
For example: the battery is a 3.6V/3.6A ER18505 lithium sub-battery, the module including the MCU receiving current is 3.2mA, the sleep current is 1.5uA, the RF transmission rate is 10Kbps, and the wake-up period is 1SEC, then the battery life is: =227337H≈(25.956 years ) Considering the self-discharge of the battery, the capacity difference under different currents, the temperature and the sleep power consumption of the client MCU and the usage several times a month, a 3.6V/3.6A ER18505 lithium sub-battery normally has more than 10 years service life.
The working mode of the power saving mode is very suitable for the occasions where the use of water and gas heat meters, container information management, data acquisition systems is not too frequent but requires long-term work with batteries.
In some wireless transceiver applications, if battery power is required, and a long-term receiving state is required to ensure real-time response, only the method of timing wake-up reception is used. Under the condition of constant battery capacity, if you want to extend the working time, you can only reduce the duty cycle and increase the wireless transmission and reception rate. However, reducing the duty cycle will directly affect the real-time response, and the sensitivity of wireless reception will generally decrease by 2-3dBm for each doubling of the rate. It directly affects the communication distance. Now the common single-chip wireless IC on the market generally has a receiving current of 15-20mA. For example, it is used in a system such as a wireless water vapor meter that requires a battery to work for 6-10 years. Various parameters such as distance, working life, Response time is a tough trade-off. The SX1212 launched by SEMTECH innovatively reduces the current to 2.6mA, while receiving sensitivity, anti-interference, adjacent channel selectivity and other indicators still have high indicators.
At present, the wireless module based on SX1212 has been developed by Shenzhen Anmeitong Co., Ltd., and has been successfully applied to the collection of wireless water and gas meters. The actual measurement in the open field is about 450 meters under 10Kbps, and about 600 meters under 2Kbps. , When 1SEC is opened once, the water and gas meter data collection can be completed in less than 2SEC by hand. If it cooperates with the collector, automatic meter reading can be realized. Enter the command to automatically discover the surrounding water and gas meters to further improve the meter reading speed. Compared with the traditional manual meter reading, each person can only read 3-4K households per month, and most gas meters need to be read at night, which greatly improves the efficiency.