Design of Wireless Temperature Measuring System Based on the nRF 24 l 01

Wireless data transmission system which composed of wireless data transmission device nRF24L01, temperature sensor [DS18B20,] and STC89C52. The system can collect and transmit temperature information and display it on LED, when the temperature excess the set value, the system will alarm by the buzzer. The hardware and software of the design are explained in detail. Finally, the application of this system in wireless temperature collection system is discussed. Keywords—nRF24L01; wireless data transmission; DS18B20; STC89C52


INTRODUCTION
To avoid difficulties, easy to maintain, and improve system reliability, Compared with the previous RS485, CAN bus communication mode to collect the temperature of the temperature acquisition system.The wireless transmission chip nRF24L01 has the function of sending and receiving [1].The hardware link layer protocol of the wireless transmission chip is very reliable, and can complete the sending, receiving, displaying and alarming of the signal [5].In order to make the whole design idea clear, As show in the figure 1, the whole system is divided into two parts, which are sent and received.One is the acquisition and transmission part, the main use of STC89C52 as the main control chip [13], through the wireless transmission module DS18B20 temperature acquisition module nRF24L01 acquisition of temperature.Two is to receive the display part, mainly for the acquisition of temperature data processing, through the wireless transmission module nRF24L01 to handle the good data passed to the LCD screen.

III. SYSTEM DESIGN
nRF24L01 are produced by NORDIC, working on 2.4GHz~2.5GHzISM band [10].As a wireless transceiver chip, its built-in frequency generator, enhanced "Shock Burst" mode controller, power amplifiers, oscillators, modulators and demodulators, can be directly connected to the microcontroller I/O [2].nRF24L01 built-in data link layer protocol, and four work modes can be configured through the configuration registers.The chip's biggest feature is the improved measurement of cable in the past abuses, and relatively accurate, reliable measurement values.By combining without A/D converter DS18B20 temperature acquisition modules [11], more convenient and efficient to collect and measure the temperature.
System hardware design is mainly composed of two parts of the collection and transmission and display [15].Figure 2 for the collection and transmission circuit diagram, the circuit mainly by temperature sensor DS18B20, microcontroller STC89C52 and nRF24L01 composition.
Collection sent circuit 5V DC power supply, in order to strengthen the DS18B20 temperature measurement accuracy, data ports can be connected to the 4.7K pullup resistor connected with the monolithic integrated circuit system [12].nRF24L01 needs is 3.3V voltage, this can transform a regulator AMS1117 [4].Throughout the entire acquisition circuit, schematic simplicity and easy to understand, and still achieve real-time acquisition of wireless temperature, reflects the nRF24L01 wireless transmission module and the DS18B20's efficient, convenient and practical.Here special attention is single bus temperature sensor DS18B20 chip, its hardware interface is relatively simple, but relatively complex software programming of data acquisition, transmission and, therefore, strictly in accordance with the nRF24L01 configuration storage, DS18B20 and MCU interface protocol is realized by the strict timing [8].Although software is relatively complicated, but STC89C52 speed can compensate for other deficiencies.In addition, DS18B20 programming when want to initialize, and according to the specific requirements of the ROM operation command, memory operations, according to a certain order for data processing.If hanging on the bus one DS18B20, does not need to match ROM, skip ROM command is executed after initialization, and then send temperature conversion commands.After the temperature conversion is complete, the temperature value staged the send buffer in tx_buf, and then sent through the nRF24L01.2 、 Because of the STC89C52 SPI bus interface, the software simulation is needed to implement the SPI bus [16].Therefore, should be strictly in accordance with the timing of the SPI requirements, otherwise it will lead to the failure of the operation of nRF24L01 [3].All the commands of the nRF24L01 are only one byte, which is divided into reading, writing, reading, data receiving buffer, writing and sending data buffer.At the same time, the contents of the STATUS register of the MISO output [7].Read and write program code for nRF24l01 is as follows: Unit SPI_RW (unit uchar) { Unit bit_ctr； for (bit_ctr=0；bit_ctr<8；bit_ctr++) {MOSI=(unhar&0x80)； uchar=(uchar<<1)； SCK=1； Uchar|=MISO； SCK=0；} Return (uchar)； } nRF24L01 transceiver devices requires programming to both sides, was the predominant use is receiver and sender configuration register problems [10].This debugging method of the request, if two debugging communication extremely difficult and are not easy to find the problem.Verified in practice, the correct approach is to debug the sender, accurate and complete to be sent, go to debug the receiver, so that you can successfully complete the sending and receiving of data.
Program for the sender are as follows: Void nRF24L01_TxPacket(unsigned char * tx_buf) { CE=0; SPI_Write_Buf(WRITE_REG RX_ADDR_P0,TX_ADDRESS,TX_ADR_WIDTH); SPI_Write_Buf(WR_TX_PLOAD,tx_buf,TX_PLOAD_ WIDTH); SPI_RW_Reg(WRITE_REG + CONFIG,0x0e); CE=1; iner Delay_us (10); } NRF24L01 at the receiving end is configured to receive mode, RX_AW is the address, load the data width is TX_PL_W, so that you can receive the data interrupt the CRC checksum is 2 bytes, nRF24L01 is in a P0WER_UP State [4]. the procedures are as follows: SPI_RW_Reg(WRITE_REG + RF_SETUP,0x07); } 3 、 Results of experiments collected measurements, analysis as follows.This system uses real-time temperature acquisition is a wireless transceiver module on the environment, its main feature is the wireless measurement [14].Distance is a major factor influencing the results of the experiment, so in the measurement process will send and receive a distance between two modules for a substantive examination and data analysis.In the measuring process, statistics on the measuring range and measuring values and sampled according to the error function and error calculation method, the final statistics are shown in table 1.According to experimental data and related literature review and related information on the chip, 5m within the most accurate measurement results, if the premise of the whole system without any improvement under the optimized measurement scope is only limited within 12m.Considering the measurement range, usually take the external PA and LAN chip nRF24L01 chip integrated in common.[10] The wireless module to transmit power with PA and LAN more, launch distance farther, the signal is more stable, the measurement distance can reach 1000m.[3] V. CONCLUDING REMARKS Now the rapid development of science and technology, many areas were gradually to the development, which includes the intelligent temperature measuring and testing as we know it.Knowledge and intelligence gathering disciplines, including automatic control technology and power electronics, and for temperature acquisition we use is extremely widespread.nRF24L01, DS18B20 and STC89C52 components are introduced in this paper the wireless temperature collecting system, this system is a reflection of intelligence [9].nRF24L01 device with low cost, high performance, and high-performance compensation to the field wiring is difficult, and increases the